]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - support/docker/production/docker-compose.yml
Chore/docker-documentation-improvements (#2494)
[github/Chocobozzz/PeerTube.git] / support / docker / production / docker-compose.yml
CommitLineData
e8395f02 1version: "3.3"
2
3services:
e8395f02 4
b44a9630 5 reverse-proxy:
f1b38883 6 image: traefik:v1.7
f2e0cca9 7 network_mode: "host"
e962e1c3
K
8 command:
9 - "--docker" # Tells Træfik to listen to docker
10 - "--acme.email=${TRAEFIK_ACME_EMAIL}" # Let's Encrypt ACME email
11 - "--acme.domains=${TRAEFIK_ACME_DOMAINS}" # Let's Encrypt ACME domain list
b44a9630
C
12 ports:
13 - "80:80" # The HTTP port
14 - "443:443" # The HTTPS port
b44a9630
C
15 volumes:
16 - /var/run/docker.sock:/var/run/docker.sock # So that Traefik can listen to the Docker events
17 - ./docker-volume/traefik/acme.json:/etc/acme.json
18 - ./docker-volume/traefik/traefik.toml:/traefik.toml
19 restart: "always"
f2e0cca9 20 # If you want to use the Traefik dashboard, you should expose it on a
fef13f14
FA
21 # subdomain with HTTPS and authentification:
22 # https://medium.com/@xavier.priour/secure-traefik-dashboard-with-https-and-password-in-docker-5b657e2aa15f
23 # https://github.com/containous/traefik/issues/880#issuecomment-310301168
b44a9630 24
ef48a0d5 25 peertube:
13a6b536
C
26 # If you don't want to use the official image and build one from sources
27 # build:
28 # context: .
c82bf36a
C
29 # dockerfile: ./support/docker/production/Dockerfile.buster
30 image: chocobozzz/peertube:production-buster
08c11bec
C
31 env_file:
32 - .env
e8395f02 33 # Traefik labels are suggested as an example for people using Traefik,
34 # remove them if you are using another reverse proxy.
35 labels:
36 traefik.enable: "true"
fd5e57bb 37 traefik.frontend.rule: "Host:${PEERTUBE_WEBSERVER_HOSTNAME}"
e8395f02 38 traefik.port: "9000"
4aeb67a5
C
39 # If you don't want to use a reverse proxy (not suitable for production!)
40 # ports:
41 # - "80:9000"
e8395f02 42 volumes:
fd5e57bb
C
43 - ./docker-volume/data:/data
44 - ./docker-volume/config:/config
e8395f02 45 depends_on:
ef48a0d5
BB
46 - postgres
47 - redis
fef13f14 48 - postfix
ef48a0d5 49 restart: "always"
e8395f02 50
ef48a0d5 51 postgres:
0c49373a 52 image: postgres:10-alpine
e2882b2c
L
53 env_file:
54 - .env
e8395f02 55 volumes:
fd5e57bb 56 - ./docker-volume/db:/var/lib/postgresql/data
ef48a0d5 57 restart: "always"
b44a9630
C
58 labels:
59 traefik.enable: "false"
ef48a0d5
BB
60
61 redis:
0c49373a 62 image: redis:4-alpine
ef48a0d5 63 volumes:
fd5e57bb 64 - ./docker-volume/redis:/data
ef48a0d5 65 restart: "always"
b44a9630 66 labels:
f83e339b 67 traefik.enable: "false"
fef13f14
FA
68
69 postfix:
70 image: mwader/postfix-relay
e2882b2c
L
71 env_file:
72 - .env
fef13f14
FA
73 labels:
74 traefik.enable: "false"
75 restart: "always"
1bab2bbc
FA
76
77networks:
78 default:
79 ipam:
80 driver: default
81 config:
82 - subnet: 172.18.0.0/16