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
This commit is contained in:
Thomas Gläßle 2017-04-08 12:40:54 +02:00
parent bb256b8027
commit 074f27237f
1 changed files with 15 additions and 15 deletions

View File

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