Some checks failed
Build and Publish / build-release (push) Has been cancelled
90 lines
2.4 KiB
YAML
90 lines
2.4 KiB
YAML
services:
|
|
rabbitmq:
|
|
image: rabbitmq:3.13-management
|
|
container_name: policy_service_rabbitmq
|
|
ports:
|
|
- "5672:5672" # AMQP
|
|
- "15672:15672" # Management UI
|
|
environment:
|
|
RABBITMQ_DEFAULT_USER: guest
|
|
RABBITMQ_DEFAULT_PASS: guest
|
|
volumes:
|
|
- rabbitmq_data:/var/lib/rabbitmq
|
|
- ./rabbitmq/definitions.json:/etc/rabbitmq/definitions.json
|
|
- ./rabbitmq/rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf
|
|
healthcheck:
|
|
test: ["CMD", "rabbitmq-diagnostics", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: policy_postgres
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: policy_service_dev
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- customer_pg_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
minio:
|
|
image: minio/minio
|
|
ports:
|
|
- "9000:9000"
|
|
- "9001:9001"
|
|
environment:
|
|
MINIO_ROOT_USER: minioadmin
|
|
MINIO_ROOT_PASSWORD: minioadmin
|
|
command: server /data --console-address ":9001"
|
|
volumes:
|
|
- minio_data:/data
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
minio_init:
|
|
image: minio/mc
|
|
depends_on:
|
|
minio:
|
|
condition: service_healthy
|
|
entrypoint: >
|
|
/bin/sh -c "
|
|
mc alias set local http://minio:9000 minioadmin minioadmin;
|
|
mc mb --ignore-existing local/policy-bucket;
|
|
mc anonymous set download local/policy-bucket/solicitations;
|
|
exit 0;
|
|
"
|
|
|
|
app:
|
|
image: policy_service:3vhql9vd8pm9fwad3q5hp5qs4i7nqb3n
|
|
ports:
|
|
- "4000:4000"
|
|
environment:
|
|
MIX_ENV: prod
|
|
PORT: "4000"
|
|
PHX_HOST: "0.0.0.0"
|
|
PHX_SERVER: "true"
|
|
DATABASE_URL: "ecto://postgres:postgres@postgres:5432/policy_service_dev"
|
|
SECRET_KEY_BASE: "dGVzdF9zZWNyZXRrZXlfYmFzZV9mb3JfdGVzdGluZ19wdXJwb3Nlcw=="
|
|
AMQP_URL: "amqp://guest:guest@rabbitmq:5672"
|
|
RELEASE_COOKIE: "test-cookie"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
rabbitmq:
|
|
condition: service_healthy
|
|
|
|
volumes:
|
|
customer_pg_data:
|
|
rabbitmq_data:
|
|
minio_data:
|