FieldOps/docker-compose.yml
2026-05-16 15:32:56 +01:00

60 lines
1.4 KiB
YAML

name: fieldops
services:
postgres:
image: postgres:16-alpine
container_name: fieldops-postgres
restart: unless-stopped
environment:
POSTGRES_USER: fieldops
POSTGRES_PASSWORD: fieldops
POSTGRES_DB: fieldops
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U fieldops -d fieldops"]
interval: 5s
timeout: 5s
retries: 10
minio:
image: minio/minio:latest
container_name: fieldops-minio
restart: unless-stopped
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER:-fieldops}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-fieldops123}
ports:
- "9000:9000"
- "9001:9001"
volumes:
- minio-data:/data
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 5s
timeout: 5s
retries: 10
minio-init:
image: minio/mc:latest
depends_on:
minio:
condition: service_started
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER:-fieldops}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-fieldops123}
entrypoint: >
/bin/sh -c "
sleep 3 &&
mc alias set local http://minio:9000 $$MINIO_ROOT_USER $$MINIO_ROOT_PASSWORD &&
mc mb -p local/fieldops || true &&
mc anonymous set none local/fieldops
"
volumes:
postgres-data:
minio-data: