Skip to content

Commit fc5e882

Browse files
authored
Merge pull request #114 from somleng/add-rating-engine
Add rating engine to docker compose
2 parents b81a0d7 + 9f35abe commit fc5e882

File tree

1 file changed

+53
-6
lines changed

1 file changed

+53
-6
lines changed

docker-compose.yml

Lines changed: 53 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,18 @@ services:
3939
condition: service_healthy
4040
somleng-switch:
4141
condition: service_healthy
42+
rating-engine-api:
43+
condition: service_healthy
4244
networks:
4345
default:
4446
aliases:
4547
- api.somleng.dev
4648
healthcheck:
47-
test: ["CMD-SHELL", "wget --server-response --spider --quiet http://0.0.0.0:3000/health_checks 2>&1 | grep '200 OK' > /dev/null"]
49+
test:
50+
[
51+
"CMD-SHELL",
52+
"wget --server-response --spider --quiet http://0.0.0.0:3000/health_checks 2>&1 | grep '200 OK' > /dev/null",
53+
]
4854
interval: 10s
4955
timeout: 5s
5056
retries: 10
@@ -57,7 +63,7 @@ services:
5763
ws:
5864
image: anycable/anycable-go:latest-alpine
5965
ports:
60-
- '8080:8080'
66+
- "8080:8080"
6167
environment:
6268
REDIS_URL: redis://redis:6379/0
6369
ANYCABLE_HOST: "0.0.0.0"
@@ -79,7 +85,11 @@ services:
7985
anycable:
8086
condition: service_healthy
8187
healthcheck:
82-
test: ["CMD-SHELL", "wget --server-response --spider --quiet http://0.0.0.0:8080/health 2>&1 | grep '200 OK' > /dev/null"]
88+
test:
89+
[
90+
"CMD-SHELL",
91+
"wget --server-response --spider --quiet http://0.0.0.0:8080/health 2>&1 | grep '200 OK' > /dev/null",
92+
]
8393
interval: 10s
8494
timeout: 5s
8595
retries: 10
@@ -92,7 +102,7 @@ services:
92102
ANYCABLE_RPC_HOST: 0.0.0.0:50051
93103
ANYCABLE_DEBUG: 1
94104
ports:
95-
- '50051'
105+
- "50051"
96106
depends_on:
97107
<<: *somleng_depends_on
98108
healthcheck:
@@ -114,7 +124,11 @@ services:
114124
freeswitch:
115125
condition: service_healthy
116126
healthcheck:
117-
test: ["CMD-SHELL", "wget --server-response --spider --quiet http://0.0.0.0:8080/health_checks 2>&1 | grep '200 OK' > /dev/null"]
127+
test:
128+
[
129+
"CMD-SHELL",
130+
"wget --server-response --spider --quiet http://0.0.0.0:8080/health_checks 2>&1 | grep '200 OK' > /dev/null",
131+
]
118132
interval: 10s
119133
timeout: 5s
120134
retries: 10
@@ -149,10 +163,43 @@ services:
149163
profiles:
150164
- donotstart
151165
healthcheck:
152-
test: ["CMD-SHELL", "wget --server-response --spider --quiet http://localhost:3210 2>&1 | grep '200 OK' > /dev/null"]
166+
test:
167+
[
168+
"CMD-SHELL",
169+
"wget --server-response --spider --quiet http://localhost:3210 2>&1 | grep '200 OK' > /dev/null",
170+
]
153171
interval: 10s
154172
timeout: 5s
155173
retries: 10
156174

175+
rating-engine-api:
176+
image: ghcr.io/somleng/rating-engine:latest-debug
177+
depends_on:
178+
redis:
179+
condition: service_healthy
180+
db:
181+
condition: service_healthy
182+
environment:
183+
STORDB_DBNAME: "cgrates_test"
184+
STORDB_USER: "postgres"
185+
STORDB_PASSWORD: "password"
186+
STORDB_HOST: db
187+
STORDB_PORT: 5432
188+
DATADB_HOST: "redis"
189+
DATADB_USER: ""
190+
DATADB_PORT: 6379
191+
DATADB_DBNAME: 2
192+
CONNECTION_MODE: "*localhost"
193+
LOG_LEVEL: 7
194+
HTTP_LISTEN_ADDRESS: "0.0.0.0:2080"
195+
BOOTSTRAP_DB: "true"
196+
SERVER_MODE: "api"
197+
JSON_RPC_USERNAME: "somleng"
198+
JSON_RPC_PASSWORD: "password"
199+
expose:
200+
- "2080/tcp"
201+
ports:
202+
- "2080:2080"
203+
157204
volumes:
158205
db_data:

0 commit comments

Comments
 (0)