]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - support/docker/production/docker-compose.yml
Add argument to dockerfile to pass options to npm run build
[github/Chocobozzz/PeerTube.git] / support / docker / production / docker-compose.yml
CommitLineData
e8395f02 1version: "3.3"
2
3services:
e8395f02 4
b44a9630
C
5 reverse-proxy:
6 image: traefik
fef13f14 7 command: --docker # Tells Træfik to listen to docker
b44a9630
C
8 ports:
9 - "80:80" # The HTTP port
10 - "443:443" # The HTTPS port
b44a9630
C
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"
fef13f14
FA
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
b44a9630 20
ef48a0d5 21 peertube:
13a6b536
C
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
779f0000 26 image: chocobozzz/peertube:production-stretch
08c11bec
C
27 env_file:
28 - .env
e8395f02 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"
fd5e57bb 33 traefik.frontend.rule: "Host:${PEERTUBE_WEBSERVER_HOSTNAME}"
e8395f02 34 traefik.port: "9000"
4aeb67a5
C
35 # If you don't want to use a reverse proxy (not suitable for production!)
36 # ports:
37 # - "80:9000"
e8395f02 38 volumes:
fd5e57bb
C
39 - ./docker-volume/data:/data
40 - ./docker-volume/config:/config
e8395f02 41 depends_on:
ef48a0d5
BB
42 - postgres
43 - redis
fef13f14 44 - postfix
ef48a0d5 45 restart: "always"
e8395f02 46
ef48a0d5 47 postgres:
0c49373a 48 image: postgres:10-alpine
e8395f02 49 environment:
08c11bec
C
50 POSTGRES_USER: ${PEERTUBE_DB_USERNAME}
51 POSTGRES_PASSWORD: ${PEERTUBE_DB_PASSWORD}
ef48a0d5 52 POSTGRES_DB: peertube
e8395f02 53 volumes:
fd5e57bb 54 - ./docker-volume/db:/var/lib/postgresql/data
ef48a0d5 55 restart: "always"
b44a9630
C
56 labels:
57 traefik.enable: "false"
ef48a0d5
BB
58
59 redis:
0c49373a 60 image: redis:4-alpine
ef48a0d5 61 volumes:
fd5e57bb 62 - ./docker-volume/redis:/data
ef48a0d5 63 restart: "always"
b44a9630 64 labels:
f83e339b 65 traefik.enable: "false"
fef13f14
FA
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"