Skip to content

Commit ab227c8

Browse files
committed
Add rating engine to docker compose
1 parent b81a0d7 commit ab227c8

File tree

1 file changed

+51
-6
lines changed

1 file changed

+51
-6
lines changed

docker-compose.yml

Lines changed: 51 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ services:
4444
aliases:
4545
- api.somleng.dev
4646
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"]
47+
test:
48+
[
49+
"CMD-SHELL",
50+
"wget --server-response --spider --quiet http://0.0.0.0:3000/health_checks 2>&1 | grep '200 OK' > /dev/null",
51+
]
4852
interval: 10s
4953
timeout: 5s
5054
retries: 10
@@ -57,7 +61,7 @@ services:
5761
ws:
5862
image: anycable/anycable-go:latest-alpine
5963
ports:
60-
- '8080:8080'
64+
- "8080:8080"
6165
environment:
6266
REDIS_URL: redis://redis:6379/0
6367
ANYCABLE_HOST: "0.0.0.0"
@@ -79,7 +83,11 @@ services:
7983
anycable:
8084
condition: service_healthy
8185
healthcheck:
82-
test: ["CMD-SHELL", "wget --server-response --spider --quiet http://0.0.0.0:8080/health 2>&1 | grep '200 OK' > /dev/null"]
86+
test:
87+
[
88+
"CMD-SHELL",
89+
"wget --server-response --spider --quiet http://0.0.0.0:8080/health 2>&1 | grep '200 OK' > /dev/null",
90+
]
8391
interval: 10s
8492
timeout: 5s
8593
retries: 10
@@ -92,7 +100,7 @@ services:
92100
ANYCABLE_RPC_HOST: 0.0.0.0:50051
93101
ANYCABLE_DEBUG: 1
94102
ports:
95-
- '50051'
103+
- "50051"
96104
depends_on:
97105
<<: *somleng_depends_on
98106
healthcheck:
@@ -114,7 +122,11 @@ services:
114122
freeswitch:
115123
condition: service_healthy
116124
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"]
125+
test:
126+
[
127+
"CMD-SHELL",
128+
"wget --server-response --spider --quiet http://0.0.0.0:8080/health_checks 2>&1 | grep '200 OK' > /dev/null",
129+
]
118130
interval: 10s
119131
timeout: 5s
120132
retries: 10
@@ -149,10 +161,43 @@ services:
149161
profiles:
150162
- donotstart
151163
healthcheck:
152-
test: ["CMD-SHELL", "wget --server-response --spider --quiet http://localhost:3210 2>&1 | grep '200 OK' > /dev/null"]
164+
test:
165+
[
166+
"CMD-SHELL",
167+
"wget --server-response --spider --quiet http://localhost:3210 2>&1 | grep '200 OK' > /dev/null",
168+
]
153169
interval: 10s
154170
timeout: 5s
155171
retries: 10
156172

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

0 commit comments

Comments
 (0)