diff options
author | kaiyou <pierre@jaury.eu> | 2018-01-29 08:52:20 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-01-29 08:52:20 +0100 |
commit | e8395f027b6c3e3f757c740e35b20e76c51b03bd (patch) | |
tree | ee0e761357b7407b6992600342306669de880689 /support/docker/production/swarm-stack.sample.yml | |
parent | 8dfd8fd7ca376e7898c912bb985a7a4a997cd966 (diff) | |
download | PeerTube-e8395f027b6c3e3f757c740e35b20e76c51b03bd.tar.gz PeerTube-e8395f027b6c3e3f757c740e35b20e76c51b03bd.tar.zst PeerTube-e8395f027b6c3e3f757c740e35b20e76c51b03bd.zip |
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
Diffstat (limited to 'support/docker/production/swarm-stack.sample.yml')
-rw-r--r-- | support/docker/production/swarm-stack.sample.yml | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/support/docker/production/swarm-stack.sample.yml b/support/docker/production/swarm-stack.sample.yml new file mode 100644 index 000000000..794f44753 --- /dev/null +++ b/support/docker/production/swarm-stack.sample.yml | |||
@@ -0,0 +1,52 @@ | |||
1 | version: "3.3" | ||
2 | |||
3 | services: | ||
4 | app: | ||
5 | image: peertube:stretch | ||
6 | environment: | ||
7 | PEERTUBE_HOSTNAME: my.domain.tld | ||
8 | PEERTUBE_PORT: 443 | ||
9 | PEERTUBE_HTTPS: true | ||
10 | PEERTUBE_ADMIN_EMAIL: admin@domain.tld | ||
11 | PEERTUBE_DB_USERNAME: user | ||
12 | PEERTUBE_DB_PASSWORD: password | ||
13 | PEERTUBE_SIGNUP_ENABLED: true | ||
14 | PEERTUBE_TRANSCODING_ENABLED: true | ||
15 | labels: &labels | ||
16 | traefik.frontend.rule: "Host:my.domain.tld" | ||
17 | traefik.docker.network: traefik | ||
18 | traefik.port: "9000" | ||
19 | volumes: | ||
20 | - app_data:/usr/src/app/data | ||
21 | networks: | ||
22 | - traefik | ||
23 | - backend | ||
24 | depends_on: | ||
25 | - db | ||
26 | deploy: | ||
27 | labels: *labels | ||
28 | placement: | ||
29 | constraints: | ||
30 | - node.labels.peertube == 1 | ||
31 | |||
32 | db: | ||
33 | image: postgres:10 | ||
34 | environment: | ||
35 | POSTGRES_DB: peertube_prod | ||
36 | volumes: | ||
37 | - db_data:/var/lib/postgresql/data | ||
38 | networks: | ||
39 | - backend | ||
40 | deploy: | ||
41 | placement: | ||
42 | constraints: | ||
43 | - node.labels.peertube == 1 | ||
44 | |||
45 | volumes: | ||
46 | app_data: | ||
47 | db_data: | ||
48 | |||
49 | networks: | ||
50 | backend: | ||
51 | traefik: | ||
52 | external: true | ||