Skip to content

Commit

Permalink
Merge pull request #76 from kjsanger/fix/entrypoint-exec
Browse files Browse the repository at this point in the history
Fix entrypoint to use exec so that SIGINT shutdown works
  • Loading branch information
nerdstrike authored Oct 8, 2024
2 parents bb5c1e5 + 92a78b0 commit d7e3444
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docker/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ ARG DEBIAN_FRONTEND
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -q -y --no-install-recommends \
curl \
libsqlite3-0 \
postgresql \
sudo \
Expand Down Expand Up @@ -94,6 +95,8 @@ ENV DB_URL="postgresql+asyncpg://$URL_SLUG" \

EXPOSE ${PORT}

HEALTHCHECK --interval=30s --timeout=30s --start-period=10s --retries=3 CMD curl -f http://localhost:${PORT} || exit 1

ENTRYPOINT ["/usr/bin/tini", "--"]

CMD ["/app/docker/scripts/entrypoint.sh"]
2 changes: 1 addition & 1 deletion docker/scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ PORT=${PORT:? The PORT environment variable must be set}

source /app/bin/activate

uvicorn npg_porch.server:app --host 0.0.0.0 --port ${PORT} --reload --log-config /app/docker/logging.json
exec uvicorn npg_porch.server:app --host 0.0.0.0 --port ${PORT} --reload --log-config /app/docker/logging.json

0 comments on commit d7e3444

Please sign in to comment.