]>
Commit | Line | Data |
---|---|---|
1 | version: "3.3" | |
2 | ||
3 | services: | |
4 | ||
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. | |
7 | reverse-proxy: | |
8 | image: traefik:v1.7 | |
9 | network_mode: "host" | |
10 | command: | |
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 | |
14 | ports: | |
15 | - "80:80" # The HTTP port | |
16 | - "443:443" # The HTTPS port | |
17 | volumes: | |
18 | - /var/run/docker.sock:/var/run/docker.sock # So that Træfik can listen to the Docker events | |
19 | - ./docker-volume/traefik/acme.json:/etc/acme.json | |
20 | - ./docker-volume/traefik/traefik.toml:/traefik.toml | |
21 | restart: "always" | |
22 | ||
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 | |
30 | env_file: | |
31 | - .env | |
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" | |
46 | labels: | |
47 | traefik.enable: "true" | |
48 | traefik.frontend.rule: "Host:${PEERTUBE_WEBSERVER_HOSTNAME}" | |
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" | |
62 | volumes: | |
63 | - assets:/app/client/dist | |
64 | - ./docker-volume/data:/data | |
65 | - ./docker-volume/config:/config | |
66 | depends_on: | |
67 | - postgres | |
68 | - redis | |
69 | - postfix | |
70 | restart: "always" | |
71 | labels: | |
72 | traefik.enable: "false" | |
73 | ||
74 | postgres: | |
75 | image: postgres:10-alpine | |
76 | env_file: | |
77 | - .env | |
78 | volumes: | |
79 | - ./docker-volume/db:/var/lib/postgresql/data | |
80 | restart: "always" | |
81 | labels: | |
82 | traefik.enable: "false" | |
83 | ||
84 | redis: | |
85 | image: redis:5-alpine | |
86 | volumes: | |
87 | - ./docker-volume/redis:/data | |
88 | restart: "always" | |
89 | labels: | |
90 | traefik.enable: "false" | |
91 | ||
92 | postfix: | |
93 | image: mwader/postfix-relay | |
94 | env_file: | |
95 | - .env | |
96 | volumes: | |
97 | - ./docker-volume/opendkim/keys:/etc/opendkim/keys | |
98 | labels: | |
99 | traefik.enable: "false" | |
100 | restart: "always" | |
101 | ||
102 | networks: | |
103 | default: | |
104 | ipam: | |
105 | driver: default | |
106 | config: | |
107 | - subnet: 172.18.0.0/16 | |
108 | ||
109 | volumes: | |
110 | assets: |