]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - support/docker/production/docker-compose.yml
Merge branch 'release/v1.0.0' into develop
[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 env_file:
25 - .env
26 # Traefik labels are suggested as an example for people using Traefik,
27 # remove them if you are using another reverse proxy.
28 labels:
29 traefik.enable: "true"
30 traefik.frontend.rule: "Host:${PEERTUBE_WEBSERVER_HOSTNAME}"
31 traefik.port: "9000"
32 # If you don't want to use a reverse proxy (not suitable for production!)
33 # ports:
34 # - "80:9000"
35 volumes:
36 - ./docker-volume/data:/data
37 - ./docker-volume/config:/config
38 depends_on:
39 - postgres
40 - redis
41 restart: "always"
42
43 postgres:
44 image: postgres:10-alpine
45 environment:
46 POSTGRES_USER: ${PEERTUBE_DB_USERNAME}
47 POSTGRES_PASSWORD: ${PEERTUBE_DB_PASSWORD}
48 POSTGRES_DB: peertube
49 volumes:
50 - ./docker-volume/db:/var/lib/postgresql/data
51 restart: "always"
52 labels:
53 traefik.enable: "false"
54
55 redis:
56 image: redis:4-alpine
57 volumes:
58 - ./docker-volume/redis:/data
59 restart: "always"
60 labels:
61 traefik.enable: "false"