-
Notifications
You must be signed in to change notification settings - Fork 9
Deployment
Note: this section only include deployment guide, for detailed configuration, please go to Configuration Guide
-
We provide a example
docker-compose.yml
file, which use environment config methods. -
Edit
.env
file.
-
Remove env_file config (or keep it to override some fields).
-
Set your flags in command.
# env_file:
# .env
command: -bind=0.0.0.0:8008 -debug
-
Remove env_file config (or keep it to override some fields).
-
Add volumes for your config file.
-
Add command to set config file path.
# env_file:
# .env
command: -conf=/app/conf.yml
volumes:
- REAL_PATH/conf.yml:/app/conf.yml
- Set volumes for sqlite3 database file for data persistence.
volumes:
- REAL_PATH/sqlite3.db:/app/sqlite3.db
You may need to create
REAL_PATH/sqlite3.db
as an empty file first to prevent docker create it as a directory.
- Mysql is linked to server as host
db
and listening at3306
, you may set DB_ADDR todb:3306
-
Build as README.md
-
If you need sqlite3 support, you neet to build on the same platform as your production environment and with cgo enabled.
-
If sqlite3 is not needed, you can cross compile to any platform by using
GOOS=${TARGET_OS} GOARCH=${TARGET_ARCH} go build
go to go/build/syslist.go for all avaliable values.
-
Get a copy of the server binary matching your OS/Arch from Release Page.
-
Run the binary