forked from patryk-zielinski93/sdj-api
-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
136 lines (125 loc) · 2.88 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
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
version: '3.6'
services:
slack_dj_backend:
env_file:
- .env
container_name: ${BACKEND_CONTAINER_NAME}
build:
dockerfile: ./apps/backend/Dockerfile
context: ./
args:
- LOCAL_USER_ID=${LOCAL_USER_ID}
volumes:
- ./tracks:/app/assets/tracks
environment:
- PORT=${BACKEND_PORT}
- VIRTUAL_HOST=${BACKEND_URL}
- VIRTUAL_PORT=${BACKEND_PORT}
- LOCAL_USER_ID=${LOCAL_USER_ID}
- HOST_IP=${HOST_IP}
- JWT_SECRET=${JWT_SECRET}
networks:
backend:
aliases:
- backend
slack_dj_db:
container_name: ${DB_CONTAINER_NAME}
image: mariadb
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
volumes:
- db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
- MYSQL_DATABASE=${DB_DATABASE}
- MYSQL_USER=${DB_USERNAME}
- MYSQL_PASSWORD=${DB_PASSWORD}
networks:
backend:
aliases:
- database
slack_dj_icecast:
container_name: ${ICECAST_CONTAINER_NAME}
build:
dockerfile: Dockerfile
context: ./containers/icecast
environment:
- VIRTUAL_HOST=${ICECAST_URL}
- VIRUTAL_PORT=8000
networks:
streaming:
aliases:
- icecast
slack_dj_ices:
container_name: ${ICES_CONTAINER_NAME}-${ROOM_ID}
build:
dockerfile: Dockerfile
context: ./containers/ices
volumes:
- ./tracks:/tracks
environment:
- ROOM_ID=${ROOM_ID}
depends_on:
- slack_dj_redis
- slack_dj_icecast
networks:
streaming:
aliases:
- ices
backend:
aliases:
- ices
slack_dj_ng:
container_name: ${NG_CONTAINER_NAME}
build:
dockerfile: ./apps/ng/Dockerfile
context: ./
args:
- LOCAL_USER_ID=${LOCAL_USER_ID}
environment:
- VIRTUAL_HOST=${NG_URL}
- VIRTUAL_PORT=80
- LOCAL_USER_ID=${LOCAL_USER_ID}
- NG_EXTERNAL_STREAM=${NG_EXTERNAL_STREAM}
- BACKEND_URL=${BACKEND_URL}
- RADIO_STREAM_URL=${ICECAST_URL}
- SLACK_CLIENT_ID=${SLACK_CLIENT_ID}
- SLACK_CLIENT_SECRET=${SLACK_CLIENT_SECRET}
networks:
frontend:
aliases:
- frontend
slack_dj_nginx_proxy:
container_name: ${NGINX_PROXY_CONTAINER_NAME}
build:
dockerfile: Dockerfile
context: ./containers/nginx-proxy
ports:
- '80:80'
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
networks:
- streaming
- frontend
- backend
slack_dj_redis:
container_name: ${REDIS_CONTAINER_NAME}
volumes:
- redis:/data
image: redis:alpine
networks:
backend:
aliases:
- redis
streaming:
aliases:
- redis
networks:
streaming:
driver: 'bridge'
frontend:
driver: 'bridge'
backend:
driver: 'bridge'
volumes:
db:
redis: