]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - support/docker/production/docker-compose.yml
Allow SSL database parameter (#4114)
[github/Chocobozzz/PeerTube.git] / support / docker / production / docker-compose.yml
1 version: "3.3"
2
3 services:
4
5 # You can comment this webserver section if you want to use another webserver/proxy
6 webserver:
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
12 env_file:
13 - .env
14 ports:
15 - "80:80"
16 - "443:443"
17 volumes:
18 - type: bind
19 # Switch sources if you downloaded the whole repository
20 #source: ../../nginx/peertube
21 source: ./docker-volume/nginx/peertube
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
25 - certbot-www:/var/www/certbot
26 - ./docker-volume/certbot/conf:/etc/letsencrypt
27 depends_on:
28 - peertube
29 restart: "always"
30
31 # You can comment this certbot section if you want to use another webserver/proxy
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
43 peertube:
44 # If you don't want to use the official image and build one from sources:
45 # build:
46 # context: .
47 # dockerfile: ./support/docker/production/Dockerfile.buster
48 image: chocobozzz/peertube:production-buster
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
54 env_file:
55 - .env
56
57 ports:
58 - "1935:1935" # If you don't want to use the live feature, you can comment this line
59 # - "9000:9000" # If you provide your own webserver and reverse-proxy, otherwise not suitable for production
60 volumes:
61 - assets:/app/client/dist
62 - ./docker-volume/data:/data
63 - ./docker-volume/config:/config
64 depends_on:
65 - postgres
66 - redis
67 - postfix
68 restart: "always"
69
70 postgres:
71 image: postgres:13-alpine
72 env_file:
73 - .env
74 volumes:
75 - ./docker-volume/db:/var/lib/postgresql/data
76 restart: "always"
77
78 redis:
79 image: redis:6-alpine
80 volumes:
81 - ./docker-volume/redis:/data
82 restart: "always"
83
84 postfix:
85 image: mwader/postfix-relay
86 env_file:
87 - .env
88 volumes:
89 - ./docker-volume/opendkim/keys:/etc/opendkim/keys
90 restart: "always"
91
92 networks:
93 default:
94 ipam:
95 driver: default
96 config:
97 - subnet: 172.18.0.0/16
98
99 volumes:
100 assets:
101 certbot-www: