docker-compose.yml: separate network between api and kong
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user