docker-compose.yml
Rama main · réplica de lectura del repositorio original.
# Local development dependencies for Cairn: Postgres (metadata) + Garage
# (S3-compatible object storage for content-addressed bodies). See ADR-0008
# and ADR-0033.
#
# Garage is the store CI's integration job tests against
# (`.gitea/workflows/pipeline.yaml`), so the bucket developers point at is the one
# cairn's S3 code is actually exercised against rather than merely assumed
# compatible. Unlike MinIO it refuses to serve S3 until a node has a role and an
# access key exists: `make up` runs `scripts/s3-bootstrap.sh` for that, and
# re-running it is safe.
services:
postgres:
image: postgres:18-alpine
environment:
POSTGRES_USER: cairn
POSTGRES_PASSWORD: cairn
POSTGRES_DB: cairn
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U cairn"]
interval: 2s
timeout: 3s
retries: 15
volumes:
- pgdata:/var/lib/postgresql
garage:
image: dxflrs/garage:v2.5.0
volumes:
# Materialized once by `make up` from garage/garage.toml.example, with a
# per-machine rpc_secret. Never committed.
- ./garage/garage.toml:/etc/garage.toml:ro
- garagedata:/var/lib/garage
ports:
# Published on the host's 9000 so cairn's documented default endpoint
# (CAIRN_S3_ENDPOINT=localhost:9000) still works with no override; Garage's
# own S3 API listens on 3900.
- "9000:3900"
healthcheck:
test: ["CMD", "/garage", "status"]
interval: 5s
timeout: 3s
retries: 30
volumes:
pgdata:
garagedata: