go-guess/docker-compose.yml

79 lines
1.9 KiB
YAML
Raw Normal View History

2026-09-19 20:31:14 +02:00
services:
db:
image: postgres:18-alpine
environment:
POSTGRES_DB: go_guess
POSTGRES_USER: go_guess
POSTGRES_PASSWORD: go_guess
2026-10-02 18:50:37 +02:00
networks:
- go_guess_network
2026-09-19 20:31:14 +02:00
ports:
- "${DB_PORT:-5432}:5432"
volumes:
2026-10-01 09:06:58 +02:00
- postgres_data3:/var/lib/postgresql
2026-09-19 20:31:14 +02:00
healthcheck:
test: ["CMD-SHELL", "pg_isready -U go_guess -d go_guess"]
interval: 3s
timeout: 3s
retries: 20
rabbitmq:
image: rabbitmq:4-management-alpine
2026-10-02 18:50:37 +02:00
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
2026-09-19 20:31:14 +02:00
api:
build: ./backend
environment:
DATABASE_URL: postgres://go_guess:go_guess@db:5432/go_guess?sslmode=disable
JWT_SECRET: local-development-secret-change-me-12345
2026-10-02 21:44:26 +02:00
FRONTEND_URL: ${FRONTEND_URL:-https://nmbs.guess.local}
APP_ENV: ${APP_ENV:-development}
2026-10-02 21:44:26 +02:00
GO_LOOSE_BASE_URL: ${GO_LOOSE_BASE_URL:-https://%s.auth.dev}
SSL_CERT_FILE: /certs/local-ca.crt
RABBITMQ_URL: amqp://guest:guest@rabbitmq:5672/
2026-10-02 21:44:26 +02:00
expose:
- "8080"
2026-10-02 18:50:37 +02:00
networks:
- go_guess_network
2026-10-02 21:44:26 +02:00
- local_dev_edge
volumes:
- ${LOCAL_DEV_CERTS_DIR:-/home/dnoulet/go/infrasctruture/certs}/local-ca.crt:/certs/local-ca.crt:ro
2026-09-19 20:31:14 +02:00
depends_on:
db:
condition: service_healthy
rabbitmq:
condition: service_healthy
2026-09-19 20:31:14 +02:00
web:
2026-10-02 21:44:26 +02:00
build:
context: ./frontend
args:
VITE_GO_LOOSE_API_KEY: ${VITE_GO_LOOSE_API_KEY:-}
expose:
- "80"
2026-09-19 20:31:14 +02:00
depends_on:
- api
2026-10-02 18:50:37 +02:00
networks:
2026-10-02 21:44:26 +02:00
go_guess_network: {}
local_dev_edge:
aliases:
- go-guess-web
2026-10-02 18:50:37 +02:00
networks:
go_guess_network:
2026-10-02 21:44:26 +02:00
local_dev_edge:
external: true
name: local-dev-edge
2026-09-19 20:31:14 +02:00
volumes:
postgres_data:
2026-10-01 09:06:58 +02:00
postgres_data2:
postgres_data3: