aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/docker/production/docker-compose.yml
diff options
context:
space:
mode:
Diffstat (limited to 'support/docker/production/docker-compose.yml')
-rw-r--r--support/docker/production/docker-compose.yml40
1 files changed, 27 insertions, 13 deletions
diff --git a/support/docker/production/docker-compose.yml b/support/docker/production/docker-compose.yml
index bce9426d2..4ad1a8756 100644
--- a/support/docker/production/docker-compose.yml
+++ b/support/docker/production/docker-compose.yml
@@ -2,19 +2,18 @@ version: "3.3"
2 2
3services: 3services:
4 4
5 # The webserver is not required, but recommended since a lot of optimizations went to its 5 # You can comment this webserver section if you want to use another webserver/proxy
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: 6 webserver:
9 image: chocobozzz/peertube:webserver 7 image: chocobozzz/peertube-webserver:latest
10 build: 8 # If you don't want to use the official image and build one from sources:
11 context: . 9 # build:
12 dockerfile: Dockerfile.nginx 10 # context: .
11 # dockerfile: Dockerfile.nginx
13 env_file: 12 env_file:
14 - .env 13 - .env
15 # If you provide your own reverse-proxy, otherwise not suitable for production: 14 ports:
16 #ports: 15 - "80:80"
17 # - "9000:80" # serving HTTP 16 - "443:443"
18 volumes: 17 volumes:
19 - type: bind 18 - type: bind
20 # Switch sources if you downloaded the whole repository 19 # Switch sources if you downloaded the whole repository
@@ -23,15 +22,29 @@ services:
23 target: /etc/nginx/conf.d/peertube.template 22 target: /etc/nginx/conf.d/peertube.template
24 - assets:/var/www/peertube/peertube-latest/client/dist:ro 23 - assets:/var/www/peertube/peertube-latest/client/dist:ro
25 - ./docker-volume/data:/var/www/peertube/storage 24 - ./docker-volume/data:/var/www/peertube/storage
25 - certbot-www:/var/www/certbot
26 - ./docker-volume/certbot/conf:/etc/letsencrypt
26 depends_on: 27 depends_on:
27 - peertube 28 - peertube
28 restart: "always" 29 restart: "always"
29 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
30 peertube: 43 peertube:
31 # If you don't want to use the official image and build one from sources: 44 # If you don't want to use the official image and build one from sources:
32 #build: 45 # build:
33 # context: . 46 # context: .
34 # dockerfile: ./support/docker/production/Dockerfile.buster 47 # dockerfile: ./support/docker/production/Dockerfile.buster
35 image: chocobozzz/peertube:production-buster 48 image: chocobozzz/peertube:production-buster
36 env_file: 49 env_file:
37 - .env 50 - .env
@@ -79,3 +92,4 @@ networks:
79 92
80volumes: 93volumes:
81 assets: 94 assets:
95 certbot-www: