1
0
Fork 0
mirror of https://github.com/SunRed/haste-server.git synced 2024-12-27 22:50:11 +01:00
haste-server/Dockerfile
Manuel 062bdb3dec
Install all storage client deps by default and move them to optional deps
* Moving the storage dependencies again into package.json but to the optionalDependencies
* Add build script that excludes the optional dependencies for manual installation of these
* Add a comment in Dockerfile on how to use the minimal build script
2021-02-13 07:46:01 +01:00

33 lines
735 B
Docker

FROM node:lts-alpine
RUN apk add --no-cache curl
RUN mkdir -p /usr/src/app && \
chown node:node /usr/src/app
USER node:node
WORKDIR /usr/src/app
COPY --chown=node:node . .
# Replace build with build-min to exclude the optional dbms dependencies
# and uncomment the needed one below to build a smaller Docker image.
RUN npm run build
#RUN npm install pg
#RUN npm install aws-sdk
#RUN npm install memcached
#RUN npm install mongodb
#RUN npm install ioredis
#RUN npm install rethinkdbdash
ENV PORT=7777
EXPOSE ${PORT}
STOPSIGNAL SIGINT
ENTRYPOINT [ "node", "server.js" ]
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s \
--retries=1 CMD curl -sS -o /dev/null localhost:${PORT} || exit 1
CMD [ "npm", "start" ]