forked from extern/docker
405 lines
10 KiB
YAML
405 lines
10 KiB
YAML
{{/* if you read this, you can ignore the following lines */}}
|
|
# auto generated by ./scripts/generate
|
|
# don't edit this directly.
|
|
{{/* -------- */}}
|
|
|
|
version: '3.6'
|
|
|
|
# html5 templates
|
|
x-html5-backend: &html5backend
|
|
build: mod/html5
|
|
image: bbb-html5
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- redis
|
|
- mongodb
|
|
- etherpad
|
|
environment: &html5backend-env
|
|
DOMAIN: ${DOMAIN}
|
|
CLIENT_TITLE: ${CLIENT_TITLE}
|
|
ETHERPAD_API_KEY: ${ETHERPAD_API_KEY}
|
|
LISTEN_ONLY_MODE: ${LISTEN_ONLY_MODE:-true}
|
|
DISABLE_ECHO_TEST: ${DISABLE_ECHO_TEST:-false}
|
|
AUTO_SHARE_WEBCAM: ${AUTO_SHARE_WEBCAM:-false}
|
|
DISABLE_VIDEO_PREVIEW: ${DISABLE_VIDEO_PREVIEW:-false}
|
|
CHAT_ENABLED: ${CHAT_ENABLED:-true}
|
|
CHAT_START_CLOSED: ${CHAT_START_CLOSED:-false}
|
|
BREAKOUTROOM_LIMIT: ${BREAKOUTROOM_LIMIT:-8}
|
|
DEV_MODE: ${DEV_MODE:-}
|
|
BBB_HTML5_ROLE: backend
|
|
|
|
x-html5-frontend: &html5frontend
|
|
<<: *html5backend
|
|
volumes:
|
|
- html5-static:/html5-static:rw
|
|
environment: &html5frontend-env
|
|
<<: *html5backend-env
|
|
BBB_HTML5_ROLE: frontend
|
|
# =========================
|
|
|
|
services:
|
|
bbb-web:
|
|
build: mod/bbb-web
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- redis
|
|
- libreoffice
|
|
healthcheck:
|
|
test: wget --no-verbose --tries=1 --spider http://10.7.7.2:8090/bigbluebutton/api || exit 1
|
|
start_period: 2m
|
|
environment:
|
|
DEV_MODE: ${DEV_MODE:-}
|
|
DOMAIN: ${DOMAIN}
|
|
ENABLE_RECORDING: ${ENABLE_RECORDING:-false}
|
|
SHARED_SECRET: ${SHARED_SECRET}
|
|
WELCOME_MESSAGE: ${WELCOME_MESSAGE:-}
|
|
WELCOME_FOOTER: ${WELCOME_FOOTER}
|
|
STUN_SERVER: stun:${STUN_IP}:${STUN_PORT}
|
|
TURN_SERVER: ${TURN_SERVER:-}
|
|
TURN_SECRET: ${TURN_SECRET:-}
|
|
NUMBER_OF_BACKEND_NODEJS_PROCESSES: {{ .Env.NUMBER_OF_BACKEND_NODEJS_PROCESSES }}
|
|
volumes:
|
|
- bigbluebutton:/var/bigbluebutton
|
|
- vol-freeswitch:/var/freeswitch/meetings
|
|
- vol-kurento:/var/kurento
|
|
- vol-libreoffice:/var/tmp/soffice
|
|
networks:
|
|
bbb-net:
|
|
ipv4_address: 10.7.7.2
|
|
|
|
|
|
{{ range $i := loop 0 (atoi .Env.NUMBER_OF_BACKEND_NODEJS_PROCESSES) }}
|
|
html5-backend-{{ add $i 1 }}:
|
|
<<: *html5backend
|
|
environment:
|
|
<<: *html5backend-env
|
|
INSTANCE_ID: {{ add $i 1 }}
|
|
PORT: {{ add 4000 $i }}
|
|
networks:
|
|
bbb-net:
|
|
ipv4_address: 10.7.7.{{ add 100 $i }}
|
|
{{end}}
|
|
|
|
{{ range $i := loop 0 (atoi .Env.NUMBER_OF_FRONTEND_NODEJS_PROCESSES) }}
|
|
html5-frontend-{{ add $i 1 }}:
|
|
<<: *html5frontend
|
|
environment:
|
|
<<: *html5frontend-env
|
|
INSTANCE_ID: {{ add $i 1 }}
|
|
PORT: {{ add 4100 $i }}
|
|
networks:
|
|
bbb-net:
|
|
ipv4_address: 10.7.7.{{ add 200 $i }}
|
|
{{end}}
|
|
|
|
|
|
freeswitch:
|
|
build: mod/freeswitch
|
|
restart: unless-stopped
|
|
cap_add:
|
|
- IPC_LOCK
|
|
- NET_ADMIN
|
|
- NET_RAW
|
|
- NET_BROADCAST
|
|
- SYS_NICE
|
|
- SYS_RESOURCE
|
|
environment:
|
|
DOMAIN: ${DOMAIN}
|
|
EXTERNAL_IPv4: ${EXTERNAL_IPv4}
|
|
EXTERNAL_IPv6: ${EXTERNAL_IPv6:-::1}
|
|
SIP_IP_ALLOWLIST: ${SIP_IP_ALLOWLIST:-}
|
|
DISABLE_SOUND_MUTED: ${DISABLE_SOUND_MUTED:-false}
|
|
DISABLE_SOUND_ALONE: ${DISABLE_SOUND_ALONE:-false}
|
|
SOUNDS_LANGUAGE: ${SOUNDS_LANGUAGE:-en-us-callie}
|
|
ESL_PASSWORD: ${FSESL_PASSWORD:-ClueCon}
|
|
volumes:
|
|
- ./conf/sip_profiles:/etc/freeswitch/sip_profiles/external
|
|
- ./conf/dialplan_public:/etc/freeswitch/dialplan/public_docker
|
|
- vol-freeswitch:/var/freeswitch/meetings
|
|
network_mode: host
|
|
|
|
nginx:
|
|
build: mod/nginx
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- etherpad
|
|
- webrtc-sfu
|
|
- html5-backend-1
|
|
volumes:
|
|
- bigbluebutton:/var/bigbluebutton
|
|
- html5-static:/html5-static:ro
|
|
- ${DEFAULT_PRESENTATION:-/dev/null}:/etc/nginx/html/default.pdf
|
|
network_mode: host
|
|
extra_hosts:
|
|
- "host.docker.internal:10.7.7.1"
|
|
- "core:10.7.7.2"
|
|
- "etherpad:10.7.7.4"
|
|
- "webrtc-sfu:10.7.7.10"
|
|
- "html5:10.7.7.11"
|
|
|
|
etherpad:
|
|
build: mod/etherpad
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- redis
|
|
environment:
|
|
ETHERPAD_API_KEY: ${ETHERPAD_API_KEY}
|
|
networks:
|
|
bbb-net:
|
|
ipv4_address: 10.7.7.4
|
|
|
|
redis:
|
|
image: redis:6.0-alpine
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 1s
|
|
timeout: 3s
|
|
retries: 30
|
|
networks:
|
|
bbb-net:
|
|
ipv4_address: 10.7.7.5
|
|
|
|
mongodb:
|
|
image: mongo:4.4
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./mod/mongo/mongod.conf:/etc/mongod.conf
|
|
- ./mod/mongo/init-replica.sh:/docker-entrypoint-initdb.d/init-replica.sh
|
|
tmpfs:
|
|
- /data/configdb
|
|
- /data/db
|
|
command: mongod --config /etc/mongod.conf --oplogSize 8 --replSet rs0 --noauth
|
|
healthcheck:
|
|
test: bash -c "if mongo --eval 'quit(db.runCommand({ ping':' 1 }).ok ? 0 ':' 2)'; then exit 0; fi; exit 1;"
|
|
networks:
|
|
bbb-net:
|
|
ipv4_address: 10.7.7.6
|
|
|
|
kurento:
|
|
image: kurento/kurento-media-server:6.15
|
|
restart: unless-stopped
|
|
environment:
|
|
KMS_STUN_IP: ${STUN_IP}
|
|
KMS_STUN_PORT: ${STUN_PORT}
|
|
KMS_MIN_PORT: 24577
|
|
KMS_MAX_PORT: 32768
|
|
KMS_TURN_URL:
|
|
KMS_NETWORK_INTERFACES: ${NETWORK_INTERFACE:-}
|
|
GST_DEBUG: 3,Kurento*:4,kms*:4,KurentoWebSocketTransport:5
|
|
network_mode: host
|
|
volumes:
|
|
- vol-kurento:/var/kurento
|
|
|
|
webrtc-sfu:
|
|
build: mod/webrtc-sfu
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- redis
|
|
- kurento
|
|
environment:
|
|
CLIENT_HOST: 0.0.0.0
|
|
KURENTO_NAME: kurento
|
|
REDIS_HOST: redis
|
|
FREESWITCH_IP: host.docker.internal
|
|
FREESWITCH_SIP_IP: ${EXTERNAL_IPv4}
|
|
ESL_IP: host.docker.internal
|
|
LOG_LEVEL: info
|
|
NODE_CONFIG: '{"kurento":[{"ip":"${EXTERNAL_IPv4}","url":"ws://kurento:8888/kurento"}]}'
|
|
ports:
|
|
- "127.0.0.1:3008:3008"
|
|
extra_hosts:
|
|
- host.docker.internal:10.7.7.1
|
|
- kurento:10.7.7.1
|
|
networks:
|
|
bbb-net:
|
|
ipv4_address: 10.7.7.10
|
|
|
|
fsesl-akka:
|
|
build: mod/fsesl-akka
|
|
depends_on:
|
|
- redis
|
|
environment:
|
|
FSESL_PASSWORD: ${FSESL_PASSWORD:-ClueCon}
|
|
networks:
|
|
bbb-net:
|
|
ipv4_address: 10.7.7.14
|
|
|
|
apps-akka:
|
|
build: mod/apps-akka
|
|
depends_on:
|
|
- redis
|
|
environment:
|
|
DOMAIN: ${DOMAIN}
|
|
SHARED_SECRET: ${SHARED_SECRET}
|
|
volumes:
|
|
- vol-freeswitch:/var/freeswitch/meetings
|
|
networks:
|
|
bbb-net:
|
|
ipv4_address: 10.7.7.15
|
|
|
|
|
|
libreoffice:
|
|
build: mod/libreoffice
|
|
restart: unless-stopped
|
|
volumes:
|
|
- vol-libreoffice:/var/tmp/soffice
|
|
tmpfs:
|
|
- /tmp
|
|
networks:
|
|
bbb-net:
|
|
ipv4_address: 10.7.7.7
|
|
|
|
periodic:
|
|
build: mod/periodic
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- mongodb
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- bigbluebutton:/var/bigbluebutton
|
|
networks:
|
|
bbb-net:
|
|
ipv4_address: 10.7.7.12
|
|
|
|
{{ if isTrue .Env.ENABLE_RECORDING }}
|
|
# recordings
|
|
recordings:
|
|
build: mod/recordings
|
|
depends_on:
|
|
- redis
|
|
environment:
|
|
DOMAIN: ${DOMAIN}
|
|
volumes:
|
|
- bigbluebutton:/var/bigbluebutton
|
|
- vol-freeswitch:/var/freeswitch/meetings
|
|
- vol-kurento:/var/kurento
|
|
tmpfs:
|
|
- /var/log/bigbluebutton
|
|
- /tmp
|
|
networks:
|
|
bbb-net:
|
|
ipv4_address: 10.7.7.16
|
|
{{end}}
|
|
|
|
{{ if isTrue .Env.ENABLE_WEBHOOKS }}
|
|
# webhooks
|
|
webhooks:
|
|
build: mod/webhooks
|
|
restart: unless-stopped
|
|
environment:
|
|
DOMAIN: ${DOMAIN}
|
|
SHARED_SECRET: ${SHARED_SECRET}
|
|
depends_on:
|
|
- redis
|
|
networks:
|
|
bbb-net:
|
|
ipv4_address: 10.7.7.17
|
|
{{end}}
|
|
|
|
{{ if isTrue .Env.ENABLE_HTTPS_PROXY }}
|
|
# https
|
|
https_proxy:
|
|
image: valian/docker-nginx-auto-ssl
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ssl_data:/etc/resty-auto-ssl
|
|
{{ if .Env.EXTERNAL_IPv6 }}
|
|
- ./mod/https/site.conf:/etc/nginx/conf.d/bbb-docker.conf
|
|
{{else}}
|
|
- ./mod/https/site-ipv4only.conf:/etc/nginx/conf.d/bbb-docker.conf
|
|
{{end}}
|
|
environment:
|
|
{{ if not .Env.DEV_MODE }}
|
|
ALLOWED_DOMAINS: ${DOMAIN}
|
|
{{else}}
|
|
ALLOWED_DOMAINS: ""
|
|
{{end}}
|
|
network_mode: host
|
|
{{end}}
|
|
|
|
{{ if isTrue .Env.ENABLE_COTURN }}
|
|
# coturn
|
|
coturn:
|
|
image: instrumentisto/coturn:4.5
|
|
restart: unless-stopped
|
|
command:
|
|
- "--external-ip=${EXTERNAL_IPv4}/${EXTERNAL_IPv4}"
|
|
- "--external-ip=${EXTERNAL_IPv6:-::1}/${EXTERNAL_IPv6:-::1}"
|
|
- "--static-auth-secret=${TURN_SECRET}"
|
|
volumes:
|
|
- ssl_data:/etc/resty-auto-ssl
|
|
- ./mod/coturn/entrypoint.sh:/usr/local/bin/docker-entrypoint.sh
|
|
- ./mod/coturn/turnserver.conf:/etc/coturn/turnserver.conf
|
|
network_mode: host
|
|
|
|
{{end}}
|
|
|
|
{{ if isTrue .Env.ENABLE_GREENLIGHT }}
|
|
# greenlight
|
|
greenlight:
|
|
image: bigbluebutton/greenlight:v2
|
|
restart: unless-stopped
|
|
env_file: .env
|
|
environment:
|
|
DB_ADAPTER: postgresql
|
|
DB_HOST: postgres
|
|
DB_NAME: greenlight
|
|
DB_USERNAME: postgres
|
|
DB_PASSWORD: password
|
|
{{ if isTrue .Env.DEV_MODE }}
|
|
BIGBLUEBUTTON_ENDPOINT: http://10.7.7.1:8080/bigbluebutton/api/
|
|
{{else}}
|
|
BIGBLUEBUTTON_ENDPOINT: https://${DOMAIN}/bigbluebutton/api/
|
|
{{end}}
|
|
BIGBLUEBUTTON_SECRET: ${SHARED_SECRET}
|
|
SECRET_KEY_BASE: ${RAILS_SECRET}
|
|
ports:
|
|
- 10.7.7.1:5000:80
|
|
postgres:
|
|
image: postgres:12-alpine
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: greenlight
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: password
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
volumes:
|
|
- ./postgres-data:/var/lib/postgresql/data
|
|
{{end}}
|
|
|
|
{{ if isTrue .Env.ENABLE_PROMETHEUS_EXPORTER }}
|
|
# prometheus
|
|
prometheus-exporter:
|
|
image: greenstatic/bigbluebutton-exporter:v0.7.0-preview2
|
|
restart: unless-stopped
|
|
environment:
|
|
API_BASE_URL: http://10.7.7.1:8080/bigbluebutton/api/
|
|
API_SECRET: ${SHARED_SECRET}
|
|
RECORDINGS_METRICS_READ_FROM_DISK: "false"
|
|
networks:
|
|
bbb-net:
|
|
ipv4_address: 10.7.7.33
|
|
{{end}}
|
|
|
|
volumes:
|
|
bigbluebutton:
|
|
vol-freeswitch:
|
|
vol-kurento:
|
|
html5-static:
|
|
vol-libreoffice:
|
|
{{ if isTrue .Env.ENABLE_HTTPS_PROXY }}
|
|
ssl_data:
|
|
{{end}}
|
|
|
|
networks:
|
|
bbb-net:
|
|
ipam:
|
|
driver: default
|
|
config:
|
|
- subnet: "10.7.7.0/24"
|