Skip to content

Commit

Permalink
make the container wait
Browse files Browse the repository at this point in the history
  • Loading branch information
yurisasuke committed Feb 7, 2025
1 parent 00a3578 commit b549b2b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ci/tests/specs/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ tasks:
up:
desc: "Bring up env"
cmds:
- docker compose up -d --remove-orphans
- docker compose up -d --wait --force-recreate || { docker compose logs gw; exit 1; }

down:
desc: "Shut down env"
Expand Down
6 changes: 6 additions & 0 deletions ci/tests/specs/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ services:
- "8080:8080"
environment:
- TYK_LOGLEVEL=debug
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/hello"]
interval: 10s
timeout: 5s
retries: 5
start_period: 15s

networks:
proxy:
Expand Down
3 changes: 2 additions & 1 deletion ci/tests/specs/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ trap "task down" EXIT
echo "Creating .env file..."
echo "PORTMAN_API_Key=example_gateway_secret" > ".env"

task default
task up

task tests

0 comments on commit b549b2b

Please sign in to comment.