|
|
@@ -32,8 +32,27 @@ Development and Contributing information in [CONTRIBUTING.md](https://git.openpr |
|
|
|
#### Docker |
|
|
|
This repository contains a `Dockerfile` allowing you to build and run the server as a [docker](https://www.docker.com/) container. |
|
|
|
|
|
|
|
To get started issue `docker build -t cwtch:latest`, this will create 2 temporary docker containers, one to build the Tor daemon and one to build Cwtch. The compiled binaries will then be bundled into a new image and tagged as `cwtch:latest`. |
|
|
|
To get started issue `docker build -t openpriv/cwtch-server:latest`, this will create 2 temporary docker containers, one to build the Tor daemon and one to build Cwtch. The compiled binaries will then be bundled into a new image and tagged as `openpriv/cwtch-server:latest`. |
|
|
|
|
|
|
|
To run Cwtch in the foreground execute `docker run cwtch:latest`, you will see a small amount of output from Tor and then Cwtch will output your server address. When you `Ctrl + C` the container will terminate. To run Cwtch in the background execute `docker run --name my-cwtch-server -d cwtch:latest`. To get your Cwtch server address issue `docker logs my-cwtch-server`. |
|
|
|
To run Cwtch in the foreground execute `docker run openpriv/cwtch-server:latest`, you will see a small amount of output from Tor and then Cwtch will output your server address. When you `Ctrl + C` the container will terminate. To run Cwtch in the background execute `docker run --name my-cwtch-server -d openpriv/cwtch-server:latest`. To get your Cwtch server address issue `docker logs my-cwtch-server`. |
|
|
|
|
|
|
|
The image creates 3 volumes, for /etc/cwtch, /etc/tor, /var/lib/tor |
|
|
|
|
|
|
|
##### Upgrading |
|
|
|
|
|
|
|
To upgrade with continuity |
|
|
|
|
|
|
|
``` |
|
|
|
# Stop current container/service |
|
|
|
docker stop my-cwtch-server |
|
|
|
|
|
|
|
docker pull openpriv/cwtch-server |
|
|
|
|
|
|
|
# Create a new container and copy the volumes (cwtch/onion keys, message store) |
|
|
|
docker create --name my-cwtch-server-2 --volumes-from my-cwtch-server openpriv/cwtch-server:latest |
|
|
|
|
|
|
|
# Resume service with the new container |
|
|
|
docker start my-cwtch-server-2 |
|
|
|
``` |
|
|
|
|
|
|
|
 |