-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
162 lines (148 loc) · 3.39 KB
/
docker-compose.yaml
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
version: '3.8'
services:
migrate:
image: migrate/migrate
networks:
- cv
volumes:
- ./user-service/migrations:/migrations
command: [ "-path", "/migrations", "-database", "postgres://postgres:root@cvmaker_postgres:5432/resume?sslmode=disable", "up" ]
depends_on:
postgres-db:
condition: service_healthy
minio:
image: docker.io/bitnami/minio:2024
ports:
- '9000:9000'
- '9001:9001'
networks:
- cv
volumes:
- 'minio_data:/data'
environment:
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin
- MINIO_DEFAULT_BUCKETS=resumes
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:9000/minio/health/live || exit 1"]
interval: 30s
timeout: 10s
retries: 5
postgres-db:
container_name: cvmaker_postgres
image: postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: root
PGDATA: /data/postgres
POSTGRES_DB: resume
volumes:
- db:/data/postgres
ports:
- "5431:5432"
networks:
- cv
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -d postgres"]
interval: 30s
timeout: 10s
retries: 5
redis-db:
container_name: cvmaker_redis-db
image: redis
ports:
- "6380:6380"
restart: unless-stopped
networks:
- cv
rabbitmq:
image: rabbitmq:3-management
ports:
- "5673:5672"
- "15673:15672"
networks:
- cv
volumes:
- rabbitmq_data:/var/lib/rabbitmq
restart: unless-stopped
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
interval: 10s
timeout: 5s
retries: 5
start_period: 40s
user-service:
container_name: cvmaker_user-service
build: ./user-service
depends_on:
postgres-db:
condition: service_healthy
ports:
- "9090:9090"
networks:
- cv
resume-service:
container_name: cvmaker_resume-service
build: ./resume-service
depends_on:
postgres-db:
condition: service_healthy
user-service:
condition: service_started
ports:
- "9080:9080"
networks:
- cv
api-service:
container_name: cvmaker_api-service
build: ./api-service
depends_on:
redis-db:
condition: service_started
postgres-db:
condition: service_started
resume-service:
condition: service_started
user-service:
condition: service_started
rabbitmq:
condition: service_healthy
consumer:
condition: service_started
environment:
- AMQP_SERVER=amqp://guest:guest@rabbitmq:5672/
- QUEUE_NAME=cvmaker_queue
ports:
- "9070:9070"
networks:
- cv
consumer:
build:
context: ./bot-service
dockerfile: Dockerfile
environment:
- RABBITMQ_HOST=rabbitmq
- RABBITMQ_PORT=5672
- RABBITMQ_USER=guest
- RABBITMQ_PASS=guest
- TELEGRAM_BOT_TOKEN=7303220559:AAHgpp6y1f_dk-iLsZ_gGrjwoI5-9mTVrPY
- TELEGRAM_CHAT_ID=-1002142909351
- QUEUE_NAME=cvmaker_queue
depends_on:
postgres-db:
condition: service_healthy
rabbitmq:
condition: service_healthy
networks:
- cv
networks:
cv:
driver: bridge
volumes:
db:
driver: local
minio_data:
driver: local
rabbitmq_data:
driver: local