-
Notifications
You must be signed in to change notification settings - Fork 26
/
docker-compose.network.yml
233 lines (213 loc) · 5.72 KB
/
docker-compose.network.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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
services:
####################################
# React Client
####################################
client:
build:
context: .
volumes:
- ./src:/app/src
# - ./.env.network:/app/.env.network
- ./vite.config.ts:/app/vite.config.ts
- client-dist-jbx:/app/dist
- type: bind
source: ./.env.network
target: /app/.env.network
ports:
- 3000:3000
command: npm run network
####################################
# Server & Network Config
####################################
jukebox:
restart: always
image: ikehunter5/jukebox-server:latest
container_name: jbx-server-fe
environment:
- NODE_ENV=network
- PORT=9000
- HOST=localhost
- LOG_LEVEL=debug
- BASE_URL=http://localhost:8080
- KAFKA_BROKERS=kafka-jbx-fe:9092
- SPOTIFY_CLIENT_ID=${SPOTIFY_CLIENT_ID}
- SPOTIFY_CLIENT_SECRET=${SPOTIFY_CLIENT_SECRET}
- PROXY_URL=http://proxy:8080
- DB_HOST=jbx-network-db-fe
- DB_PORT=5432
- DB_USER=devuser
- DB_PASS=devpass
- DB_NAME=devdatabase
- REDIS_HOST=jbx-network-redis-fe
- REDIS_PORT=6379
ports:
- 9000:9000
depends_on:
- postgres-jukebox
# - kafka
networks:
- cluster
command: npm run start:network
proxy:
image: ikehunter5/jukebox-proxy:latest
ports:
- 8080:8080
- 8081:8081
networks:
- cluster
depends_on:
- jukebox
- club-manager
restart: always
volumes:
- client-dist-jbx:/vol/client
- club-static:/vol/static
environment:
- SERVER_URI=jbx-server-fe:9000
- WEBSOCKET_URI=jbx-server-fe:9000
- CLUB_MANAGER_URI=club-app-network-fe:9000
- PUBLIC_STATIC_URI=jukebox-client-631bab280a434e28995fd3fcafd1fa5a.s3-website-us-east-1.amazonaws.com
# attach: false
redis:
image: redis:alpine
container_name: jbx-network-redis-fe
ports:
- 6379:6379
networks:
- cluster
# mongodb:
# image: mongo:6.0.9
# restart: always
# container_name: mongo-network-jbx-fe
# ports:
# - 27017:27017
# volumes:
# - mongo-data-fe:/data/db
# environment:
# - MONGO_INITDB_ROOT_USERNAME=root
# - MONGO_INITDB_ROOT_PASSWORD=changeme
# command: mongod --quiet --logpath /dev/null --bind_ip_all
# networks:
# - cluster
####################################
# Kafka Config
####################################
# zookeeper:
# image: confluentinc/cp-zookeeper:latest
# container_name: zookeeper-jbx-fe
# environment:
# ZOOKEEPER_CLIENT_PORT: 2181
# ZOOKEEPER_TICK_TIME: 2000
# ports:
# - 2181:2181
# networks:
# - cluster
# attach: false
# kafka:
# image: confluentinc/cp-kafka:latest
# container_name: kafka-jbx-fe
# depends_on:
# - zookeeper
# ports:
# - 9092:9092
# - 29092:29092
# environment:
# KAFKA_BROKER_ID: 1
# KAFKA_ZOOKEEPER_CONNECT: zookeeper-jbx-fe:2181
# KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092
# KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
# KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
# KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
# KAFKA_AUTO_CREATE_TOPICS_ENABLE: true
# networks:
# - cluster
# attach: false
####################################
# Web Socket Config
####################################
# websocket:
# image: ikehunter5/jukebox-websocket:latest
# restart: always
# ports:
# - 9001:9001
# container_name: websocket-jbx-fe
# environment:
# - HOST=0.0.0.0
# - PORT=9001
# - NODE_ENV=network
# - LOG_LEVEL=debug
# - LOG_NS=websocket
# - KAFKA_BROKERS=kafka-jbx-fe:9092
# - KAFKA_GROUP_ID=websocket-jbx
# command: npm run dev:websocket
# networks:
# - cluster
####################################
# Club Manager Config
####################################
club-manager:
image: ikehunter5/club-manager:latest
container_name: club-app-network-fe
# ports:
# - '8000:8000'
volumes:
# - ./app:/app
- club-static:/vol/static
command: >
sh -c "python manage.py wait_for_db &&
python manage.py migrate &&
python manage.py init_superuser &&
entrypoint.sh"
environment:
- PORT=9000
- DJANGO_ENV=dev
- DB_HOST=club-app-network-db-fe
- DB_NAME=devdatabase
- DB_USER=devuser
- DB_PASS=devpass
- DEBUG=1
- DJANGO_ALLOWED_HOSTS=*
- S3_STORAGE_BACKEND=0
- CREATE_SUPERUSER=1
- DJANGO_SUPERUSER_EMAIL=${DJANGO_SUPERUSER_EMAIL:[email protected]}
- DJANGO_SUPERUSER_PASS=${DJANGO_SUPERUSER_PASS:-changeme}
depends_on:
- postgres-clubs
networks:
- cluster
postgres-jukebox:
image: postgres:13-alpine
container_name: jbx-network-db-fe
volumes:
- postgres-jukebox:/var/lib/postgresql/data
environment:
- POSTGRES_DB=devdatabase
- POSTGRES_USER=devuser
- POSTGRES_PASSWORD=devpass
networks:
- cluster
postgres-clubs:
image: postgres:13-alpine
container_name: club-app-network-db-fe
volumes:
- postgres-clubs:/var/lib/postgresql/data
environment:
- POSTGRES_DB=devdatabase
- POSTGRES_USER=devuser
- POSTGRES_PASSWORD=devpass
networks:
- cluster
volumes:
client-dist-jbx:
name: client-dist-jbx
mongo-data-fe:
club-static:
name: club-static-fe
postgres-clubs:
name: postgres-clubs-network-fe
postgres-jukebox:
name: postgres-jukebox-network-fe
networks:
cluster:
name: jukebox_cluster
driver: bridge