docker-compose.yml 1.24 KB
Newer Older
1 2 3 4 5 6 7
version: '2.1'

services:
  redis:
    image: redis:latest

  osp:
Jae Beojkkoch's avatar
Jae Beojkkoch committed
8
    image: docker.tedomum.net/jae/flask-nginx-rtmp-manager:master
Jae Beojkkoch's avatar
Jae Beojkkoch committed
9
    volumes:
Jae Beojkkoch's avatar
Rename  
Jae Beojkkoch committed
10
      - ./data:/var/www
11 12 13 14 15 16 17 18 19 20 21 22 23 24
    labels:
      - traefik.enable=true
      - traefik.frontend.rule=Host:${hostname}
      - traefik.port=80
      - traefik.frontend.headers.STSSeconds=315360000
      - traefik.frontend.headers.browserXSSFilter=true
      - traefik.frontend.customResponseHeaders=Server:www||X-Powered-By:www
    environment:
      - REDIS_HOST=redis
      - FLASK_SECRET
      - FLASK_SALT
      - OSP_ALLOWREGISTRATION
      - OSP_REQUIREVERIFICATION
      - DB_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db/${POSTGRES_USER}
Jae Beojkkoch's avatar
Jae Beojkkoch committed
25 26
    depends_on:
      - "db"
Jae Beojkkoch's avatar
Jae Beojkkoch committed
27
      - "redis"
28 29 30
    ports:
      - "${ipv4}:1935:1935"
      - "${ipv6}:1935:1935"
Jae Beojkkoch's avatar
Jae Beojkkoch committed
31 32
      - "${ipv4}:5222:5222"
      - "${ipv6}:5269:5269"
33 34
  
  db:
35
    image: postgres:11
36 37 38 39 40 41 42 43 44 45 46 47 48
    volumes:
      - ./db:/var/lib/postgresql/data
      - ./wal:/wal
      - ./postgresql.conf:/var/lib/postgresql/data/postgresql.conf
    environment:
      - POSTGRES_USER
      - POSTGRES_PASSWORD

networks:
  default:
    enable_ipv6: true
    driver: bridge
    ipam:
Jae Beojkkoch's avatar
Jae Beojkkoch committed
49 50 51 52
      driver: default
      config:
        - subnet: "${prefix}/80"
          gateway: "${prefix}1"