diff --git a/docker-compose.yml b/docker-compose.yml index c88064344..1488bd41c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,6 +4,12 @@ services: context: . dockerfile: Dockerfile restart: unless-stopped + healthcheck: + test: ["CMD", "curl", "-s", "-o", "/dev/null", "-w", "%{http_code}", "http://localhost:8545/"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 30s ports: - "8545:8545" # RPC - "8546:8546" # websocket @@ -22,6 +28,12 @@ services: restart: unless-stopped depends_on: - execution + healthcheck: + test: ["CMD", "curl", "-s", "-o", "/dev/null", "-w", "%{http_code}", "http://localhost:8545/"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s ports: - "7545:8545" # RPC - "9222:9222" # P2P TCP diff --git a/supervisord.conf b/supervisord.conf index 77d11a461..283060842 100644 --- a/supervisord.conf +++ b/supervisord.conf @@ -9,6 +9,7 @@ stdout_logfile=/dev/fd/1 stdout_logfile_maxbytes=0 redirect_stderr=true stopwaitsecs=300 +autorestart=true [program:execution] command=/app/execution-entrypoint @@ -16,3 +17,4 @@ stdout_logfile=/dev/fd/1 stdout_logfile_maxbytes=0 redirect_stderr=true stopwaitsecs=300 +autorestart=true