aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/docker/production/swarm-stack.sample.yml
blob: 794f447536bdecd303d7619515cc6fdb5b2b7895 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
version: "3.3"

services:
  app:
    image: peertube:stretch
    environment:
      PEERTUBE_HOSTNAME: my.domain.tld
      PEERTUBE_PORT: 443
      PEERTUBE_HTTPS: true
      PEERTUBE_ADMIN_EMAIL: admin@domain.tld
      PEERTUBE_DB_USERNAME: user
      PEERTUBE_DB_PASSWORD: password
      PEERTUBE_SIGNUP_ENABLED: true
      PEERTUBE_TRANSCODING_ENABLED: true
    labels: &labels
      traefik.frontend.rule: "Host:my.domain.tld"
      traefik.docker.network: traefik
      traefik.port: "9000"
    volumes:
      - app_data:/usr/src/app/data
    networks:
      - traefik
      - backend
    depends_on:
      - db
    deploy:
      labels: *labels
      placement:
        constraints:
        - node.labels.peertube == 1

  db:
    image: postgres:10
    environment:
      POSTGRES_DB: peertube_prod
    volumes:
      - db_data:/var/lib/postgresql/data
    networks:
      - backend
    deploy:
      placement:
        constraints:
        - node.labels.peertube == 1

volumes:
  app_data:
  db_data:

networks:
  backend:
  traefik:
    external: true