Skip to content

Commit 6050b14

Browse files
committed
Use Compose --wait instead of nc'ing to the client port
1 parent 62e3875 commit 6050b14

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/e2e-tests.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ jobs:
2828
- name: Run Sample App in Docker
2929
run: |
3030
cp .env.docker.example .env.docker &&
31-
npm run docker:up -- -d &&
32-
while ! nc -z localhost 4400; do sleep 1; done
31+
npm run docker:up -- --wait
3332
3433
- name: Install Chrome v111
3534
uses: browser-actions/setup-chrome@v1

docker-compose.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ services:
3535
environment:
3636
CLIENT_PORT: "${CLIENT_PORT}"
3737
VITE_METABASE_INSTANCE_URL: "http://localhost:${MB_PORT}"
38+
healthcheck:
39+
test: curl --fail -X GET -I "http://localhost:${CLIENT_PORT}/" || exit 1
40+
interval: 2s
41+
timeout: 2s
42+
retries: 5
3843
ports:
3944
- "${CLIENT_PORT}:${CLIENT_PORT}"
4045
volumes:

0 commit comments

Comments
 (0)