go-mad/docker-compose.yml

32 lines
775 B
YAML
Raw Permalink Normal View History

2026-10-04 16:20:07 +02:00
services:
2026-10-07 15:17:40 +02:00
postgres:
2026-10-04 16:20:07 +02:00
image: postgres:15-alpine
container_name: go-mad-postgres
environment:
POSTGRES_USER: mad
POSTGRES_PASSWORD: mad
POSTGRES_DB: mad
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U mad -d mad"]
interval: 5s
timeout: 5s
retries: 5
go-mad:
build:
context: .
dockerfile: Dockerfile
container_name: go-mad
depends_on:
2026-10-07 15:17:40 +02:00
postgres:
2026-10-04 16:20:07 +02:00
condition: service_healthy
environment:
2026-10-07 15:17:40 +02:00
GO_MAD_DATABASE_URL: postgres://mad:mad@postgres:5432/mad?sslmode=disable
2026-10-04 16:20:07 +02:00
GO_MAD_SERVER_PORT: "8080"
GO_MAD_JWT_SECRET: change-me-to-a-32-plus-char-secret
ports:
2026-10-07 15:17:40 +02:00
- "8080:8080"
2026-10-04 16:20:07 +02:00
volumes:
2026-10-07 15:17:40 +02:00
postgres_data: