From 074f27237f02a5aa0f294cdc53ce84d99f025f6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Gl=C3=A4=C3=9Fle?= Date: Sat, 8 Apr 2017 12:40:54 +0200 Subject: [PATCH] Improve docker-related documentation - install/usage should be at the top, it's the most relevant info for typical users - docker call was missing `run` argument - added `--restart=always` to run it as a service - change default data directory. I think it's bad advice keeping data cluttered all over your file-system in some git repositories that one may want to delete later on --- cryptpad-docker.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/cryptpad-docker.md b/cryptpad-docker.md index 1beb2412d..d329f0354 100644 --- a/cryptpad-docker.md +++ b/cryptpad-docker.md @@ -7,6 +7,21 @@ - Adding config.js to customize folder - Persistance for datastore and customize folder +## Run + +Run from the cryptpad source directory: + +``` +docker build -t xwiki/cryptpad . +docker run --restart=always -d --name cryptpad -p 3000:3000 -v /var/cryptpad:/cryptpad/datastore xwiki/cryptpad +``` + +Or, using docker-compose + +``` +docker-compose up -d +``` + ## TODO ``` @@ -28,21 +43,6 @@ Set configurations Dockerfile or in .env (using docker-compose) file. The .env variables are read by docker-compose and forwarded to docker container. On runtime, in `bin/container-start.sh` the settings are written to the `config.js` file. -## Run - -With docker - -``` -docker build -t xwiki/cryptpad . -docker -d --name cryptpad -p 3000:3000 -v ${PWD}/data:/cryptpad/datastore xwiki/cryptpad -``` - -With docker-compose - -``` -docker-compose up -d -``` - ## Persistance