Initial commit
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
# Local dev dependencies for the ditto.site service.
|
||||
# Postgres is the database AND the job queue (pg-boss). MinIO (S3-compatible blob
|
||||
# store) is added with M4. Bring up with: `docker compose up -d`.
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: ditto_site
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- pgdata:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
minio:
|
||||
image: minio/minio
|
||||
command: server /data --console-address ":9001"
|
||||
environment:
|
||||
MINIO_ROOT_USER: minioadmin
|
||||
MINIO_ROOT_PASSWORD: minioadmin
|
||||
ports:
|
||||
- "9000:9000"
|
||||
- "9001:9001"
|
||||
volumes:
|
||||
- miniodata:/data
|
||||
healthcheck:
|
||||
test: ["CMD", "mc", "ready", "local"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
# The app services (build from this repo). Enable with `--profile app`:
|
||||
# docker compose --profile app up --build
|
||||
api:
|
||||
profiles: ["app"]
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/api.Dockerfile
|
||||
environment:
|
||||
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/ditto_site
|
||||
S3_ENDPOINT: http://minio:9000
|
||||
S3_BUCKET: ditto-site-artifacts
|
||||
S3_ACCESS_KEY_ID: minioadmin
|
||||
S3_SECRET_ACCESS_KEY: minioadmin
|
||||
S3_FORCE_PATH_STYLE: "true"
|
||||
PORT: "8787"
|
||||
ports:
|
||||
- "8787:8787"
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
minio:
|
||||
condition: service_started
|
||||
|
||||
worker:
|
||||
profiles: ["app"]
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/worker.Dockerfile
|
||||
environment:
|
||||
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/ditto_site
|
||||
S3_ENDPOINT: http://minio:9000
|
||||
S3_BUCKET: ditto-site-artifacts
|
||||
S3_ACCESS_KEY_ID: minioadmin
|
||||
S3_SECRET_ACCESS_KEY: minioadmin
|
||||
S3_FORCE_PATH_STYLE: "true"
|
||||
CACHE_STALE_AFTER: 24h
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
minio:
|
||||
condition: service_started
|
||||
|
||||
volumes:
|
||||
pgdata: {}
|
||||
miniodata: {}
|
||||
Reference in New Issue
Block a user