experiment with entrypoint for backwards compat

pull/156/head
Ben Phelps 2 years ago
parent 5a284bff26
commit d4b05b2612

@ -44,6 +44,8 @@ LABEL org.opencontainers.image.licenses='Apache-2.0'
ENV NODE_ENV production ENV NODE_ENV production
WORKDIR /app 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 files from context (this allows the files to copy before the builder stage is done).
COPY --link package.json next.config.js ./ COPY --link package.json next.config.js ./
COPY --link /public ./public COPY --link /public ./public
@ -58,5 +60,4 @@ EXPOSE $PORT
HEALTHCHECK --interval=10s --timeout=3s --start-period=20s \ 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 CMD wget --no-verbose --tries=1 --spider --no-check-certificate http://localhost:$PORT/api/healthcheck || exit 1
USER $PUID:$PGID ENTRYPOINT ["/app/docker-entrypoint.sh"]
CMD ["node", "server.js"]

@ -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
Loading…
Cancel
Save