docker-compose.yml: initial
Signed-off-by: supphakitd <67319010028@technictrang.ac.th>
This commit is contained in:
105
docker-compose.yml
Normal file
105
docker-compose.yml
Normal file
@@ -0,0 +1,105 @@
|
||||
networks:
|
||||
kong-api-gateway:
|
||||
name: kong-api-gateway
|
||||
driver: bridge
|
||||
external: true
|
||||
|
||||
services:
|
||||
redis:
|
||||
image: redis:latest
|
||||
restart: always
|
||||
container_name: redis
|
||||
ports:
|
||||
- '6379:6379'
|
||||
networks:
|
||||
- kong-api-gateway
|
||||
|
||||
kong-database:
|
||||
image: postgres:15
|
||||
container_name: kong-database
|
||||
environment:
|
||||
POSTGRES_USER: kong
|
||||
POSTGRES_DB: kong
|
||||
POSTGRES_PASSWORD: kongpass
|
||||
ports:
|
||||
- "55432:5432"
|
||||
volumes:
|
||||
- './data-kong:/var/lib/postgresql/data'
|
||||
networks:
|
||||
- kong-api-gateway
|
||||
|
||||
kong-migrations:
|
||||
image: kong:3.5
|
||||
container_name: kong-migrations
|
||||
depends_on:
|
||||
- kong-database
|
||||
environment:
|
||||
KONG_DATABASE: postgres
|
||||
KONG_PG_HOST: kong-database
|
||||
KONG_PG_USER: kong
|
||||
KONG_PG_PASSWORD: kongpass
|
||||
KONG_PG_DATABASE: kong
|
||||
networks:
|
||||
- kong-api-gateway
|
||||
|
||||
kong:
|
||||
image: kong:3.5
|
||||
container_name: kong-api-gateway
|
||||
depends_on:
|
||||
- kong-database
|
||||
environment:
|
||||
KONG_DATABASE: postgres
|
||||
KONG_PG_HOST: kong-database
|
||||
KONG_PG_USER: kong
|
||||
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_ADMIN_GUI_URL: http://10.9.0.0:8002
|
||||
KONG_ADMIN_GUI_LISTEN: 0.0.0.0:8002
|
||||
|
||||
KONG_ADMIN_ACCESS_LOG: /dev/stdout
|
||||
KONG_ADMIN_ERROR_LOG: /dev/stderr
|
||||
ports:
|
||||
- "8080:8080"
|
||||
- "8443:8443"
|
||||
- "8001:8001"
|
||||
- "8002:8002"
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
networks:
|
||||
- kong-api-gateway
|
||||
|
||||
accounting-api:
|
||||
image: accounting-api:latest
|
||||
container_name: accounting-api
|
||||
restart: always
|
||||
depends_on:
|
||||
- redis
|
||||
environment:
|
||||
REDIS_HOST: redis
|
||||
REDIS_PORT: 6379
|
||||
PG_HOST: accounting-database
|
||||
PG_PASS: ttc@2026
|
||||
networks:
|
||||
- kong-api-gateway
|
||||
ports:
|
||||
- "1012:1012"
|
||||
- "1013:1013"
|
||||
|
||||
accounting-database:
|
||||
image: postgres:16
|
||||
container_name: accounting-database
|
||||
restart: always
|
||||
shm_size: 128mb
|
||||
environment:
|
||||
POSTGRES_PASSWORD: ttc@2026
|
||||
POSTGRES_DB: ttc
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- './accounting-db:/var/lib/postgresql/data'
|
||||
networks:
|
||||
- kong-api-gateway
|
||||
|
||||
Reference in New Issue
Block a user