-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
71 lines (71 loc) · 3.59 KB
/
Copy pathdocker-compose.yml
File metadata and controls
71 lines (71 loc) · 3.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: distributed-file-processing
services:
postgres:
image: postgres:18-alpine
environment: { POSTGRES_DB: fileprocessing, POSTGRES_USER: fileprocessing, POSTGRES_PASSWORD: "${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in .env}" }
ports: ["5432:5432"]
volumes: ["postgres-data:/var/lib/postgresql/data"]
healthcheck: { test: ["CMD-SHELL", "pg_isready -U fileprocessing -d fileprocessing"], interval: 5s, timeout: 5s, retries: 20 }
rabbitmq:
image: rabbitmq:4-management-alpine
environment: { RABBITMQ_DEFAULT_USER: fileprocessing, RABBITMQ_DEFAULT_PASS: "${RABBITMQ_PASSWORD:?Set RABBITMQ_PASSWORD in .env}" }
ports: ["5672:5672", "15672:15672"]
volumes: ["rabbitmq-data:/var/lib/rabbitmq"]
healthcheck: { test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"], interval: 5s, timeout: 5s, retries: 20 }
redis:
image: redis:8-alpine
command: redis-server --appendonly yes
ports: ["6379:6379"]
volumes: ["redis-data:/data"]
healthcheck: { test: ["CMD", "redis-cli", "ping"], interval: 5s, timeout: 3s, retries: 20 }
minio:
image: minio/minio:latest
command: server /data --console-address ":9001"
environment: { MINIO_ROOT_USER: "${MINIO_ACCESS_KEY:?Set MINIO_ACCESS_KEY in .env}", MINIO_ROOT_PASSWORD: "${MINIO_SECRET_KEY:?Set MINIO_SECRET_KEY in .env}" }
ports: ["9000:9000", "9001:9001"]
volumes: ["minio-data:/data"]
healthcheck: { test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"], interval: 5s, timeout: 5s, retries: 20 }
clamav:
image: clamav/clamav:stable
ports: ["3310:3310"]
volumes: ["clamav-data:/var/lib/clamav"]
healthcheck: { test: ["CMD-SHELL", "echo PING | nc localhost 3310 | grep PONG"], interval: 15s, timeout: 5s, retries: 40, start_period: 60s }
api:
build: { context: ., dockerfile: src/FileProcessing.Api/Dockerfile }
environment:
ASPNETCORE_URLS: "http://+:8080"
ASPNETCORE_ENVIRONMENT: Development
OTEL_EXPORTER_OTLP_ENDPOINT: ""
ConnectionStrings__PostgreSql: "Host=postgres;Port=5432;Database=fileprocessing;Username=fileprocessing;Password=${POSTGRES_PASSWORD}"
ConnectionStrings__Redis: "redis:6379"
Authentication__JwtKey: "${JWT_SIGNING_KEY:?Set JWT_SIGNING_KEY in .env}"
Authentication__ApiKey: "${FILE_PROCESSING_API_KEY:?Set FILE_PROCESSING_API_KEY in .env}"
RabbitMq__UserName: fileprocessing
RabbitMq__Password: "${RABBITMQ_PASSWORD}"
Minio__AccessKey: "${MINIO_ACCESS_KEY}"
Minio__SecretKey: "${MINIO_SECRET_KEY}"
ports: ["8080:8080"]
depends_on:
postgres: { condition: service_healthy }
rabbitmq: { condition: service_healthy }
redis: { condition: service_healthy }
minio: { condition: service_healthy }
restart: unless-stopped
worker:
build: { context: ., dockerfile: src/FileProcessing.Worker/Dockerfile }
deploy: { replicas: 2 }
environment:
ConnectionStrings__PostgreSql: "Host=postgres;Port=5432;Database=fileprocessing;Username=fileprocessing;Password=${POSTGRES_PASSWORD}"
ConnectionStrings__Redis: "redis:6379"
RabbitMq__UserName: fileprocessing
RabbitMq__Password: "${RABBITMQ_PASSWORD}"
Minio__AccessKey: "${MINIO_ACCESS_KEY}"
Minio__SecretKey: "${MINIO_SECRET_KEY}"
depends_on:
postgres: { condition: service_healthy }
rabbitmq: { condition: service_healthy }
redis: { condition: service_healthy }
minio: { condition: service_healthy }
clamav: { condition: service_healthy }
restart: unless-stopped
volumes: { postgres-data: {}, rabbitmq-data: {}, redis-data: {}, minio-data: {}, clamav-data: {} }