From 1af7defb90a25068eec94dcbdaa73bb0ee769fdc Mon Sep 17 00:00:00 2001 From: supphakitd <67319010028@technictrang.ac.th> Date: Sat, 22 Nov 2025 23:55:51 +0700 Subject: [PATCH] docker-compose.yml: separate network between api and kong --- docker-compose.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index aa8141d..66ce3bd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,6 +3,10 @@ networks: name: kong-api-gateway driver: bridge external: true + accounting-api: + name: accounting-api + driver: bridge + external: true services: redis: @@ -12,7 +16,7 @@ services: ports: - '6379:6379' networks: - - kong-api-gateway + - accounting-api kong-database: image: postgres:15 @@ -54,7 +58,7 @@ services: KONG_PG_PASSWORD: kongpass KONG_PG_DATABASE: kong KONG_ADMIN_LISTEN: 0.0.0.0:8001 - KONG_PROXY_LISTEN: 0.0.0.0:8080, 0.0.0.0:8443 ssl + KONG_PROXY_LISTEN: 0.0.0.0:8000, 0.0.0.0:8443 ssl KONG_ADMIN_GUI_URL: http://10.9.0.0:8002 KONG_ADMIN_GUI_LISTEN: 0.0.0.0:8002 @@ -62,7 +66,7 @@ services: KONG_ADMIN_ACCESS_LOG: /dev/stdout KONG_ADMIN_ERROR_LOG: /dev/stderr ports: - - "8080:8080" + - "8000:8000" - "8443:8443" - "8001:8001" - "8002:8002" @@ -83,8 +87,9 @@ services: PG_HOST: accounting-database PG_PASS: ttc@2026 networks: - - kong-api-gateway + - accounting-api ports: + - "1011:1011" - "1012:1012" - "1013:1013" @@ -96,10 +101,10 @@ services: environment: POSTGRES_PASSWORD: ttc@2026 POSTGRES_DB: ttc + networks: + - accounting-api ports: - "5432:5432" volumes: - './accounting-db:/var/lib/postgresql/data' - networks: - - kong-api-gateway