Files

111 lines
2.3 KiB
YAML
Raw Permalink Normal View History

networks:
kong-api-gateway:
name: kong-api-gateway
driver: bridge
external: true
accounting-api:
name: accounting-api
driver: bridge
external: true
services:
redis:
image: redis:latest
restart: always
container_name: redis
ports:
- '6379:6379'
networks:
- accounting-api
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: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
KONG_ADMIN_ACCESS_LOG: /dev/stdout
KONG_ADMIN_ERROR_LOG: /dev/stderr
ports:
- "8000:8000"
- "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:
- accounting-api
ports:
- "1011:1011"
- "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
networks:
- accounting-api
ports:
- "5432:5432"
volumes:
- './accounting-db:/var/lib/postgresql/data'