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