36 lines
1021 B
YAML
36 lines
1021 B
YAML
|
|
version: '3.8'
|
||
|
|
|
||
|
|
services:
|
||
|
|
srs:
|
||
|
|
image: ossrs/srs:5
|
||
|
|
container_name: srs-server
|
||
|
|
ports:
|
||
|
|
- "${SRS_RTMP_EXPOSE_PORT:-25002}:1935" # RTMP
|
||
|
|
- "${SRS_HTTP_EXPOSE_PORT:-25003}:8080" # HTTP-FLV/HLS
|
||
|
|
- "${SRS_API_EXPOSE_PORT:-1985}:1985" # HTTP API
|
||
|
|
volumes:
|
||
|
|
- ./docker/srs/srs.conf:/usr/local/srs/conf/srs.conf
|
||
|
|
restart: unless-stopped
|
||
|
|
|
||
|
|
api-server:
|
||
|
|
build:
|
||
|
|
context: .
|
||
|
|
dockerfile: Dockerfile
|
||
|
|
image: live-streaming-api-server:latest
|
||
|
|
container_name: api-server
|
||
|
|
ports:
|
||
|
|
- "${API_EXPOSE_PORT:-25001}:3001"
|
||
|
|
environment:
|
||
|
|
- NODE_ENV=production
|
||
|
|
- PORT=3001
|
||
|
|
- EMBEDDED_MEDIA_SERVER=0
|
||
|
|
- SRS_HOST=srs
|
||
|
|
- SRS_RTMP_PORT=1935
|
||
|
|
- SRS_HTTP_PORT=8080
|
||
|
|
- PUBLIC_SRS_HOST=${PUBLIC_SRS_HOST:-192.168.1.164}
|
||
|
|
- PUBLIC_SRS_RTMP_PORT=${PUBLIC_SRS_RTMP_PORT:-${SRS_RTMP_EXPOSE_PORT:-25002}}
|
||
|
|
- PUBLIC_SRS_HTTP_PORT=${PUBLIC_SRS_HTTP_PORT:-${SRS_HTTP_EXPOSE_PORT:-25003}}
|
||
|
|
depends_on:
|
||
|
|
- srs
|
||
|
|
restart: unless-stopped
|