Skip to content

Commit d8eb84e

Browse files
committed
Added ci mongo service for prod smoke test
1 parent 57793fb commit d8eb84e

2 files changed

Lines changed: 38 additions & 12 deletions

File tree

.github/workflows/ci_job.yml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,9 @@ jobs:
9898
CLIMATECLAW_INSTANCE_NAME=ci
9999
CLIMATECLAW_FILE_LOGGING=0
100100
CLIMATECLAW_CACHE_PATH=/ci-path/cache
101-
CLIMATECLAW_MONGODB_USER=${{ secrets.MONGODB_USER }}
102-
CLIMATECLAW_MONGODB_PASSWORD=${{ secrets.MONGODB_PASSWORD }}
103-
CLIMATECLAW_MONGODB_HOST=${{ secrets.MONGODB_HOST }}
104-
CLIMATECLAW_MONGODB_DATABASE_NAME=chatbot
101+
CLIMATECLAW_MONGODB_USER=ci-user
102+
CLIMATECLAW_MONGODB_PASSWORD=ci-psswrd
103+
CLIMATECLAW_MONGODB_DATABASE_NAME=ci-db
105104
CLIMATECLAW_OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}
106105
EOF
107106
@@ -110,14 +109,20 @@ jobs:
110109

111110
- name: Start production stack
112111
run: |
113-
docker compose up climateclaw code-server web-search-server -d --wait --build --remove-orphans || {
114-
docker compose ps -a
115-
docker compose logs climateclaw
116-
docker compose logs code-server
117-
docker compose logs web-search-server
118-
docker compose logs litellm
119-
exit 1
120-
}
112+
docker compose \
113+
-f docker-compose.yml \
114+
-f docker-compose.ci.yml \
115+
up climateclaw code-server web-search-server \
116+
-d --wait --build --remove-orphans || {
117+
docker ps -a
118+
119+
docker compose \
120+
-f docker-compose.yml \
121+
-f docker-compose.ci.yml \
122+
logs climateclaw mongodb code-server web-search-server litellm
123+
124+
exit 1
125+
}
121126
122127
- name: Show running services
123128
run: docker compose ps

docker-compose.ci.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
services:
2+
mongodb:
3+
image: ghcr.io/freva-org/freva-mongo:latest
4+
hostname: mongodb
5+
environment:
6+
API_MONGO_USER: ${CLIMATECLAW_MONGODB_USER}
7+
API_MONGO_PASSWORD: ${CLIMATECLAW_MONGODB_PASSWORD}
8+
API_MONGO_DB: ${CLIMATECLAW_MONGODB_DATABASE_NAME}
9+
networks:
10+
- climateclaw
11+
healthcheck:
12+
test: ["CMD", "healthchecks", "-s", "mongo"]
13+
interval: 5s
14+
timeout: 3s
15+
retries: 20
16+
start_period: 10s
17+
18+
climateclaw:
19+
depends_on:
20+
mongodb:
21+
condition: service_healthy

0 commit comments

Comments
 (0)