services: postgres: 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: postgres: condition: service_healthy environment: GO_MAD_DATABASE_URL: postgres://mad:mad@postgres:5432/mad?sslmode=disable GO_MAD_SERVER_PORT: "8080" GO_MAD_JWT_SECRET: change-me-to-a-32-plus-char-secret ports: - "8080:8080" volumes: postgres_data: