go-guess/docker-compose.yml
2026-10-03 01:20:14 +02:00

82 lines
2.2 KiB
YAML

services:
db:
image: postgres:18-alpine
environment:
POSTGRES_DB: go_guess
POSTGRES_USER: go_guess
POSTGRES_PASSWORD: go_guess
networks:
- go_guess_network
ports:
- "${DB_PORT:-5432}:5432"
volumes:
- postgres_data3:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U go_guess -d go_guess"]
interval: 3s
timeout: 3s
retries: 20
rabbitmq:
image: rabbitmq:4-management-alpine
networks:
- go_guess_network
ports:
- "${RABBITMQ_AMQP_PORT:-5672}:5672"
- "${RABBITMQ_MANAGEMENT_PORT:-15672}:15672"
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
interval: 5s
timeout: 5s
retries: 20
api:
build: ./backend
image: batty1039.startdedicated.net:5000/go-guess-api:0.0.1
environment:
DATABASE_URL: postgres://go_guess:go_guess@db:5432/go_guess?sslmode=disable
JWT_SECRET: local-development-secret-change-me-12345
FRONTEND_URL: ${FRONTEND_URL:-https://nmbs.guess.local}
APP_ENV: ${APP_ENV:-development}
GO_LOOSE_AUTH_DOMAIN: auth.dev
GO_LOOSE_APP_DOMAIN: guess.dev
GO_LOOSE_CA_FILE: /certs/local-ca.crt
GO_LOOSE_NMBS_CLIENT_ID: ${GO_LOOSE_NMBS_CLIENT_ID:-}
GO_LOOSE_NMBS_CLIENT_SECRET: ${GO_LOOSE_NMBS_CLIENT_SECRET:-}
GO_LOOSE_YPTO_CLIENT_ID: ${GO_LOOSE_YPTO_CLIENT_ID:-}
GO_LOOSE_YPTO_CLIENT_SECRET: ${GO_LOOSE_YPTO_CLIENT_SECRET:-}
RABBITMQ_URL: amqp://guest:guest@rabbitmq:5672/
expose:
- "8080"
networks:
- go_guess_network
- local_dev_edge
volumes:
- ${LOCAL_CA_FILE:-../infrastructure/certs/local-ca.crt}:/certs/local-ca.crt:ro
depends_on:
db:
condition: service_healthy
rabbitmq:
condition: service_healthy
web:
build: ./frontend
image: batty1039.startdedicated.net:5000/go-guess-web:0.0.1
expose:
- "80"
depends_on:
- api
networks:
go_guess_network: {}
local_dev_edge:
aliases:
- go-guess-web
networks:
go_guess_network:
local_dev_edge:
external: true
name: local-dev-edge
volumes:
postgres_data:
postgres_data2:
postgres_data3: