mirror of
https://github.com/SunRed/haste-server.git
synced 2024-11-23 17:50:19 +01:00
Manuel
062bdb3dec
* 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
33 lines
735 B
Docker
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" ]
|