diff --git a/Dockerfile b/Dockerfile index e7f8080..fa84da7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ USER nobody COPY --chmod=0775 ./bash/entrypoint.sh /usr/local/bin/ COPY --chmod=0755 ./bash/nginx.conf /etc/nginx/conf.d/site.conf -HEALTHCHECK --interval=5s --timeout=5s --retries=5 CMD [ "php", "/var/www/bin/console", "startup:status" ] +HEALTHCHECK --interval=3s --timeout=3s --retries=10 CMD [ "php", "/var/www/bin/console", "startup:status" ] ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ] diff --git a/bash/entrypoint.sh b/bash/entrypoint.sh index c8478ba..6a58091 100644 --- a/bash/entrypoint.sh +++ b/bash/entrypoint.sh @@ -1,9 +1,8 @@ #!/bin/sh # Sleep for a second to ensure DB is awake and ready -SLEEP_TIME=$(shuf -i 2-5 -n 1) +SLEEP_TIME=$(shuf -i 2-4 -n 1) echo "> Sleeping for ${SLEEP_TIME} seconds to wait for the database" -echo "> If there are errors after the migration runs, it's possible another container (scheduler, worker, etc.) already ran the migrations" sleep $SLEEP_TIME # Provision database diff --git a/compose.yml b/compose.yml index 58f933a..4d47b36 100755 --- a/compose.yml +++ b/compose.yml @@ -89,7 +89,8 @@ services: MYSQL_ROOT_PASSWORD: password healthcheck: test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ] - timeout: 10s + interval: 5s + timeout: 5s retries: 10 adminer: diff --git a/docker/Dockerfile.web b/docker/Dockerfile.web deleted file mode 100644 index 6dd2306..0000000 --- a/docker/Dockerfile.web +++ /dev/null @@ -1,3 +0,0 @@ -FROM nginx:1.28-alpine - -COPY bash/nginx.conf /etc/nginx/conf.d/default.conf