]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - support/docker/production/docker-compose.yml
Update translations
[github/Chocobozzz/PeerTube.git] / support / docker / production / docker-compose.yml
CommitLineData
e8395f02 1version: "3.3"
2
3services:
e8395f02 4
b1053a30 5 # You can comment this webserver section if you want to use another webserver/proxy or test PeerTube in local
1a9b141d 6 webserver:
afd4ee86
C
7 image: chocobozzz/peertube-webserver:latest
8 # If you don't want to use the official image and build one from sources:
9 # build:
10 # context: .
11 # dockerfile: Dockerfile.nginx
08c11bec
C
12 env_file:
13 - .env
afd4ee86
C
14 ports:
15 - "80:80"
16 - "443:443"
1a9b141d
RK
17 volumes:
18 - type: bind
a30995fc
RK
19 # Switch sources if you downloaded the whole repository
20 #source: ../../nginx/peertube
21 source: ./docker-volume/nginx/peertube
1a9b141d
RK
22 target: /etc/nginx/conf.d/peertube.template
23 - assets:/var/www/peertube/peertube-latest/client/dist:ro
24 - ./docker-volume/data:/var/www/peertube/storage
afd4ee86
C
25 - certbot-www:/var/www/certbot
26 - ./docker-volume/certbot/conf:/etc/letsencrypt
1a9b141d
RK
27 depends_on:
28 - peertube
29 restart: "always"
1a9b141d 30
b1053a30 31 # You can comment this certbot section if you want to use another webserver/proxy or test PeerTube in local
afd4ee86
C
32 certbot:
33 container_name: certbot
34 image: certbot/certbot
35 volumes:
36 - ./docker-volume/certbot/conf:/etc/letsencrypt
37 - certbot-www:/var/www/certbot
38 restart: unless-stopped
39 entrypoint: /bin/sh -c "trap exit TERM; while :; do certbot renew --webroot -w /var/www/certbot; sleep 12h & wait $${!}; done;"
40 depends_on:
41 - webserver
42
1a9b141d
RK
43 peertube:
44 # If you don't want to use the official image and build one from sources:
afd4ee86
C
45 # build:
46 # context: .
1606ac20
C
47 # dockerfile: ./support/docker/production/Dockerfile.bullseye
48 image: chocobozzz/peertube:production-bullseye
0a0e0d08
C
49 # Use a static IP for this container because nginx does not handle proxy host change without reload
50 # This container could be restarted on crash or until the postgresql database is ready for connection
51 networks:
52 default:
53 ipv4_address: 172.18.0.42
1a9b141d
RK
54 env_file:
55 - .env
a4614183
C
56
57 ports:
b1053a30
C
58 - "1935:1935" # Comment if you don't want to use the live feature
59 # - "9000:9000" # Uncomment if you use another webserver/proxy or test PeerTube in local, otherwise not suitable for production
e8395f02 60 volumes:
1a9b141d 61 - assets:/app/client/dist
fd5e57bb
C
62 - ./docker-volume/data:/data
63 - ./docker-volume/config:/config
e8395f02 64 depends_on:
ef48a0d5
BB
65 - postgres
66 - redis
fef13f14 67 - postfix
ef48a0d5 68 restart: "always"
e8395f02 69
ef48a0d5 70 postgres:
a30995fc 71 image: postgres:13-alpine
e2882b2c
L
72 env_file:
73 - .env
e8395f02 74 volumes:
fd5e57bb 75 - ./docker-volume/db:/var/lib/postgresql/data
ef48a0d5
BB
76 restart: "always"
77
78 redis:
a30995fc 79 image: redis:6-alpine
ef48a0d5 80 volumes:
fd5e57bb 81 - ./docker-volume/redis:/data
ef48a0d5 82 restart: "always"
fef13f14
FA
83
84 postfix:
85 image: mwader/postfix-relay
e2882b2c
L
86 env_file:
87 - .env
cd7ec86f 88 volumes:
89 - ./docker-volume/opendkim/keys:/etc/opendkim/keys
fef13f14 90 restart: "always"
1bab2bbc
FA
91
92networks:
93 default:
94 ipam:
95 driver: default
96 config:
b8f3e6b0 97 - subnet: 172.18.0.0/16
1a9b141d
RK
98
99volumes:
100 assets:
afd4ee86 101 certbot-www: