]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - support/docker/production/docker-compose.yml
Remove traefik docker support
[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 env_file:
50 - .env
51 # If you provide your own webserver and reverse-proxy, otherwise not suitable for production:
52 #ports:
53 # - "80:9000" # serving HTTP
54 volumes:
55 - assets:/app/client/dist
56 - ./docker-volume/data:/data
57 - ./docker-volume/config:/config
58 depends_on:
59 - postgres
60 - redis
61 - postfix
62 restart: "always"
63
64 postgres:
65 image: postgres:13-alpine
66 env_file:
67 - .env
68 volumes:
69 - ./docker-volume/db:/var/lib/postgresql/data
70 restart: "always"
71
72 redis:
73 image: redis:6-alpine
74 volumes:
75 - ./docker-volume/redis:/data
76 restart: "always"
77
78 postfix:
79 image: mwader/postfix-relay
80 env_file:
81 - .env
82 volumes:
83 - ./docker-volume/opendkim/keys:/etc/opendkim/keys
84 restart: "always"
85
86 networks:
87 default:
88 ipam:
89 driver: default
90 config:
91 - subnet: 172.18.0.0/16
92
93 volumes:
94 assets:
95 certbot-www: