# Gannet local development stack: # - MinIO: S3-compatible object storage (durable source of truth) # - minio-init: one-shot bucket bootstrap # - gannet-server: the API server, built from this repository # # Usage: docker compose up -d --build (or: gannet dev up) services: minio: image: minio/minio:RELEASE.2024-06-13T22-53-53Z command: server /data --console-address ":9001" environment: MINIO_ROOT_USER: gannet MINIO_ROOT_PASSWORD: gannet-dev-secret ports: - "9000:9000" # S3 API - "9001:9001" # Web console volumes: - minio-data:/data healthcheck: test: ["CMD", "mc", "ready", "local"] interval: 3s timeout: 5s retries: 10 minio-init: image: minio/mc:RELEASE.2024-06-12T14-34-03Z depends_on: minio: condition: service_healthy entrypoint: > /bin/sh -c " mc alias set local http://minio:9000 gannet gannet-dev-secret && mc mb --ignore-existing local/gannet-dev && mc anonymous set none local/gannet-dev && echo 'bucket gannet-dev ready' " gannet-server: build: context: . dockerfile: Dockerfile depends_on: minio-init: condition: service_completed_successfully environment: GANNET_CONFIG: /etc/gannet/gannet.toml AWS_ACCESS_KEY_ID: gannet AWS_SECRET_ACCESS_KEY: gannet-dev-secret AWS_REGION: us-east-1 RUST_LOG: info volumes: - ./config/gannet.docker.toml:/etc/gannet/gannet.toml:ro ports: - "8080:8080" healthcheck: test: ["CMD", "curl", "-fsS", "http://localhost:8080/v1/health"] interval: 5s timeout: 3s retries: 12 start_period: 10s volumes: minio-data: