From e8395f027b6c3e3f757c740e35b20e76c51b03bd Mon Sep 17 00:00:00 2001 From: kaiyou Date: Mon, 29 Jan 2018 08:52:20 +0100 Subject: Add production Alpine and Debian Stretch Docker images (#225) * First pass at a (swarm-compatible) docker image Uses an existing traefik server as a https reverse proxy. * Add example config for a Docker swarm deployment * Point to traefik config for docker compose setup * Clarify that traefik is needed for the example config * Use node:8-stretch base image and don't install yarn (The base image already contains yarn.) * Initial commit for an Alpine Docker image * Fix docker volume path * Merge #213 and #225 and move files around * Remove unnecessary dependencies from the alpine build * Update Dockerfiles to match install path, config path, etc. * Update the configuration in the example compose file * Update the configuration in the example swarm file * Remove the declared networks and volumes from the compose example, which are not strictly required * Update attachment path in the documentation * Display traefik as a suggestion and not a required dependency * Update the Docker ignored files * Fix typos reported in #225 * Move production Dockerfiles to a production directory * Add the redis configuration settings * Add Docker files to the dockerignore * Make the signup limit configurable --- support/doc/production.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'support/doc/production.md') diff --git a/support/doc/production.md b/support/doc/production.md index c18b4ead0..ae7f3e0f6 100644 --- a/support/doc/production.md +++ b/support/doc/production.md @@ -315,3 +315,21 @@ $ OLD_VERSION="v0.42.42" && SQL_BACKUP_PATH="backup/sql-peertube_prod-2018-01-19 pg_restore -U peertube -c -d peertube_prod "$SQL_BACKUP_PATH" sudo systemctl restart peertube ``` + +## Installation on Docker Swarm + +There is an example configuration for deploying peertube and a postgres database as a Docker swarm stack. It works like this: + +(_Note_: You need to make sure to set `traefik` and `peertube` labels on the target node(s) for this configuration to work.) + +1. Install a traefik loadbalancer stack (including Let's Encrypt) on your docker swarm. [Here](https://gist.github.com/djmaze/2684fbf147d775c8ee441b4302554823) is an example configuration. + +2. Copy the [example stack file](support/docker/production/docker-stack.example.yml) for peertube: + + scp support/docker/production/docker-stack.example.yml root@your-server:/path/to/your/swarm-config/peertube.yml + +2. Have a look at the file and adjust the variables to your need. + +3. Deploy the stack: + + docker stack deploy -c peertube.yml peertube -- cgit v1.2.3