]>
Commit | Line | Data |
---|---|---|
e8395f02 | 1 | version: "3.3" |
2 | ||
3 | services: | |
e8395f02 | 4 | |
1a9b141d RK |
5 | # The reverse-proxy only does SSL termination and automatic certificate generation. You can |
6 | # replace it with any other reverse-proxy, in which case you can remove 'traefik.*' labels. | |
b44a9630 | 7 | reverse-proxy: |
f1b38883 | 8 | image: traefik:v1.7 |
f2e0cca9 | 9 | network_mode: "host" |
e962e1c3 | 10 | command: |
1a9b141d RK |
11 | - "--docker" # Tells Træfik to listen to docker |
12 | - "--acme.email=${TRAEFIK_ACME_EMAIL}" # Let's Encrypt ACME email | |
13 | - "--acme.domains=${TRAEFIK_ACME_DOMAINS}" # Let's Encrypt ACME domain list | |
b44a9630 | 14 | ports: |
1a9b141d RK |
15 | - "80:80" # The HTTP port |
16 | - "443:443" # The HTTPS port | |
b44a9630 | 17 | volumes: |
1a9b141d | 18 | - /var/run/docker.sock:/var/run/docker.sock # So that Træfik can listen to the Docker events |
b44a9630 C |
19 | - ./docker-volume/traefik/acme.json:/etc/acme.json |
20 | - ./docker-volume/traefik/traefik.toml:/traefik.toml | |
21 | restart: "always" | |
22 | ||
1a9b141d RK |
23 | # The webserver is not required, but recommended since a lot of optimizations went to its |
24 | # nginx configuration file. It runs the default nginx configuration without HTTPS nor SSL, | |
25 | # so use it in production in tandem with an SSL-terminating reverse-proxy like above. | |
26 | webserver: | |
27 | build: | |
28 | context: . | |
29 | dockerfile: Dockerfile.nginx | |
08c11bec C |
30 | env_file: |
31 | - .env | |
1a9b141d RK |
32 | # If you provide your own reverse-proxy, otherwise not suitable for production: |
33 | #ports: | |
34 | # - "80:80" | |
35 | volumes: | |
36 | - type: bind | |
37 | # Switch sources if you downloaded the nginx configuration without the whole repository | |
38 | #source: ./peertube | |
39 | source: ../../nginx/peertube | |
40 | target: /etc/nginx/conf.d/peertube.template | |
41 | - assets:/var/www/peertube/peertube-latest/client/dist:ro | |
42 | - ./docker-volume/data:/var/www/peertube/storage | |
43 | depends_on: | |
44 | - peertube | |
45 | restart: "always" | |
e8395f02 | 46 | labels: |
47 | traefik.enable: "true" | |
fd5e57bb | 48 | traefik.frontend.rule: "Host:${PEERTUBE_WEBSERVER_HOSTNAME}" |
1a9b141d RK |
49 | traefik.port: "80" |
50 | ||
51 | peertube: | |
52 | # If you don't want to use the official image and build one from sources: | |
53 | #build: | |
54 | # context: . | |
55 | # dockerfile: ./support/docker/production/Dockerfile.buster | |
56 | image: chocobozzz/peertube:production-buster | |
57 | env_file: | |
58 | - .env | |
59 | # If you provide your own webserver and reverse-proxy, otherwise not suitable for production: | |
60 | #ports: | |
61 | # - "80:9000" | |
e8395f02 | 62 | volumes: |
1a9b141d | 63 | - assets:/app/client/dist |
fd5e57bb C |
64 | - ./docker-volume/data:/data |
65 | - ./docker-volume/config:/config | |
e8395f02 | 66 | depends_on: |
ef48a0d5 BB |
67 | - postgres |
68 | - redis | |
fef13f14 | 69 | - postfix |
ef48a0d5 | 70 | restart: "always" |
e8395f02 | 71 | |
ef48a0d5 | 72 | postgres: |
e604efcb | 73 | image: postgres:12-alpine |
e2882b2c L |
74 | env_file: |
75 | - .env | |
e8395f02 | 76 | volumes: |
fd5e57bb | 77 | - ./docker-volume/db:/var/lib/postgresql/data |
ef48a0d5 BB |
78 | restart: "always" |
79 | ||
80 | redis: | |
1a9b141d | 81 | image: redis:5-alpine |
ef48a0d5 | 82 | volumes: |
fd5e57bb | 83 | - ./docker-volume/redis:/data |
ef48a0d5 | 84 | restart: "always" |
fef13f14 FA |
85 | |
86 | postfix: | |
87 | image: mwader/postfix-relay | |
e2882b2c L |
88 | env_file: |
89 | - .env | |
cd7ec86f | 90 | volumes: |
91 | - ./docker-volume/opendkim/keys:/etc/opendkim/keys | |
fef13f14 | 92 | restart: "always" |
1bab2bbc FA |
93 | |
94 | networks: | |
95 | default: | |
96 | ipam: | |
97 | driver: default | |
98 | config: | |
99 | - subnet: 172.18.0.0/16 | |
1a9b141d RK |
100 | |
101 | volumes: | |
102 | assets: |