]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - support/docker/production/docker-compose.yml
Try to reduce docker image size
[github/Chocobozzz/PeerTube.git] / support / docker / production / docker-compose.yml
1 version: "3.3"
2
3 services:
4
5 reverse-proxy:
6 image: traefik
7 command: --api --docker # Enables the web UI and tells Træfik to listen to docker
8 ports:
9 - "80:80" # The HTTP port
10 - "443:443" # The HTTPS port
11 - "8080:8080" # The Web UI (enabled by --api)
12 volumes:
13 - /var/run/docker.sock:/var/run/docker.sock # So that Traefik can listen to the Docker events
14 - ./docker-volume/traefik/acme.json:/etc/acme.json
15 - ./docker-volume/traefik/traefik.toml:/traefik.toml
16 restart: "always"
17
18 peertube:
19 # If you don't want to use the official image and build one from sources
20 # build:
21 # context: .
22 # dockerfile: ./support/docker/production/Dockerfile.stretch
23 image: chocobozzz/peertube:production-stretch
24 environment:
25 PEERTUBE_WEBSERVER_HOSTNAME: ${PEERTUBE_WEBSERVER_HOSTNAME}
26 PEERTUBE_WEBSERVER_PORT: ${PEERTUBE_WEBSERVER_PORT}
27 PEERTUBE_WEBSERVER_HTTPS: ${PEERTUBE_WEBSERVER_HTTPS}
28 PEERTUBE_DB_HOSTNAME: postgres
29 PEERTUBE_DB_USERNAME: ${DB_USERNAME}
30 PEERTUBE_DB_PASSWORD: ${DB_PASSWORD}
31 PEERTUBE_REDIS_HOSTNAME: redis
32 PEERTUBE_SMTP_USERNAME: ${PEERTUBE_SMTP_USERNAME}
33 PEERTUBE_SMTP_PASSWORD: ${PEERTUBE_SMTP_PASSWORD}
34 PEERTUBE_SMTP_HOSTNAME: ${PEERTUBE_SMTP_HOSTNAME}
35 PEERTUBE_SMTP_PORT: ${PEERTUBE_SMTP_PORT}
36 PEERTUBE_SMTP_FROM: ${PEERTUBE_SMTP_FROM}
37 PEERTUBE_SMTP_TLS: ${PEERTUBE_SMTP_TLS}
38 PEERTUBE_SMTP_DISABLE_STARTTLS: ${PEERTUBE_SMTP_DISABLE_STARTTLS}
39 PEERTUBE_ADMIN_EMAIL: ${PEERTUBE_ADMIN_EMAIL}
40 # /!\ Prefer to use the PeerTube admin interface to set the following configurations /!\
41 # PEERTUBE_SIGNUP_ENABLED: ${PEERTUBE_SIGNUP_ENABLED}
42 # PEERTUBE_TRANSCODING_ENABLED: ${PEERTUBE_TRANSCODING_ENABLED}
43 # Traefik labels are suggested as an example for people using Traefik,
44 # remove them if you are using another reverse proxy.
45 labels:
46 traefik.enable: "true"
47 traefik.frontend.rule: "Host:${PEERTUBE_WEBSERVER_HOSTNAME}"
48 traefik.port: "9000"
49 # If you don't want to use a reverse proxy (not suitable for production!)
50 # ports:
51 # - "80:9000"
52 volumes:
53 - ./docker-volume/data:/data
54 - ./docker-volume/config:/config
55 depends_on:
56 - postgres
57 - redis
58 restart: "always"
59
60 postgres:
61 image: postgres:10-alpine
62 environment:
63 POSTGRES_USER: ${DB_USERNAME}
64 POSTGRES_PASSWORD: ${DB_PASSWORD}
65 POSTGRES_DB: peertube
66 volumes:
67 - ./docker-volume/db:/var/lib/postgresql/data
68 restart: "always"
69 labels:
70 traefik.enable: "false"
71
72 redis:
73 image: redis:4-alpine
74 volumes:
75 - ./docker-volume/redis:/data
76 restart: "always"
77 labels:
78 traefik.enable: "false"