41 lines
952 B
YAML
41 lines
952 B
YAML
# Local development: Postgres + Redis + the app. Mirrors what Miabi wires up
|
|
# for you (managed databases attached to the app via env vars).
|
|
services:
|
|
db:
|
|
image: postgres:17-alpine
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: guestbook
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 3s
|
|
timeout: 3s
|
|
retries: 10
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- db-data:/var/lib/postgresql/data
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
|
|
app:
|
|
build: .
|
|
environment:
|
|
PORT: 8080
|
|
DATABASE_URL: postgres://postgres:postgres@db:5432/guestbook?sslmode=disable
|
|
REDIS_URL: redis://redis:6379
|
|
ADMIN_TOKEN: ${ADMIN_TOKEN:-change-me}
|
|
DEBUG_ENDPOINTS: "true"
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_started
|
|
ports:
|
|
- "8080:8080"
|
|
|
|
volumes:
|
|
db-data:
|