-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
206 lines (202 loc) · 6.77 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
version: "3.5"
services:
# Left for example:
# stream-overlay:
# depends_on:
# - backend-nginx
# - radio-manager-backend
# - radio-streamer
# networks:
# - myownradio-dev
# image: node:18
# command: npm start
# working_dir: /code
# volumes:
# - ./services/stream-overlay:/code
# user: "${USER}"
# labels:
# - traefik.enable=true
# - traefik.http.routers.overlay.rule=PathPrefix(`/stream-overlay`)
# - traefik.http.services.overlay.loadbalancer.server.port=3000
traefik:
depends_on:
- backend-nginx
networks:
- myownradio-dev
image: library/traefik:2.4
ports:
- "127.0.0.1:40180:80"
- "127.0.0.1:40181:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command:
- --providers.docker
- --providers.docker.exposedbydefault=false
- --api=true
- --api.dashboard=true
- --api.insecure=true
db:
image: mysql:8.0.29-oracle
environment:
MYSQL_ROOT_PASSWORD: "root"
MYSQL_DATABASE: "mor"
MYSQL_USER: "mor"
MYSQL_PASSWORD: "mor"
volumes:
- mysql-data:/var/lib/mysql
networks:
- myownradio-dev
ports:
- "127.0.0.1:40001:3306"
redis:
image: redis:alpine3.18
volumes:
- redis-data:/data
networks:
- myownradio-dev
backend-nginx:
depends_on:
- backend-php-fpm
image: myownradio/backend-nginx-base:1.0.2
volumes:
- ./services/backend:/code:ro
networks:
- myownradio-dev
labels:
- traefik.enable=true
- traefik.http.routers.backend.rule=PathPrefix(`/`)
- traefik.http.routers.backend.middlewares=corsBackend
- traefik.http.services.backend.loadbalancer.server.port=80
- traefik.http.middlewares.corsBackend.headers.accesscontrolallowmethods=GET,POST
- traefik.http.middlewares.corsBackend.headers.accesscontrolallowheaders=authorization
- traefik.http.middlewares.corsBackend.headers.accesscontrolalloworiginlist=http://localhost:3000
- traefik.http.middlewares.corsBackend.headers.accesscontrolallowcredentials=true
backend-php-fpm:
depends_on:
- db
- file-server
image: myownradio/backend-php-base:3.0.3
working_dir: /code
volumes:
- ./services/backend:/code:rw
user: "${USER}"
networks:
- myownradio-dev
environment:
COMPOSER_HOME: /code/.cache/composer-home
migration:
depends_on:
- db
build:
context: .
dockerfile: ./images/migration/Dockerfile
networks:
- myownradio-dev
environment:
MYSQL_DB: "mor"
MYSQL_USER: "root"
MYSQL_PASSWORD: "root"
MYSQL_HOST: "db"
file-server:
image: myownradio/file-server:1.0.2
volumes:
- ./services/backend/.cache/storage:/usr/share/nginx/html:ro
ports:
- "127.0.0.1:40004:80"
networks:
- myownradio-dev
radio-streamer:
depends_on:
- radio-manager-backend
- file-server
build:
context: ./services/radio-streamer
dockerfile: Dockerfile
user: "${USER}"
working_dir: /code
networks:
- myownradio-dev
ports:
- "127.0.0.1:40003:8080"
env_file:
- services/radio-streamer/.env
radiomanager-pubsub-backend:
depends_on:
- redis
build:
context: services/radiomanager-pubsub-backend
dockerfile: Dockerfile
user: "${USER}"
working_dir: /code
networks:
- myownradio-dev
ports:
- "127.0.0.1:40006:8080"
env_file:
- services/radiomanager-pubsub-backend/.env
labels:
- traefik.enable=true
- traefik.http.routers.pubsub.rule=Path(`/pubsub/channel/{channelId:[a-z]+}/subscribe`)
- traefik.http.routers.pubsub.middlewares=stripprefixPubsub,forwardauthPubsub,corsPubsub
- traefik.http.services.pubsub.loadbalancer.server.port=8080
- traefik.http.middlewares.stripprefixPubsub.stripprefix.prefixes=/pubsub
- traefik.http.middlewares.forwardauthPubsub.forwardauth.address=http://radio-manager-backend:8080/v0/forward-auth/by-token
- traefik.http.middlewares.forwardauthPubsub.forwardauth.authResponseHeaders=user-id
- traefik.http.middlewares.forwardauthPubsub.forwardauth.trustForwardHeader=false
- traefik.http.middlewares.corsPubsub.headers.accesscontrolallowmethods=GET
- traefik.http.middlewares.corsPubsub.headers.accesscontrolallowheaders=authorization
- traefik.http.middlewares.corsPubsub.headers.accesscontrolalloworiginlist=http://localhost:3000
- traefik.http.middlewares.corsPubsub.headers.accesscontrolallowcredentials=true
radio-manager-backend:
depends_on:
- radiomanager-web-egress-controller
build:
context: services/radio-manager-backend
dockerfile: Dockerfile
volumes:
- ./services/backend/.cache/storage:/data:rw
user: "${USER}"
working_dir: /code
networks:
- myownradio-dev
ports:
- "127.0.0.1:40005:8080"
env_file:
- services/radio-manager-backend/.env
labels:
- traefik.enable=true
- traefik.http.routers.radioManager.rule=PathPrefix(`/radio-manager/api/`)
- traefik.http.routers.radioManager.middlewares=stripprefixRadioManager,forwardauthRadioManager,corsRadioManager
- traefik.http.routers.radioManagerPub.rule=PathPrefix(`/radio-manager/api/pub`)
- traefik.http.routers.radioManagerPub.middlewares=stripprefixRadioManager,corsRadioManager
- traefik.http.services.radioManager.loadbalancer.server.port=8080
- traefik.http.middlewares.stripprefixRadioManager.stripprefix.prefixes=/radio-manager/api
- traefik.http.middlewares.forwardauthRadioManager.forwardauth.address=http://radio-manager-backend:8080/v0/forward-auth/by-token
- traefik.http.middlewares.forwardauthRadioManager.forwardauth.authResponseHeaders=user-id
- traefik.http.middlewares.forwardauthRadioManager.forwardauth.trustForwardHeader=false
- traefik.http.middlewares.corsRadioManager.headers.accesscontrolallowmethods=GET,POST
- traefik.http.middlewares.corsRadioManager.headers.accesscontrolallowheaders=authentication,content-type
- traefik.http.middlewares.corsRadioManager.headers.accesscontrolalloworiginlist=http://localhost:3000
- traefik.http.middlewares.corsRadioManager.headers.accesscontrolallowcredentials=true
radiomanager-web-egress-controller:
build:
context: services/radiomanager-web-egress-controller
dockerfile: Dockerfile
volumes:
- ./services/radiomanager-web-egress-controller/.kube:/.kube:ro
user: "${USER}"
working_dir: /code
networks:
- myownradio-dev
ports:
- "127.0.0.1:40007:8080"
env_file:
- services/radiomanager-web-egress-controller/.env
volumes:
mysql-data:
driver: local
redis-data:
driver: local
networks:
myownradio-dev:
name: myownradio-dev