42 lines
1.2 KiB
Markdown
42 lines
1.2 KiB
Markdown
# Cwtch Server
|
|
|
|
## Building
|
|
|
|
Pretty straight forward:
|
|
- build the app in `app/` with `go build`
|
|
- build the docker container in `docker/` with `docker build . -t openpriv/server`
|
|
|
|
### Windows
|
|
|
|
The server package relies on sqlite which in turn requires the use of CGO. As per [this issue](https://github.com/golang/go/issues/12029) that means [TDM-GCC](https://jmeubank.github.io/tdm-gcc/download/) 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
|
|
|
|
|
|
The app takes the following environment variables
|
|
- CWTCH_HOME: sets the config dir for the app
|
|
|
|
`env CONFIG_HOME=./conf ./app`
|
|
|
|
## Using the Server
|
|
|
|
When run the app will output standard log lines, one of which will contain the `tofubundle` 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`
|