Skip to content

Commit 3833b45

Browse files
committed
revert docker-compose healthcheck
- allow option to customise healthcheck intervals - update readme Signed-off-by: Jack Luar <jluar@precisioninno.com>
1 parent 68f7b1c commit 3833b45

File tree

5 files changed

+24
-26
lines changed

5 files changed

+24
-26
lines changed

.github/workflows/ci-secret.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ jobs:
5050
- name: Build Docker image
5151
run: |
5252
make docker-up
53-
sleep 1500 # TODO: Remove this after docker-compose healthcheck timeout restored fixed.
5453
- name: Run LLM CI
5554
working-directory: evaluation
5655
run: |

.github/workflows/ci.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ jobs:
3333
- name: Build Docker image
3434
run: |
3535
make docker-up
36-
sleep 1500 # TODO: Remove this after docker-compose healthcheck timeout restored fixed.
3736
- name: Teardown
3837
if: always()
3938
run: |

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,21 @@ git clone https://github.com/The-OpenROAD-Project/ORAssistant.git
3838

3939
**Step 2**: Copy the `.env.example` file, and update your `.env` file with the appropriate API keys.
4040

41+
Modify the Docker `HEALTHCHECK_` variables based on the hardware requirements.
42+
If you have a resource-constrained PC, try increasing `HEALTHCHECK_START_PERIOD` to a value large
43+
enough before healthcheck begins.
44+
For more information, please refer to this [link](https://docs.docker.com/reference/compose-file/services/#healthcheck)
45+
4146
```bash
4247
cd backend
4348
cp .env.example .env
4449
```
4550

46-
**Step 3**: Start the docker container by running the following command:
51+
**Step 3**: Start and stop the docker containers by running the following command:
4752

4853
```bash
49-
docker compose up
54+
make docker-up
55+
make docker-down
5056
```
5157

5258
#### Option 2 - Local Install

backend/.env.example

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,10 @@ BACKEND_WORKERS=4
3838
BACKEND_URL="0.0.0.0"
3939

4040
# Set FAST_MODE=true for fast prototyping
41-
FAST_MODE=false
41+
FAST_MODE=false
42+
43+
# Set healthcheck parameters
44+
HEALTHCHECK_INTERVAL="30s"
45+
HEALTHCHECK_TIMEOUT="10s"
46+
HEALTHCHECK_RETRIES=5
47+
HEALTHCHECK_START_PERIOD="900s"

docker-compose.yml

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,37 +7,25 @@ services:
77
- "8000:8000"
88
networks:
99
- orassistant-network
10-
# healthcheck:
11-
# test: "curl -f http://localhost:8000/healthcheck || exit 1"
12-
# interval: 30s
13-
# timeout: 10s
14-
# retries: 5
15-
# start_period: 30 s # todo: make sure that this healthcheck starts after the API in the backend is ready.
10+
healthcheck:
11+
test: "curl -f http://localhost:8000/healthcheck || exit 1"
12+
interval: ${HEALTHCHECK_INTERVAL:-30s}
13+
timeout: ${HEALTHCHECK_TIMEOUT:-10s}
14+
retries: ${HEALTHCHECK_RETRIES:-5}
15+
start_period: ${HEALTHCHECK_START_PERIOD:-900s}
1616

1717
frontend:
1818
build:
1919
context: ./frontend/nextjs-frontend
20+
depends_on:
21+
backend:
22+
condition: service_healthy
2023
container_name: "frontend"
2124
ports:
2225
- "3000:3000"
2326
networks:
2427
- orassistant-network
2528

26-
# health-checker:
27-
# build: ./common
28-
# container_name: "orassistant-health-checker"
29-
# depends_on:
30-
# backend:
31-
# condition: service_healthy
32-
# networks:
33-
# - orassistant-network
34-
# healthcheck:
35-
# test: "ls /app || exit 1"
36-
# interval: 30s
37-
# timeout: 10s
38-
# retries: 3
39-
# start_period: 5s
40-
4129
networks:
4230
orassistant-network:
4331
driver: bridge

0 commit comments

Comments
 (0)