-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.prod.yml
152 lines (145 loc) · 3.91 KB
/
docker-compose.prod.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
version: "3.7"
services:
streaming-server:
image: node:alpine
working_dir: /app
command: ash -c "npm ci --production --no-progress && npm start"
volumes:
- ./streaming-server/src:/app
ports:
- 1935:1935
restart: always
streamer:
build: ./streamer
volumes:
- ./streamer/stream.sh:/usr/local/bin/stream.sh
- /etc/localtime:/etc/localtime:ro
entrypoint: /usr/local/bin/stream.sh
depends_on:
- streaming-server
environment:
- RTMP_SERVER_URL=rtmp://streaming-server:1935/live
- STREAM_NAME=bushitsuchan
devices:
- /dev/video0:/dev/video0
restart: always
image-storage:
build: ./image-storage
working_dir: /app
command: ash -c "npm ci --production --no-progress && npm start"
entrypoint: docker-entrypoint.sh
volumes:
- ./image-storage/src:/app
- ./photo:/photo
- /etc/localtime:/etc/localtime:ro
environment:
- RTMP_SERVER_URL=rtmp://streaming-server:1935/live
- STREAM_NAME=bushitsuchan
depends_on:
- streamer
- redis
restart: always
hls:
build: ./hls
working_dir: /app
command: ash -c "npm ci --production --no-progress && npm start"
entrypoint: docker-entrypoint.sh
volumes:
- ./hls/src:/app
- /etc/localtime:/etc/localtime:ro
environment:
- RTMP_SERVER_URL=rtmp://streaming-server:1935/live
- STREAM_NAME=bushitsuchan
depends_on:
- streamer
restart: always
reverse-proxy:
image: nginx:alpine
volumes:
- ./reverse-proxy/default.conf:/etc/nginx/conf.d/default.conf
ports:
- 80:80
depends_on:
- web
- slack
restart: always
tunnel:
build: ./tunnel
working_dir: /app
command: ash -c "npm ci --production --no-progress && npm start"
volumes:
- ./tunnel/src:/app
environment:
- AWS_API_NAME=bushitsuchan
- AWS_REST_API_ID=${AWS_REST_API_ID}
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
- NGROK_AUTH=${NGROK_AUTH}
- NGROK_HOST=reverse-proxy:80
- NGROK_REGION=jp
- AWS_REGION=ap-northeast-1
ports:
- 4040:4040
restart: always
web:
image: node:alpine
working_dir: /app
command: ash -c "npm ci --production --no-progress && npm start"
environment:
- SESSION_SECRET=${SESSION_SECRET}
- SLACK_CLIENT_ID=${SLACK_CLIENT_ID}
- SLACK_CLIENT_SECRET=${SLACK_CLIENT_SECRET}
- WORKSTATION_ID=${WORKSTATION_ID}
volumes:
- ./web/src:/app
- /etc/localtime:/etc/localtime:ro
depends_on:
- redis
restart: always
slack:
image: node:alpine
working_dir: /app
command: ash -c "npm ci --production --no-progress && npm start"
environment:
- SLACK_BOT_ACCESS_TOKEN=${SLACK_BOT_ACCESS_TOKEN}
- SLACK_SIGNING_SECRET=${SLACK_SIGNING_SECRET}
- CONTACT_CHANNEL=${CONTACT_CHANNEL}
- SESSION_SECRET=${SESSION_SECRET}
- NOTIFICATION_CHANNEL=${NOTIFICATION_CHANNEL}
volumes:
- ./slack/src:/app
- /etc/localtime:/etc/localtime:ro
restart: always
endpoint:
image: node:alpine
working_dir: /app
command: ash -c "npm install && npm start"
volumes:
- ./endpoint/src:/app
- /etc/localtime:/etc/localtime:ro
restart: always
redis:
image: redis:alpine
ports:
- "6379:6379"
# command: redis-server --appendonly yes --requirepass foobared
volumes:
- ./redis:/data
restart: always
object-detection:
build:
context: ./object-detection
working_dir: /app
command: bash -c "pipenv sync && pipenv run start"
environment:
- RTMP_SERVER_URL=rtmp://streaming-server:1935/live
- STREAM_NAME=bushitsuchan
- DEVICE=MYRIAD
privileged: true
volumes:
- ./object-detection/src:/app
- /dev:/dev
depends_on:
- streamer
- image-storage
restart: always