1414# specific language governing permissions and limitations
1515# under the LICENSE.
1616#
17- # ── ServiceForge development compose ──────────────────────────────────────── ─
17+ # ServiceForge development compose ─
1818#
1919# Startup order (via depends_on + condition):
2020# postgres (healthy)
3131# docker compose -f deploy/docker/docker-compose.dev.yml up --build
3232# docker compose -f deploy/docker/docker-compose.dev.yml run --rm migrate down 1
3333
34- version : " 3.9"
35-
3634x-service-defaults : &service-defaults
3735 build :
3836 context : ../..
@@ -44,7 +42,7 @@ x-service-defaults: &service-defaults
4442 DATABASE_URL : postgres://serviceforge:serviceforge@postgres:5432/serviceforge?sslmode=disable
4543 KAFKA_BROKERS : kafka:9092
4644
47- # ── Infrastructure ────────────────────────────────────────────────────────────
45+ # Infrastructure
4846
4947services :
5048 postgres :
@@ -95,34 +93,36 @@ services:
9593 start_period : 5s
9694
9795 zookeeper :
98- image : bitnami/ zookeeper:3.9
96+ image : confluentinc/cp- zookeeper:7.5.0
9997 container_name : serviceforge-zookeeper
10098 environment :
101- - ALLOW_ANONYMOUS_LOGIN=yes
99+ ZOOKEEPER_CLIENT_PORT : 2181
100+ ZOOKEEPER_TICK_TIME : 2000
102101 ports :
103102 - " 2181:2181"
104103 healthcheck :
105- test : ["CMD-SHELL", "echo ruok | nc -w 2 localhost 2181 | grep imok "]
104+ test : ["CMD-SHELL", "echo srvr | nc localhost 2181 2>/dev/null | grep -q 'Zookeeper version' || exit 1 "]
106105 interval : 10s
107106 timeout : 5s
108107 retries : 10
109108 start_period : 15s
110109
111110 kafka :
112- image : bitnami/ kafka:3.7
111+ image : confluentinc/cp- kafka:7.5.0
113112 container_name : serviceforge-kafka
114113 depends_on :
115114 zookeeper :
116115 condition : service_healthy
117116 ports :
118117 - " 9092:9092"
119118 environment :
120- - KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
121- - KAFKA_CFG_LISTENERS=PLAINTEXT://:9092
122- - KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092
123- - ALLOW_PLAINTEXT_LISTENER=yes
119+ KAFKA_BROKER_ID : 1
120+ KAFKA_ZOOKEEPER_CONNECT : zookeeper:2181
121+ KAFKA_ADVERTISED_LISTENERS : PLAINTEXT://kafka:9092
122+ KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR : 1
123+ KAFKA_AUTO_CREATE_TOPICS_ENABLE : " true"
124124 healthcheck :
125- test : ["CMD-SHELL", "kafka-topics.sh --bootstrap-server localhost:9092 --list"]
125+ test : ["CMD-SHELL", "kafka-topics --bootstrap-server localhost:9092 --list"]
126126 interval : 10s
127127 timeout : 10s
128128 retries : 10
@@ -140,7 +140,7 @@ services:
140140 KAFKA_CLUSTERS_0_NAME : local
141141 KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS : kafka:9092
142142
143- # ── Microservices ──────────────────────────────────────────────────────────── ─
143+ # Microservices ─
144144
145145 tenant-service :
146146 << : *service-defaults
@@ -299,22 +299,24 @@ services:
299299 management-ui :
300300 container_name : serviceforge-management-ui
301301 build :
302- context : ../..
303- dockerfile : apps/management-ui/Dockerfile
302+ context : ../../apps/management-ui
303+ dockerfile : Dockerfile
304+ args :
305+ # NEXT_PUBLIC_* vars are baked into the bundle at build time.
306+ # The gateway is exposed on the host at port 8081 so the browser can reach it.
307+ NEXT_PUBLIC_API_URL : http://localhost:8081
308+ NEXT_PUBLIC_GATEWAY_URL : http://localhost:8081
309+ NEXT_PUBLIC_AUTH_URL : http://localhost:8082
310+ NEXT_PUBLIC_TENANT_URL : http://localhost:8083
311+ NEXT_PUBLIC_BOOKING_URL : http://localhost:8084
312+ NEXT_PUBLIC_CONFIG_URL : http://localhost:8085
304313 depends_on :
305314 api-gateway :
306315 condition : service_healthy
307316 ports :
308317 - " 3000:3000"
309- environment :
310- NEXT_PUBLIC_API_URL : http://localhost:8081
311- NEXT_PUBLIC_GATEWAY_URL : http://localhost:8081
312- NEXT_PUBLIC_AUTH_URL : http://localhost:8082
313- NEXT_PUBLIC_TENANT_URL : http://localhost:8083
314- NEXT_PUBLIC_BOOKING_URL : http://localhost:8084
315- NEXT_PUBLIC_CONFIG_URL : http://localhost:8085
316318
317- # ── Volumes ────────────────────────────────────────────────────────────────── ─
319+ # Volumes ─
318320
319321volumes :
320322 pgdata :
0 commit comments