-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
162 lines (150 loc) · 3.89 KB
/
docker-compose.yml
File metadata and controls
162 lines (150 loc) · 3.89 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
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
networks:
microservices-net:
driver: bridge
volumes:
consul-data:
postgres-data:
rabbitmq-data:
services:
consul:
image: consul:1.15
container_name: consul
restart: always
ports:
- "8500:8500"
command: agent -server -bootstrap-expect=1 -node=consul-server -client=0.0.0.0 -ui -bind=0.0.0.0
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8500/v1/status/leader"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
volumes:
- consul-data:/consul/data
networks:
- microservices-net
postgresql:
image: postgres:16-alpine
container_name: postgresql
restart: always
ports:
- "5432:5432"
environment:
POSTGRES_USER: postgres_user
POSTGRES_PASSWORD: postgres_password
POSTGRES_DB: ingest-service-db
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres_user -d ingest-service-db"]
interval: 10s
timeout: 5s
retries: 5
start_period: 20s
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- microservices-net
rabbitmq:
image: rabbitmq:3.11-management
container_name: rabbitmq
restart: unless-stopped
environment:
RABBITMQ_DEFAULT_USER: appuser
RABBITMQ_DEFAULT_PASS: cfrPkyUHpLExTNw
ports:
- "5672:5672"
- "15672:15672"
healthcheck:
test: [ "CMD", "rabbitmq-diagnostics", "ping" ]
interval: 10s
timeout: 5s
retries: 6
start_period: 20s
ulimits:
nofile: 65536
volumes:
- rabbitmq-data:/var/lib/rabbitmq
networks:
- microservices-net
config-service:
build: ./config-service
container_name: config-service
restart: on-failure
ports:
- "8888:8888"
environment:
- CONSUL_HOST=consul
- CONFIG_LOCATION=/app/configs
depends_on:
consul:
condition: service_healthy
volumes:
- ./configs:/app/configs
networks:
- microservices-net
ingest-service:
build: ./ingest-service
container_name: ingest-service
restart: on-failure
environment:
- CONSUL_HOST=consul
- CONFIG_SERVER_HOST=config-service
- INGEST_SERVICE_PORT=8080
- DATASOURCE_URL=postgresql
- DATASOURCE_USERNAME=postgres_user
- DATASOURCE_PASSWORD=postgres_password
- RABBITMQ_HOST=rabbitmq
- RABBITMQ_PORT=5672
- RABBITMQ_USERNAME=appuser
- RABBITMQ_PASSWORD=cfrPkyUHpLExTNw
- RABBITMQ_QUEUE_NAME=queue
- cloud.aws.bucket.name=${S3_BUCKET_NAME}
- cloud.aws.credentials.access-key=${S3_ACCESS_KEY}
- cloud.aws.credentials.secret-key=${S3_SECRET_KEY}
- cloud.aws.region.static=${AWS_REGION}
depends_on:
postgresql:
condition: service_healthy
config-service:
condition: service_started
rabbitmq:
condition: service_healthy
networks:
- microservices-net
ocr-nlp-service:
build: ./ocr-nlp-service
container_name: ocr-nlp-service
restart: on-failure
environment:
- CONSUL_HOST=consul
- CONFIG_SERVER_HOST=config-service
- OCR_NLP_SERVICE_PORT=8080
- RABBITMQ_HOST=rabbitmq
- RABBITMQ_PORT=5672
- RABBITMQ_USERNAME=appuser
- RABBITMQ_PASSWORD=cfrPkyUHpLExTNw
- RABBITMQ_QUEUE_NAME=queue
depends_on:
ingest-service:
condition: service_started
rabbitmq:
condition: service_healthy
config-service:
condition: service_started
networks:
- microservices-net
gateway-service:
build: ./gateway-service
container_name: gateway-service
restart: on-failure
ports:
- "8080:8080"
depends_on:
ocr-nlp-service:
condition: service_started
ingest-service:
condition: service_started
environment:
- CONSUL_HOST=consul
- CONFIG_SERVER_HOST=config-service
networks:
- microservices-net