Merge pull request #305 from interfect/patch-1

Update documentation for Docker usage
pull/1/head
ansuz 6 years ago committed by GitHub
commit 9eaa03092f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -21,3 +21,8 @@ services:
volumes: volumes:
- ./data/files:/cryptpad/datastore:rw - ./data/files:/cryptpad/datastore:rw
- ./data/customize:/cryptpad/customize:rw - ./data/customize:/cryptpad/customize:rw
- ./data/pins:/cryptpad/pins:rw
- ./data/blob:/cryptpad/blob:rw
- ./data/blobstage:/cryptpad/blobstage:rw
- ./data/tasks:/cryptpad/tasks:rw
- ./data/block:/cryptpad/block:rw

@ -1,5 +1,11 @@
# Cryptpad Docker Image # Cryptpad Docker Image
Cryptpad includes support for building a Docker image and running it to provide a Cryptpad instance. You can manage the container manually, or let Docker Compose manage it for you.
A full tutorial is available [on the Cryptpad Github wiki](https://github.com/xwiki-labs/cryptpad/wiki/Docker-(with-Nginx-and-Traefik)). This document provides a brief overview.
## Features
- Configuration via .env file - Configuration via .env file
- Ready for use with traffic - Ready for use with traffic
- Using github master for now, release 0.3.0 too old - Using github master for now, release 0.3.0 too old
@ -9,14 +15,22 @@
## Run ## Run
Run from the cryptpad source directory: Run from the cryptpad source directory, keeping instance state in `/var/cryptpad`:
``` ```
docker build -t xwiki/cryptpad . docker build -t xwiki/cryptpad .
docker run --restart=always -d --name cryptpad -p 3000:3000 -v /var/cryptpad:/cryptpad/datastore xwiki/cryptpad docker run --restart=always -d --name cryptpad -p 3000:3000 \
-v /var/cryptpad/files:/cryptpad/datastore \
-v /var/cryptpad/customize:/cryptpad/customize
-v /var/cryptpad/blob:/cryptpad/blob \
-v /var/cryptpad/blobstage:/cryptpad/blobstage \
-v /var/cryptpad/pins:/cryptpad/pins \
-v /var/cryptpad/tasks:/cryptpad/tasks \
-v /var/cryptpad/block:/cryptpad/block \
xwiki/cryptpad
``` ```
Or, using docker-compose Or, using docker-compose and the included `docker-compose.yml`, keeping instance state in the current directory under `./data`:
``` ```
docker-compose up -d docker-compose up -d
@ -39,10 +53,15 @@ On runtime, in `bin/container-start.sh` the settings are written to the `config.
The docker-compose file is preconfigured to persist folders The docker-compose file is preconfigured to persist folders
- cryptpad/datastore --> ./data/customize - cryptpad/datastore --> ./data/files
- cryptpad/customize --> ./data/customize - cryptpad/customize --> ./data/customize
- cryptpad/pins --> ./data/pins
- cryptpad/blob --> ./data/blob
- cryptpad/blobstage --> ./data/blobstage
- cryptpad/tasks --> ./data/tasks
- cryptpad/block --> ./data/block
In customize included find your configuration in `config.js`. Your configuration file will be in `./data/customize/config.js`.
The data folder is ignored by git, so if you want to add your customizations to git versioning change the volume: The data folder is ignored by git, so if you want to add your customizations to git versioning change the volume:

Loading…
Cancel
Save