1
0
Fork 0
mirror of https://github.com/alangrainger/immich-public-proxy.git synced 2024-12-28 20:01:57 +00:00
immich-public-proxy/Dockerfile

33 lines
737 B
Docker
Raw Normal View History

2024-10-31 18:17:58 +00:00
FROM node:lts-slim
2024-11-04 10:15:00 +00:00
# Install wget for healthcheck
RUN apt-get update && \
apt-get install -y wget && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY app/ ./
2024-11-02 21:18:04 +00:00
RUN npm install pm2 -g
RUN chown -R node:node /app
USER node
RUN npm install --omit=dev
2024-11-03 14:19:12 +00:00
ARG PACKAGE_VERSION
ENV APP_VERSION=${PACKAGE_VERSION}
2024-11-01 18:02:31 +00:00
ENV NODE_ENV=production
# Build without type checking, as we have removed the Typescript
2024-11-03 19:28:37 +00:00
# dev-dependencies above to save space in the final build.
# Type checking is done in the repo before building the image.
RUN npx tsc --noCheck
2024-11-16 12:49:17 +00:00
HEALTHCHECK --interval=30s --start-period=10s --timeout=5s CMD wget -q --spider http://localhost:3000/healthcheck || exit 1
2024-11-02 22:13:32 +00:00
2024-11-02 21:18:04 +00:00
CMD ["pm2-runtime", "dist/index.js" ]