@@ -38,17 +38,17 @@ services:
3838 timeout : 5s
3939 retries : 5
4040
41- lt- billing-postgres :
41+ billing-postgres :
4242 image : postgres:17.2-bookworm
4343 container_name : lavatop-billing-postgres
4444 environment :
45- POSTGRES_USER : ${LT_BILLING_DB_USER }
46- POSTGRES_PASSWORD : ${LT_BILLING_DB_PASS }
47- POSTGRES_DB : ${LT_BILLING_DB_DATABASE }
45+ POSTGRES_USER : ${BILLING_DB_USER }
46+ POSTGRES_PASSWORD : ${BILLING_DB_PASS }
47+ POSTGRES_DB : ${BILLING_DB_DATABASE }
4848 ports :
4949 - " 5435:5432"
5050 volumes :
51- - lt- billing-postgres_data:/var/lib/postgresql/data
51+ - billing-postgres_data:/var/lib/postgresql/data
5252 healthcheck :
5353 test : [ "CMD-SHELL", "pg_isready -U ${DB_USER}" ]
5454 interval : 10s
@@ -85,19 +85,19 @@ services:
8585 plan-postgres :
8686 condition : service_healthy
8787
88- lt- billing-ctx-migrator :
88+ billing-ctx-migrator :
8989 build :
9090 context : ./src
91- container_name : lt- billing-ctx-migrator
91+ container_name : billing-ctx-migrator
9292 environment :
9393 - MODE=migrator
94- - DB_DATABASE=${LT_BILLING_DB_DATABASE }
95- - DB_USER=${LT_BILLING_DB_USER }
96- - DB_PASS=${LT_BILLING_DB_PASS }
97- - DB_HOST=${LT_BILLING_DB_HOST }
98- - DB_PORT=${LT_BILLING_DB_PORT }
94+ - DB_DATABASE=${BILLING_DB_DATABASE }
95+ - DB_USER=${BILLING_DB_USER }
96+ - DB_PASS=${BILLING_DB_PASS }
97+ - DB_HOST=${BILLING_DB_HOST }
98+ - DB_PORT=${BILLING_DB_PORT }
9999 depends_on :
100- lt- billing-postgres :
100+ billing-postgres :
101101 condition : service_healthy
102102
103103 google-auth-api :
@@ -263,6 +263,99 @@ services:
263263 timeout : 5s
264264 retries : 3
265265 start_period : 5s
266+
267+ billing-cache :
268+ image : valkey/valkey:8.0-bookworm
269+ container_name : billing-cache
270+ ports :
271+ - " 6380:6379"
272+ volumes :
273+ - billing-cache_data:/data
274+ healthcheck :
275+ test : ["CMD", "redis-cli", "ping"]
276+ interval : 30s
277+ timeout : 5s
278+ retries : 3
279+ start_period : 5s
280+
281+ billing-api :
282+ build :
283+ context : ./src
284+ container_name : billing-api
285+ ports :
286+ - " 4040:4040"
287+ environment :
288+ - MODE=billing-api
289+ - HTTP_PORT=4040
290+ - ALLOWED_ORIGINS=*
291+ - DB_DATABASE=${BILLING_DB_DATABASE}
292+ - DB_HOST=${BILLING_DB_HOST}
293+ - DB_PASS=${BILLING_DB_PASS}
294+ - DB_PORT=${BILLING_DB_PORT}
295+ - DB_USER=${BILLING_DB_USER}
296+ - TC_CACHE_HOST=${BILLING_CACHE_HOST}
297+ - TC_CACHE_PORT=${BILLING_CACHE_PORT}
298+ - TC_CACHE_USER=${BILLING_CACHE_USER}
299+ depends_on :
300+ init-kafka-topics :
301+ condition : service_completed_successfully
302+ billing-postgres :
303+ condition : service_healthy
304+ kafka :
305+ condition : service_healthy
306+ billing-cache :
307+ condition : service_healthy
308+
309+ plans-api :
310+ build :
311+ context : ./src
312+ container_name : plans-api
313+ ports :
314+ - " 9090:9090"
315+ environment :
316+ - MODE=plans-api
317+ - HTTP_PORT=9090
318+ - ALLOWED_ORIGINS=*
319+ - DB_DATABASE=${PLANS_DB_DATABASE}
320+ - DB_HOST=${PLANS_DB_HOST}
321+ - DB_PASS=${PLANS_DB_PASS}
322+ - DB_PORT=${PLANS_DB_PORT}
323+ - DB_USER=${PLANS_DB_USER}
324+ - TC_CACHE_HOST=${TC_CACHE_HOST}
325+ - TC_CACHE_PORT=${TC_CACHE_PORT}
326+ - TC_CACHE_USER=${TC_CACHE_USER}
327+ depends_on :
328+ init-kafka-topics :
329+ condition : service_completed_successfully
330+ kafka :
331+ condition : service_healthy
332+ plan-controller-cache :
333+ condition : service_healthy
334+
335+ crypto-cloud-billing-api :
336+ build :
337+ context : ./src
338+ container_name : crypto-cloud-billing-api
339+ ports :
340+ - " 2020:2020"
341+ environment :
342+ - MODE=crypto-cloud-billing-api
343+ - HTTP_PORT=2020
344+ - ALLOWED_ORIGINS=${CC_BILLING_ALLOWED_ORIGINS}
345+ - BILLING_KAFKA_AUTO_OFFSET_RESET=${CC_BILLING_KAFKA_AUTO_OFFSET_RESET}
346+ - BILLING_KAFKA_BOOTSTRAP_SERVERS=${CC_BILLING_KAFKA_BOOTSTRAP_SERVERS}
347+ - BILLING_KAFKA_GROUP_ID=${CC_BILLING_KAFKA_GROUP_ID}
348+ - BILLING_KAFKA_TOPIC=${CC_BILLING_KAFKA_TOPIC}
349+ - API_KEY=${CC_BILLING_API_KEY}
350+ - SECRET_KEY=${CC_BILLING_SECRET_KEY}
351+ - SHOP_ID=${CC_BILLING_SHOP_ID}
352+ depends_on :
353+ init-kafka-topics :
354+ condition : service_completed_successfully
355+ kafka :
356+ condition : service_healthy
357+ plan-controller-cache :
358+ condition : service_healthy
266359
267360 plan-controller :
268361 build :
@@ -305,5 +398,6 @@ services:
305398volumes :
306399 postgres_data :
307400 plan-postgres_data :
308- lt- billing-postgres_data :
401+ billing-postgres_data :
309402 plan-controller-cache_data :
403+ billing-cache_data :
0 commit comments