]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - support/docker/production/docker-compose.yml
move traefik to its own override file
[github/Chocobozzz/PeerTube.git] / support / docker / production / docker-compose.yml
1 version: "3.3"
2
3 services:
4
5 # The webserver is not required, but recommended since a lot of optimizations went to its
6 # nginx configuration file. It runs the default nginx configuration without HTTPS nor SSL,
7 # so use it in production in tandem with an SSL-terminating reverse-proxy.
8 webserver:
9 build:
10 context: .
11 dockerfile: Dockerfile.nginx
12 env_file:
13 - .env
14 # If you provide your own reverse-proxy, otherwise not suitable for production:
15 #ports:
16 # - "9000:80" # serving HTTP
17 volumes:
18 - type: bind
19 # Switch sources if you downloaded the nginx configuration without the whole repository
20 #source: ./peertube
21 source: ../../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 depends_on:
26 - peertube
27 restart: "always"
28
29 peertube:
30 # If you don't want to use the official image and build one from sources:
31 #build:
32 # context: .
33 # dockerfile: ./support/docker/production/Dockerfile.buster
34 image: chocobozzz/peertube:production-buster
35 env_file:
36 - .env
37 # If you provide your own webserver and reverse-proxy, otherwise not suitable for production:
38 #ports:
39 # - "80:9000" # serving HTTP
40 volumes:
41 - assets:/app/client/dist
42 - ./docker-volume/data:/data
43 - ./docker-volume/config:/config
44 depends_on:
45 - postgres
46 - redis
47 - postfix
48 restart: "always"
49
50 postgres:
51 image: postgres:10-alpine
52 env_file:
53 - .env
54 volumes:
55 - ./docker-volume/db:/var/lib/postgresql/data
56 restart: "always"
57
58 redis:
59 image: redis:5-alpine
60 volumes:
61 - ./docker-volume/redis:/data
62 restart: "always"
63
64 postfix:
65 image: mwader/postfix-relay
66 env_file:
67 - .env
68 volumes:
69 - ./docker-volume/opendkim/keys:/etc/opendkim/keys
70 restart: "always"
71
72 networks:
73 default:
74 ipam:
75 driver: default
76 config:
77 - subnet: 172.18.0.0/16
78
79 volumes:
80 assets: