7
3
Derivar 4
Ir para o ficheiro
Dan Ballard 5accebc5e2
continuous-integration/drone/pr Build is pending Detalhes
continuous-integration/drone/push Build is pending Detalhes
fix prune logic
2024-03-10 11:39:23 -07:00
app Remove MaxBufferLines Config 2024-03-09 16:24:15 -08:00
docker change -exportTofuBundle to -exportServerBundle 2021-10-29 16:06:18 -07:00
metrics staticcheck and nilaway 2024-03-09 14:17:03 -08:00
storage fix prune logic 2024-03-10 11:39:23 -07:00
testing staticcheck and nilaway 2024-03-09 14:17:03 -08:00
.drone.yml update automated testing 2024-03-09 13:54:22 -08:00
.gitignore Replace legacy message store with sqlite3 message store 2021-05-07 12:29:31 -07:00
LICENSE Add 'LICENSE' 2022-01-29 19:11:47 +00:00
README.md fix tofubundle dump from app, fix READAME docker lines to be correct; drone more specific to avoid container checks on latest 2021-12-22 08:42:24 -05:00
go.mod Upgrade Server to Newest Cwtch 2024-03-09 16:20:46 -08:00
go.sum Remove MaxBufferLines Config 2024-03-09 16:24:15 -08:00
server.go spelling 2022-04-25 18:47:24 -07:00
serverConfig.go Remove MaxBufferLines Config 2024-03-09 16:24:15 -08:00
server_tokenboard.go adding 'servers' interface to manage multiple servers and support for encrypted configs 2021-10-04 16:21:41 -07:00
servers.go staticcheck and nilaway 2024-03-09 14:17:03 -08:00
servers_test.go server need .Stop() and .Destroy() 2021-11-01 15:07:53 -07:00

README.md

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 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