Skip to content

Commit

Permalink
experiment with entrypoint for backwards compat
Browse files Browse the repository at this point in the history
  • Loading branch information
benphelps committed Sep 14, 2022
1 parent 5a284bf commit d4b05b2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ LABEL org.opencontainers.image.licenses='Apache-2.0'
ENV NODE_ENV production
WORKDIR /app

ADD docker-entrypoint.sh docker-entrypoint.sh

# Copy files from context (this allows the files to copy before the builder stage is done).
COPY --link package.json next.config.js ./
COPY --link /public ./public
Expand All @@ -58,5 +60,4 @@ EXPOSE $PORT
HEALTHCHECK --interval=10s --timeout=3s --start-period=20s \
CMD wget --no-verbose --tries=1 --spider --no-check-certificate http://localhost:$PORT/api/healthcheck || exit 1

USER $PUID:$PGID
CMD ["node", "server.js"]
ENTRYPOINT ["/app/docker-entrypoint.sh"]
9 changes: 9 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

set -e

# This is in attempt to preserve the original behavior of the Dockerfile,
# while also supporting the lscr.io /config directory
[ ! -d "/app/config" ] && ln -s /config /app/config

node server.js

0 comments on commit d4b05b2

Please sign in to comment.