-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
63 lines (62 loc) · 1.85 KB
/
docker-compose.yml
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
53
54
55
56
57
58
59
60
61
62
63
version: '3'
services:
stream-server:
container_name: stream-server
image: stream-server:1.0.0
build:
context: .
dockerfile: ./Dockerfile
networks:
- encoder
ports:
- "1935:${RTMP_PORT}"
- "3333:${API_PORT}"
- "8888:${HTTP_PORT}"
volumes:
- ./media:/app/media
restart: unless-stopped
depends_on:
- mongodb
environment:
- API_PORT=${API_PORT}
- RTMP_PORT=${RTMP_PORT}
- HTTP_PORT=${HTTP_PORT}
- RMTP_BASE_URL=${RMTP_BASE_URL}
- NODE_ENV=production
- MONGO_USER=${MONGO_USER}
- MONGO_PASSWORD=${MONGO_PASSWORD}
- MONGO_HOST=${MONGO_HOST}
- MONGO_DATABASE=${MONGO_DATABASE}
- MONGO_PORT=${MONGO_PORT}
- MONGO_AUTH_SOURCE=${MONGO_AUTH_SOURCE}
- FFMPEG=${FFMPEG}
stream-nginx:
container_name: nginx
image: nginx
build:
context: ./nginx
restart: always
ports:
- "80:80"
mongodb:
image: mongo:latest
container_name: mongodb
environment:
- MONGO_INITDB_DATABASE=${MONGO_INITDB_DATABASE}
- MONGO_INITDB_ROOT_USERNAME=${MONGO_INITDB_ROOT_USERNAME}
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_INITDB_ROOT_PASSWORD}
volumes:
- ./init-mongo.js:/docker-entrypoint-initdb.d/init-mongo-js:ro
- ./database:/data/db
networks:
- encoder
ports:
- "27018:27017"
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongo localhost:27017/test --quiet
interval: 30s
timeout: 10s
retries: 3
restart: unless-stopped
networks:
encoder: