92 lines
2.0 KiB
YAML
92 lines
2.0 KiB
YAML
x-app-common: &app-common
|
|
build:
|
|
context: ..
|
|
dockerfile: build/package/Dockerfile
|
|
environment: &app-environment
|
|
PORT: 8080
|
|
DB_URL: postgres://gis:gis@postgres:5432/gis?sslmode=disable
|
|
S3_ENDPOINT: minio:9000
|
|
S3_ACCESS_KEY: minioadmin
|
|
S3_SECRET_KEY: minioadmin
|
|
S3_BUCKET: geofiles
|
|
S3_USE_SSL: "false"
|
|
RABBITMQ_URL: amqp://guest:guest@rabbitmq:5672/
|
|
RABBITMQ_EXCHANGE: gis.events
|
|
RABBITMQ_QUEUE: gis.events.example
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
minio:
|
|
condition: service_healthy
|
|
rabbitmq:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
|
|
services:
|
|
app:
|
|
<<: *app-common
|
|
command: ["serve"]
|
|
ports:
|
|
- "8080:8080"
|
|
|
|
worker:
|
|
<<: *app-common
|
|
command: ["worker"]
|
|
|
|
postgres:
|
|
image: postgis/postgis:17-3.5
|
|
environment:
|
|
POSTGRES_USER: gis
|
|
POSTGRES_PASSWORD: gis
|
|
POSTGRES_DB: gis
|
|
ports:
|
|
- "${DB_PORT:-5432}:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U gis -d gis"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
|
|
minio:
|
|
image: minio/minio:latest
|
|
command: server /data --console-address ":9001"
|
|
ports:
|
|
- "9000:9000"
|
|
- "9001:9001"
|
|
environment:
|
|
MINIO_ROOT_USER: minioadmin
|
|
MINIO_ROOT_PASSWORD: minioadmin
|
|
volumes:
|
|
- minio_data:/data
|
|
healthcheck:
|
|
test: ["CMD", "mc", "ready", "local"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
|
|
rabbitmq:
|
|
image: rabbitmq:3-management
|
|
ports:
|
|
- "5672:5672"
|
|
- "15672:15672"
|
|
environment:
|
|
RABBITMQ_DEFAULT_USER: guest
|
|
RABBITMQ_DEFAULT_PASS: guest
|
|
volumes:
|
|
- rabbitmq_data:/var/lib/rabbitmq
|
|
healthcheck:
|
|
test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
postgres_data:
|
|
minio_data:
|
|
rabbitmq_data:
|