2021-04-30 11:46:37 +00:00
|
|
|
version: '3.5'
|
|
|
|
|
|
|
|
networks:
|
|
|
|
default:
|
|
|
|
external:
|
|
|
|
name: traefik_default
|
|
|
|
|
|
|
|
services:
|
|
|
|
osp-app:
|
|
|
|
depends_on:
|
|
|
|
- osp-db
|
|
|
|
- osp-redis
|
|
|
|
container_name: osp-app
|
2021-04-30 14:17:18 +00:00
|
|
|
entrypoint: ["/opt/osp/setup/docker/wait-for-it.sh", "osp-db:3306", "--strict", "-t", "60", "--", "/opt/osp/setup/docker/entrypoint.sh"]
|
2021-04-30 11:46:37 +00:00
|
|
|
env_file: live.env
|
2021-04-30 13:48:17 +00:00
|
|
|
environment:
|
2021-04-30 14:17:18 +00:00
|
|
|
- DB_URL=mysql+pymysql://${MYSQL_USER}:${MYSQL_PASSWORD}@${MYSQL_HOST}:3306/${MYSQL_DATABASE}
|
2021-04-30 11:46:37 +00:00
|
|
|
image: deamos/openstreamingplatform:latest
|
|
|
|
labels:
|
2021-04-30 12:08:48 +00:00
|
|
|
# Watchtower
|
|
|
|
- "com.centurylinklabs.watchtower.enable=true"
|
|
|
|
# Routes
|
2021-04-30 11:46:37 +00:00
|
|
|
- "traefik.enable=true"
|
2021-04-30 13:05:53 +00:00
|
|
|
- "traefik.http.routers.osp.entrypoints=websecure"
|
|
|
|
- "traefik.http.routers.osp.rule=Host(`osp.${DOMAIN}`)"
|
|
|
|
- "traefik.http.routers.osp.tls=true"
|
|
|
|
- "traefik.http.routers.osp.tls.certresolver=myresolver"
|
|
|
|
- "traefik.http.services.osp.loadbalancer.server.port=80"
|
2021-04-30 16:35:00 +00:00
|
|
|
# RTMP specific
|
2021-05-06 10:14:28 +00:00
|
|
|
- "traefik.tcp.routers.rtmpcast.entrypoints=rtmp"
|
2021-05-01 08:41:26 +00:00
|
|
|
- "traefik.tcp.routers.rtmpcast.rule=HostSNI(`osp.${DOMAIN}`)"
|
2021-04-30 16:35:00 +00:00
|
|
|
- "traefik.tcp.routers.rtmpcast.service=rtmpcast"
|
2021-05-09 06:44:58 +00:00
|
|
|
- "traefik.tcp.routers.rtmpcast.tls=true"
|
|
|
|
- "traefik.tcp.routers.rtmpcast.tls.certresolver=myresolver"
|
2021-04-30 16:35:00 +00:00
|
|
|
- "traefik.tcp.services.rtmpcast.loadbalancer.server.port=1935"
|
2021-04-30 11:46:37 +00:00
|
|
|
networks:
|
|
|
|
- default
|
|
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
|
|
- ${OSP_ROOT}/data:/var/www
|
2021-04-30 13:05:53 +00:00
|
|
|
- ${OSP_ROOT}/data/nginx/conf:/usr/local/nginx/conf
|
2021-04-30 11:46:37 +00:00
|
|
|
|
|
|
|
osp-db:
|
|
|
|
image: mariadb:10
|
|
|
|
container_name: osp-db
|
2021-04-30 13:05:53 +00:00
|
|
|
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
|
2021-04-30 11:46:37 +00:00
|
|
|
restart: unless-stopped
|
|
|
|
env_file: live.env
|
|
|
|
labels:
|
|
|
|
# Watchtower
|
|
|
|
- "com.centurylinklabs.watchtower.enable=true"
|
|
|
|
networks:
|
|
|
|
- default
|
|
|
|
volumes:
|
|
|
|
- /etc/localtime:/etc/localtime:ro
|
|
|
|
- /etc/timezone:/etc/timezone:ro
|
2021-04-30 14:17:18 +00:00
|
|
|
- ${OSP_ROOT}/db:/var/lib/mysql
|
2021-04-30 11:46:37 +00:00
|
|
|
|
|
|
|
osp-redis:
|
|
|
|
image: redis:6-alpine
|
|
|
|
container_name: osp-redis
|
|
|
|
command: redis-server --requirepass ${REDIS_HOST_PASSWORD}
|
|
|
|
labels:
|
|
|
|
- "com.centurylinklabs.watchtower.enable=true"
|
|
|
|
networks:
|
|
|
|
- default
|
|
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
|
|
- ${OSP_ROOT}/redis:/data
|
|
|
|
- /etc/localtime:/etc/localtime:ro
|
|
|
|
- /etc/timezone:/etc/timezone:ro
|
|
|
|
|