]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - support/docker/production/docker-compose.yml
Merge branch 'develop' into pr/1285
[github/Chocobozzz/PeerTube.git] / support / docker / production / docker-compose.yml
1 version: "3.3"
2
3 services:
4
5 reverse-proxy:
6 image: traefik
7 command: --docker # Tells Træfik to listen to docker
8 ports:
9 - "80:80" # The HTTP port
10 - "443:443" # The HTTPS port
11 volumes:
12 - /var/run/docker.sock:/var/run/docker.sock # So that Traefik can listen to the Docker events
13 - ./docker-volume/traefik/acme.json:/etc/acme.json
14 - ./docker-volume/traefik/traefik.toml:/traefik.toml
15 restart: "always"
16 # If you want to use the Traefik dashboard, you should expose it on a
17 # subdomain with HTTPS and authentification:
18 # https://medium.com/@xavier.priour/secure-traefik-dashboard-with-https-and-password-in-docker-5b657e2aa15f
19 # https://github.com/containous/traefik/issues/880#issuecomment-310301168
20
21 peertube:
22 # If you don't want to use the official image and build one from sources
23 # build:
24 # context: .
25 # dockerfile: ./support/docker/production/Dockerfile.stretch
26 image: chocobozzz/peertube:production-stretch
27 env_file:
28 - .env
29 # Traefik labels are suggested as an example for people using Traefik,
30 # remove them if you are using another reverse proxy.
31 labels:
32 traefik.enable: "true"
33 traefik.frontend.rule: "Host:${PEERTUBE_WEBSERVER_HOSTNAME}"
34 traefik.port: "9000"
35 # If you don't want to use a reverse proxy (not suitable for production!)
36 # ports:
37 # - "80:9000"
38 volumes:
39 - ./docker-volume/data:/data
40 - ./docker-volume/config:/config
41 depends_on:
42 - postgres
43 - redis
44 - postfix
45 restart: "always"
46
47 postgres:
48 image: postgres:10-alpine
49 environment:
50 POSTGRES_USER: ${PEERTUBE_DB_USERNAME}
51 POSTGRES_PASSWORD: ${PEERTUBE_DB_PASSWORD}
52 POSTGRES_DB: peertube
53 volumes:
54 - ./docker-volume/db:/var/lib/postgresql/data
55 restart: "always"
56 labels:
57 traefik.enable: "false"
58
59 redis:
60 image: redis:4-alpine
61 volumes:
62 - ./docker-volume/redis:/data
63 restart: "always"
64 labels:
65 traefik.enable: "false"
66
67 postfix:
68 image: mwader/postfix-relay
69 environment:
70 - POSTFIX_myhostname=${PEERTUBE_WEBSERVER_HOSTNAME}
71 labels:
72 traefik.enable: "false"
73 restart: "always"