-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathdocker-compose.yml
98 lines (91 loc) · 2.31 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
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
version: "3"
services:
redis:
container_name: redis
image: redis:alpine
db:
container_name: db
restart: unless-stopped
image: mysql:latest
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: streamer
MYSQL_PASSWORD: password
MYSQL_DATABASE: gotest
ports:
- 3306:3306
expose:
- 3306
volumes:
- storage:/var/lib/mysql
rtmp:
container_name: rtmp
links:
- web
build:
context: .
dockerfile: ./scripts/rtmp/Dockerfile
volumes:
- public:/hls-preview/
entrypoint: ./scripts/wait-for-it.sh web:80 -- air -c ./scripts/rtmp/.air.toml
restart: unless-stopped
ports:
- "1935:1935"
expose:
- 1935
environment:
GRPC_HOST: web
REDIS_HOST: redis
web:
container_name: web
restart: always
links:
- db
- redis
build:
context: .
dockerfile: ./scripts/web/Dockerfile
entrypoint: ./scripts/wait-for-it.sh db:3306 -- air -c ./scripts/web/.air.toml
volumes:
- ./:/go/src/github.com/praveen001/go-rtmp-web-server
restart: unless-stopped
expose:
- 4005
- 5000
environment:
MYSQL_HOST: db
MYSQL_USER: streamer
MYSQL_PASSWORD: password
MYSQL_DATABASE: gotest
REDIS_HOST: redis
env_file:
- ./scripts/configs.env
ui:
container_name: ui
build:
context: .
dockerfile: ./scripts/ui/Dockerfile
entrypoint: yarn start
volumes:
- ./frontend/src/:/ui/src
restart: unless-stopped
expose:
- 8080
nginx:
container_name: nginx
links:
- web
- ui
build:
context: .
dockerfile: ./scripts/nginx/Dockerfile
volumes:
- public:/usr/share/nginx/html/hls-preview/
ports:
- "80:80"
expose:
- 80
volumes:
public:
storage: