go-mad/docker-compose.yml

35 lines
853 B
YAML
Raw Normal View History

2026-10-04 16:20:07 +02:00
services:
go-mad-database:
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:
go-mad-database:
condition: service_healthy
extra_hosts:
- "go-mad-database:host-gateway"
environment:
GO_MAD_DATABASE_URL: postgres://mad:mad@go-mad-database:5432/mad?sslmode=disable
GO_MAD_SERVER_PORT: "8080"
GO_MAD_JWT_SECRET: change-me-to-a-32-plus-char-secret
ports:
- "8081:8080"
volumes:
postgres_data: