83 lines
2.1 KiB
YAML
83 lines
2.1 KiB
YAML
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: silo-postgres
|
|
environment:
|
|
POSTGRES_DB: silo
|
|
POSTGRES_USER: silo
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-silodev}
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
- ../migrations:/docker-entrypoint-initdb.d:ro
|
|
ports:
|
|
- "5432:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U silo -d silo"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- silo-network
|
|
|
|
minio:
|
|
image: minio/minio:RELEASE.2023-05-04T21-44-30Z
|
|
container_name: silo-minio
|
|
command: server /data --console-address ":9001"
|
|
environment:
|
|
MINIO_ROOT_USER: ${MINIO_ACCESS_KEY:-silominio}
|
|
MINIO_ROOT_PASSWORD: ${MINIO_SECRET_KEY:-silominiosecret}
|
|
volumes:
|
|
- minio_data:/data
|
|
ports:
|
|
- "9000:9000"
|
|
- "9001:9001"
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- silo-network
|
|
|
|
silo:
|
|
build:
|
|
context: ..
|
|
dockerfile: build/package/Dockerfile
|
|
container_name: silo-api
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
minio:
|
|
condition: service_healthy
|
|
environment:
|
|
SILO_DB_HOST: postgres
|
|
SILO_DB_PORT: 5432
|
|
SILO_DB_NAME: silo
|
|
SILO_DB_USER: silo
|
|
SILO_DB_PASSWORD: ${POSTGRES_PASSWORD:-silodev}
|
|
SILO_MINIO_ENDPOINT: minio:9000
|
|
SILO_MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY:-silominio}
|
|
SILO_MINIO_SECRET_KEY: ${MINIO_SECRET_KEY:-silominiosecret}
|
|
SILO_MINIO_BUCKET: silo-files
|
|
SILO_MINIO_USE_SSL: "false"
|
|
ports:
|
|
- "8080:8080"
|
|
volumes:
|
|
- ../schemas:/etc/silo/schemas:ro
|
|
- ../configs/config.yaml:/etc/silo/config.yaml:ro
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-qO-", "http://localhost:8080/health"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 3
|
|
networks:
|
|
- silo-network
|
|
|
|
volumes:
|
|
postgres_data:
|
|
minio_data:
|
|
|
|
networks:
|
|
silo-network:
|
|
driver: bridge
|