-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
119 lines (113 loc) · 3.08 KB
/
docker-compose.yml
File metadata and controls
119 lines (113 loc) · 3.08 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
services:
postgres:
image: postgres:16-alpine
container_name: pipeline-postgres
ports:
- "5432:5432"
environment:
POSTGRES_USER: pipeline
POSTGRES_PASSWORD: pipeline
POSTGRES_DB: pipeline
healthcheck:
test: ["CMD-SHELL", "pg_isready -U pipeline -d pipeline"]
interval: 5s
timeout: 3s
retries: 5
rabbitmq:
image: rabbitmq:3-management
container_name: pipeline-rabbitmq
ports:
- "5672:5672"
- "15672:15672"
environment:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
interval: 10s
timeout: 5s
retries: 5
minio:
image: minio/minio:latest
container_name: pipeline-minio
ports:
- "9000:9000"
- "9001:9001"
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
command: server /data --console-address ":9001"
minio-init:
image: minio/mc:latest
depends_on:
- minio
entrypoint: >
/bin/sh -c "
sleep 3 &&
mc alias set myminio http://minio:9000 minioadmin minioadmin &&
mc mb myminio/uploads --ignore-existing || true
"
restart: "no"
upload-api:
build:
context: .
dockerfile: upload-api/Dockerfile
container_name: pipeline-upload-api
ports:
- "8080:8080"
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/pipeline
SPRING_DATASOURCE_USERNAME: pipeline
SPRING_DATASOURCE_PASSWORD: pipeline
SPRING_RABBITMQ_HOST: rabbitmq
SPRING_RABBITMQ_PORT: "5672"
MINIO_ENDPOINT: http://minio:9000
MINIO_ACCESS_KEY: minioadmin
MINIO_SECRET_KEY: minioadmin
MINIO_BUCKET: uploads
MINIO_REGION: us-east-1
depends_on:
postgres:
condition: service_healthy
rabbitmq:
condition: service_healthy
minio-init:
condition: service_completed_successfully
worker:
build:
context: .
dockerfile: worker/Dockerfile
container_name: pipeline-worker
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/pipeline
SPRING_DATASOURCE_USERNAME: pipeline
SPRING_DATASOURCE_PASSWORD: pipeline
SPRING_RABBITMQ_HOST: rabbitmq
SPRING_RABBITMQ_PORT: "5672"
MINIO_ENDPOINT: http://minio:9000
MINIO_ACCESS_KEY: minioadmin
MINIO_SECRET_KEY: minioadmin
MINIO_BUCKET: uploads
MINIO_REGION: us-east-1
depends_on:
postgres:
condition: service_healthy
rabbitmq:
condition: service_healthy
minio-init:
condition: service_completed_successfully
restart: unless-stopped
prometheus:
image: prom/prometheus:latest
container_name: pipeline-prometheus
ports:
- "9090:9090"
volumes:
- ./prometheus-docker.yml:/etc/prometheus/prometheus.yml:ro
command:
- --config.file=/etc/prometheus/prometheus.yml
- --storage.tsdb.path=/prometheus
- --web.enable-lifecycle
depends_on:
- upload-api
restart: unless-stopped