mirror of
https://github.com/bckelley/cgm-remote-monitor.git
synced 2026-08-24 03:14:12 -05:00
24 lines
740 B
Docker
24 lines
740 B
Docker
FROM node:22-alpine
|
|
|
|
LABEL maintainer="Nightscout Contributors"
|
|
|
|
WORKDIR /opt/app
|
|
ADD . /opt/app
|
|
|
|
# TODO: We should be able to do `RUN npm install --only=production`.
|
|
# For this to work, we need to copy only package.json and things needed for `npm`'s to succeed.
|
|
# TODO: Do we need to re-add `npm audit fix`? Or should that be part of a development process/stage?
|
|
RUN npm install --cache /tmp/empty-cache && \
|
|
npm run postinstall && \
|
|
npm run env && \
|
|
rm -rf /tmp/*
|
|
# TODO: These should be added in the future to correctly cache express-minify content to disk
|
|
# Currently, doing this breaks the browser cache.
|
|
# mkdir /tmp/public && \
|
|
# chown node:node /tmp/public
|
|
|
|
USER node
|
|
EXPOSE 1337
|
|
|
|
CMD ["node", "lib/server/server.js"]
|