

GitHub - gotify/server: A REST-API for sending and receiving messages in real-ti...
source link: https://github.com/gotify/server
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md
Gotify Server
- Motivation
- Features
- Installation
- Configuration
- Setup Dev Environment
- Building
- Tests
- Versioning
- License
Motivation
We wanted a simple server for sending and receiving messages (in real time per web socket). For this, not many open source projects existed and most of the existing ones were abandoned. Also, a requirement was that it can be self-hosted. We know there are many free and commercial push services out there.
Features
- REST-API for
- sending messages
- receiving messages per websocket
- user management
- client/device & application management
- REST-API Documentation (also available at
/docs
) - Web-UI
- Android-App -> gotify/android
Google Play and the Google Play logo are trademarks of Google LLC.
Installation
Docker
The docker image is available on docker hub at gotify/server.
$ docker run -p 80:80 gotify/server
Also there is a specific docker image for arm-7 processors (raspberry pi), named gotify/server-arm7.
$ docker run -p 80:80 gotify/server-arm7
Binary
Visit the releases page and download the zip for your OS.
Configuration
File
server: port: 80 # the port for the http server ssl: enabled: false # if https should be enabled redirecttohttps: true # redirect to https if site is accessed by http port: 443 # the https port certfile: # the cert file (leave empty when using letsencrypt) certkey: # the cert key (leave empty when using letsencrypt) letsencrypt: enabled: false # if the certificate should be requested from letsencrypt accepttos: false # if you accept the tos from letsencrypt cache: data/certs # the directory of the cache from letsencrypt hosts: # the hosts for which letsencrypt should request certificates - mydomain.tld - myotherdomain.tld database: # for database see (configure database section) dialect: sqlite3 connection: data/gotify.db defaultuser: # on database creation, gotify creates an admin user name: admin # the username of the default user pass: admin # the password of the default user passstrength: 10 # the bcrypt password strength (higher = better but also slower) uploadedimagesdir: data/images # the directory for storing uploaded images
Environment
GOTIFY_SERVER_PORT=80 GOTIFY_SERVER_SSL_ENABLED=false GOTIFY_SERVER_SSL_REDIRECTTOHTTPS=true GOTIFY_SERVER_SSL_PORT=443 GOTIFY_SERVER_SSL_CERTFILE= GOTIFY_SERVER_SSL_CERTKEY= GOTIFY_SERVER_SSL_LETSENCRYPT_ENABLED=false GOTIFY_SERVER_SSL_LETSENCRYPT_ACCEPTTOS=false GOTIFY_SERVER_SSL_LETSENCRYPT_CACHE=certs # lists are a little weird but do-able (: GOTIFY_SERVER_SSL_LETSENCRYPT_HOSTS=- mydomain.tld\n- myotherdomain.tld GOTIFY_DATABASE_DIALECT=sqlite3 GOTIFY_DATABASE_CONNECTION=gotify.db GOTIFY_DEFAULTUSER_NAME=admin GOTIFY_DEFAULTUSER_PASS=admin GOTIFY_PASSSTRENGTH=10 GOTIFY_UPLOADEDIMAGESDIR=images
Database
Dialect Connection sqlite3path/to/database.db
mysql
gotify:secret@/gotifydb?charset=utf8&parseTime=True&loc=Local
postgres
host=localhost port=3306 user=gotify dbname=gotify password=secret
Setup Dev Environment
Setup Server
Download go dependencies with golang/dep.
$ dep ensure
Run golang server.
$ go run app.go
Setup UI
Commands must be executed inside the ui directory.
Download dependencies with npm.
$ npm install
Star the UI development server.
$ npm start
Open http://localhost:3000
inside your favorite browser.
The UI requires a Gotify server running on localhost:80
this can be adjusted inside the ui/src/index.tsx.
Building
Build Server
$ go build app.go
Build UI
$ npm run build
Cross-Platform
The project has a CGO reference (because of sqlite3), therefore a GCO cross compiler is needed for compiling for other platforms. See .travis.yml on how we do that.
Tests
The tests can be executed with:
$ make test # or $ go test ./...
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
License
This project is licensed under the MIT License - see the LICENSE file for details
Recommend
-
54
If This Then That, or IFTTT for short, is a pretty great service. There are hundreds of connected services, allowing you to automate your email, smart home... by Corbin Davenport in News, Tips & Tutorials
-
67
README.md Gotify Android
-
139
README.md
-
14
Cloud Events is a specification for describing events. It aims to ease interoperability. With the rise of event-driven architecture, it’s not surprising to see Cloud Events gaining popularity.
-
9
In this post I covered the basics of setting up a queue and sending a message to it. Here, I’m going to cover the options around receivin...
-
2
Receiving SQS Messages via API Gateway Http APIFebruary 27, 2021API Gateway V2 (HTTP API) native integration with SQS is an incredible tool to provide highly available APIs. AWS provides the scalability of API Gateway while ma...
-
14
Introduction Over the past two months, I’ve spent a lot of time learning about designing and implementing REST APIs. It’s been a lot of fun learning what a REST API is and I really enjoyed learning how to implement a REST API from s...
-
10
Receiving Instagram Spam Messages? How to Spot and Stop Them By Khizer Kaleem Published 11 hours ago If you h...
-
10
October 25, 2022 ...
-
9
gotify 架构设计 Gotify 是一个基于 websocket 协议并支持多种设备类型接入的消息推送系统,后端使用 golang 开发. gotify 简化了消息的投递及推送的流程,客户端使用 websocket 协议连接并订阅,使用 rest http post 进行消息投递. 官...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK