Skip to content

Commit

Permalink
improve the docker compose networks
Browse files Browse the repository at this point in the history
  • Loading branch information
kobenguyent committed Jan 9, 2025
1 parent ff19db7 commit 2c9865e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions test/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ services:
- node_modules:/codecept/node_modules
command: test/rest
depends_on:
- json_server
json_server:
condition: service_healthy

test-acceptance.webdriverio:
build: ..
Expand Down Expand Up @@ -70,8 +71,14 @@ services:
<<: *test-service
entrypoint: []
command: npm run json-server
expose:
- 8010
ports:
- '8010:8010' # Expose to host
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:8010/health']
interval: 10s # Check every 10 seconds
timeout: 5s # Timeout after 5 seconds
retries: 3 # Retry 3 times before marking as unhealthy
start_period: 10s # Wait 10 seconds before starting health checks

puppeteer-image:
image: ghcr.io/puppeteer/puppeteer:22.4.1
Expand Down

0 comments on commit 2c9865e

Please sign in to comment.