-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathdocker-compose-prod.yml
More file actions
98 lines (91 loc) · 2.68 KB
/
docker-compose-prod.yml
File metadata and controls
98 lines (91 loc) · 2.68 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
version: '3.8'
services:
# MongoDB service is removed in production as we use a remote DB
# Neo4j service is removed in production as we use a remote DB
# Postgres service is removed in production as we use a remote DB
core:
build:
context: ./opengin/core-api
dockerfile: docker/Dockerfile.choreo
container_name: core
ports:
- "50051:50051"
environment:
# Neo4j Config - Remote DB
- NEO4J_URI=${NEO4J_URI}
- NEO4J_USER=${NEO4J_USER}
- NEO4J_PASSWORD=${NEO4J_PASSWORD}
# MongoDB Config - Remote DB
- MONGO_URI=${MONGO_URI}
- MONGO_DB_NAME=${MONGO_DB_NAME}
- MONGO_COLLECTION=metadata
- MONGO_ADMIN_USER=${MONGO_ADMIN_USER}
- MONGO_ADMIN_PASSWORD=${MONGO_ADMIN_PASSWORD}
# Postgres Config - Remote DB
- POSTGRES_HOST=${POSTGRES_HOST}
- POSTGRES_PORT=${POSTGRES_PORT:-5432}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB:-postgres}
- CORE_SERVICE_HOST=0.0.0.0
- CORE_SERVICE_PORT=50051
# No depends_on needed as all databases are remote
networks:
- ldf-network
healthcheck:
test: [ "CMD", "nc", "-zv", "localhost", "50051" ]
interval: 30s
timeout: 10s
retries: 5
start_period: 120s
ingestion:
build:
context: ./opengin/ingestion-api
dockerfile: docker/Dockerfile.choreo
container_name: ingestion
ports:
- "8080:8080"
networks:
- ldf-network
environment:
# Explicitly set Ballerina Config Var to override image default (core-choreo)
- BAL_CONFIG_VAR_CORESERVICEURL=http://core:50051
- CORE_SERVICE_URL=http://core:50051
- INGESTION_SERVICE_HOST=0.0.0.0
- INGESTION_SERVICE_PORT=8080
depends_on:
core:
condition: service_healthy
healthcheck:
test: [ "CMD", "nc", "-z", "localhost", "8080" ]
interval: 15s
timeout: 10s
retries: 5
start_period: 120s
read:
build:
context: ./opengin/read-api
dockerfile: docker/Dockerfile.choreo
container_name: read
ports:
- "8081:8081"
networks:
- ldf-network
environment:
# Explicitly set Ballerina Config Var to override image default (core-choreo)
- BAL_CONFIG_VAR_CORESERVICEURL=http://core:50051
- CORE_SERVICE_URL=http://core:50051
- READ_SERVICE_HOST=0.0.0.0
- READ_SERVICE_PORT=8081
depends_on:
core:
condition: service_healthy
healthcheck:
test: [ "CMD", "nc", "-zv", "localhost", "8081" ]
interval: 15s
timeout: 10s
retries: 5
start_period: 120s
networks:
ldf-network:
driver: bridge