-
Notifications
You must be signed in to change notification settings - Fork 11
/
docker-compose.network.yml
160 lines (148 loc) · 3.91 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
services:
server:
restart: always
build:
context: .
container_name: server-jbx
networks:
- cluster
environment:
- NODE_ENV=network
- PORT=9000
- HOST=localhost
- LOG_LEVEL=debug
- KAFKA_BROKERS=kafka-jbx:9092
- BASE_URL=http://localhost:8080
- SPOTIFY_CLIENT_ID=${SPOTIFY_CLIENT_ID}
- SPOTIFY_CLIENT_SECRET=${SPOTIFY_CLIENT_SECRET}
- PROXY_URL=http://proxy:8080
- DB_HOST=jbx-network-db
- DB_PORT=5432
- DB_USER=devuser
- DB_PASS=devpass
- DB_NAME=devdatabase
- REDIS_HOST=jbx-network-redis
- REDIS_PORT=6379
ports:
- 9000:9000
depends_on:
- postgres
- pgadmin
# - kafka
- redis
volumes:
- ./src:/app/src
- ./package.json:/app/package.json
- ./generated:/app/generated
# - api-spec:/app/generated
command: npm run start:network
proxy:
build:
context: ./proxy/
ports:
- 8080:8080
- 8081:8081
networks:
- cluster
depends_on:
- server
volumes:
- client-dist:/vol/client
- club-static:/vol/static
- ./proxy/api:/vol/apispec
environment:
- SERVER_URI=server-jbx:9000
- WEBSOCKET_URI=server-jbx:9000
- CLUB_MANAGER_URI=club-app-network:9000
- PUBLIC_STATIC_URI=jukebox-client-631bab280a434e28995fd3fcafd1fa5a.s3-website-us-east-1.amazonaws.com
# attach: false
postgres:
image: postgres:13-alpine
container_name: jbx-network-db
volumes:
- jukebox-network-pg-data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=devdatabase
- POSTGRES_USER=devuser
- POSTGRES_PASSWORD=devpass
networks:
- cluster
redis:
image: redis:alpine
container_name: jbx-network-redis
ports:
- 6379:6379
networks:
- cluster
pgadmin:
image: dpage/pgadmin4
container_name: jbx-netork-pgadmin
restart: always
ports:
- "8888:80"
environment:
- PGADMIN_DEFAULT_PASSWORD=changeme
# - PGADMIN_SERVER_MODE=True
- PGADMIN_CONFIG_DATABASE_URI="postgresql://devuser:devpass@jbx-network-db:5432/devdatabase"
# - PGADMIN_SQLITE_PATH='/var/lib/sqlite'
volumes:
- pgadmin-network-data:/var/lib/pgadmin
networks:
- cluster
####################################
# Kafka Config
####################################
# zookeeper:
# image: confluentinc/cp-zookeeper:latest
# container_name: zookeeper-jbx
# 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
# depends_on:
# - zookeeper
# ports:
# - 9092:9092
# - 29092:29092
# environment:
# KAFKA_BROKER_ID: 1
# KAFKA_ZOOKEEPER_CONNECT: zookeeper-jbx:2181
# KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka-jbx:9092,PLAINTEXT_HOST://localhost:29092
# # KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:9092
# 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
# kafka-api:
# image: 'docker-spring-boot-postgres:latest'
# build:
# context: ./kafka-api
# container_name: kafka-api-jbx
# ports:
# - 9090:8080
# environment:
# - SPRING_PROFILES_ACTIVE=dev
# depends_on:
# - kafka
volumes:
client-dist:
name: client-dist
jukebox-network-pg-data:
club-static:
name: club-static
pgadmin-network-data:
networks:
cluster:
name: jukebox_cluster
driver: bridge