diff --git a/docker-compose.yml b/docker-compose.yml index b6a9ee39..3d7d30b1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -41,6 +41,12 @@ services: dockerfile: ./docker/brickfix.Dockerfile ports: - 80:80 + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:80"] + interval: 2m + timeout: 3s + retries: 3 + start_period: 40s account-manager: container_name: DarkFlameAccountManager @@ -57,6 +63,12 @@ services: - ACCOUNT_SECRET=${ACCOUNT_MANAGER_SECRET:?err} ports: - 5000:5000 + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:5000"] + interval: 2m + timeout: 3s + retries: 3 + start_period: 40s networks: darkflame: diff --git a/docker/AccountManager.Dockerfile b/docker/AccountManager.Dockerfile index f4ebdb33..ea5cd1d3 100644 --- a/docker/AccountManager.Dockerfile +++ b/docker/AccountManager.Dockerfile @@ -10,6 +10,4 @@ ADD docker/resources_example.py resources.py RUN pip3 install -r requirements.txt EXPOSE 5000 -HEALTHCHECK --interval=2m --timeout=3s \ - CMD curl -f http://localhost:5000 || exit 1 CMD python3 app.py diff --git a/docker/brickfix.Dockerfile b/docker/brickfix.Dockerfile index 1aca72ca..20a9444a 100644 --- a/docker/brickfix.Dockerfile +++ b/docker/brickfix.Dockerfile @@ -2,6 +2,4 @@ FROM python:3.9.9-slim WORKDIR /empty_dir EXPOSE 80 -HEALTHCHECK --interval=2m --timeout=3s \ - CMD curl -f http://localhost:80 || exit 1 CMD python -m http.server 80