Skip to content

Commit

Permalink
Print out docker compose logs on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
olekoliinyk committed Jan 30, 2025
1 parent d05c5b4 commit 8b2a65a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
Empty file.
4 changes: 4 additions & 0 deletions nat-lab/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,10 @@ services:
PYTHONUNBUFFERED: 1
healthcheck:
test: "curl --cacert /etc/ssl/server_certificate/test.pem https://api.nordvpn.com/v1/health"
interval: 10s
timeout: 5s
retries: 5
start_period: 5s
networks:
internet:
ipv4_address: 10.0.80.86
Expand Down
15 changes: 9 additions & 6 deletions nat-lab/natlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,15 @@ def start():
"LIBTELIO_ENV_NAT_LAB_DEPS_TAG": LIBTELIO_ENV_NAT_LAB_DEPS_TAG,
},
)
run_command(
["docker", "compose", "up", "-d", "--wait"],
env={"COMPOSE_DOCKER_CLI_BUILD": "1", "DOCKER_BUILDKIT": "1"},
)

check_containers()
try:
run_command(
["docker", "compose", "up", "-d", "--wait"],
env={"COMPOSE_DOCKER_CLI_BUILD": "1", "DOCKER_BUILDKIT": "1"},
)
except subprocess.CalledProcessError:
check_containers()
else:
check_containers()


def stop():
Expand Down

0 comments on commit 8b2a65a

Please sign in to comment.