diff --git a/Dockerfile b/Dockerfile index 8ce1704..430c137 100644 --- a/Dockerfile +++ b/Dockerfile @@ -122,10 +122,14 @@ ENV MIX_ENV="prod" \ # Only copy the final release from the build stage COPY --from=builder --chown=1000:1000 /app/_build/${MIX_ENV}/rel/aprs ./ +# Copy the debug startup script +COPY --chown=1000:1000 start_server.sh ./ + USER 1000 -# Ensure the server binary is executable -RUN chmod +x /app/bin/server +# Ensure the server binary and startup script are executable +RUN chmod +x /app/bin/server && \ + chmod +x /app/start_server.sh # If using an environment that doesn't automatically reap zombie processes, it is # advised to add an init process such as tini via `apt-get install` @@ -133,7 +137,7 @@ RUN chmod +x /app/bin/server # ENTRYPOINT ["/tini", "--"] # Add specific capabilities needed by the app -CMD /app/bin/server +CMD ["/app/start_server.sh"] # Add security-related metadata LABEL org.opencontainers.image.vendor="APRS.me" \ diff --git a/app.json b/app.json index b13ac51..39d8542 100644 --- a/app.json +++ b/app.json @@ -13,18 +13,18 @@ "type": "startup", "name": "web-startup", "path": "/ready", - "attempts": 5, - "timeout": 30, - "wait": 5, - "initial_delay": 20 + "attempts": 10, + "timeout": 60, + "wait": 10, + "initial_delay": 30 }, { "type": "liveness", "name": "web-liveness", "path": "/health", - "attempts": 3, - "timeout": 10, - "wait": 10 + "attempts": 5, + "timeout": 30, + "wait": 15 } ] },