mirror of
https://github.com/morten-olsen/mini-loader.git
synced 2026-02-08 01:36:26 +01:00
fix: add health checks and volumes to docker file (#2)
Co-authored-by: Morten Olsen <morten-olsen@users.noreply.github.com>
This commit is contained in:
@@ -27,6 +27,7 @@ COPY --from=builder /app/out/full/ .
|
||||
RUN pnpm turbo run build --filter=@morten-olsen/mini-loader-server
|
||||
|
||||
FROM base AS runner
|
||||
RUN apk add --no-cache jq curl
|
||||
WORKDIR /app
|
||||
|
||||
# Don't run production as root
|
||||
@@ -38,5 +39,12 @@ RUN chmod +x /entrypoint.sh
|
||||
|
||||
COPY --from=installer /app .
|
||||
EXPOSE 4500
|
||||
VOLUME /app/data
|
||||
|
||||
HEALTHCHECK \
|
||||
--interval=10s \
|
||||
--start-period=10s \
|
||||
CMD curl -f http://localhost:4500/health || exit 1
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["mini-loader-server", "start"]
|
||||
Reference in New Issue
Block a user