continuous-integration/drone/push Build is passing
Details
|
1 year ago | |
---|---|---|
app | 1 year ago | |
docker | 2 years ago | |
metrics | 2 years ago | |
storage | 1 year ago | |
testing | 2 years ago | |
.drone.yml | 1 year ago | |
.gitignore | 2 years ago | |
LICENSE | 2 years ago | |
README.md | 2 years ago | |
go.mod | 1 year ago | |
go.sum | 1 year ago | |
server.go | 1 year ago | |
serverConfig.go | 1 year ago | |
server_tokenboard.go | 2 years ago | |
servers.go | 2 years ago | |
servers_test.go | 2 years ago |
README.md
Cwtch Server
Building
Pretty straight forward:
- build the app in
app/
withgo build
- build the docker container in
docker/
withdocker build . -t openpriv/server
Windows
The server package relies on sqlite which in turn requires the use of CGO. As per this issue that means TDM-GCC is required to be installed and used to compile on Windows
Running
- cd app
- go build
- ./app
The app takes the following arguments
- -debug: enabled debug logging
- -exportServerBundle: Export the server bundle to a file called serverbundle
- -disableMetrics: Disable metrics reporting to serverMonitor.txt and associated tracking routines
- -dir [directory]: specify a directory to store server files (default is current directory)
The app takes the following environment variables
- CWTCH_HOME: sets the config dir for the app
- DISABLE_METRICS: if set to any value ('1') it disables metrics reporting to serverMonitor.txt and associated tracking routines
env CONFIG_HOME=./conf ./app
Using the Server
When run the app will output standard log lines, one of which will contain the serverbundle
in purple. This is the part you need to capture and import into a Cwtch client app so you can use the server for hosting groups
Docker
Build by executing docker build -f docker/Dockerfile .
or run our prebuild ones with
pull openpriv/cwtch-server
and run it. It stores all Cwtch data in a Volume at /var/lib/cwtch
so if you want the server data to persist you would run
docker run -v /var/lib/cwtch/server01:/var/lib/cwtch openpriv/cwtch-server
to create a persistent container you might try a command like:
docker run --name cwtch -v /var/lib/cwtch/server01:/var/lib/cwtch --restart always openpriv/cwtch-server