2018-09-19 21:31:55 +00:00
|
|
|
FROM node:9 as builder
|
|
|
|
|
2023-10-30 13:08:20 +00:00
|
|
|
RUN npm install --global npm@5.7.0 && \
|
|
|
|
npm version
|
|
|
|
|
2018-09-19 21:31:55 +00:00
|
|
|
ARG APP_DIR=/srv/uplink
|
|
|
|
WORKDIR ${APP_DIR}
|
|
|
|
|
2023-10-27 13:36:39 +00:00
|
|
|
COPY package*json ${APP_DIR}/
|
2018-09-19 21:31:55 +00:00
|
|
|
|
2023-10-30 13:08:20 +00:00
|
|
|
RUN npm ci
|
2018-09-19 21:31:55 +00:00
|
|
|
|
|
|
|
# Doing a multi-stage build to reset some stuff for a smaller image
|
|
|
|
FROM node:9-alpine
|
|
|
|
|
|
|
|
ARG APP_DIR=/srv/uplink
|
|
|
|
WORKDIR ${APP_DIR}
|
|
|
|
|
|
|
|
COPY --from=builder ${APP_DIR} .
|
|
|
|
|
|
|
|
COPY build ${APP_DIR}/build
|
|
|
|
COPY migrations ${APP_DIR}/migrations
|
|
|
|
COPY config ${APP_DIR}/config
|
|
|
|
COPY public ${APP_DIR}/public
|
|
|
|
COPY views ${APP_DIR}/views
|
2018-10-22 17:34:19 +00:00
|
|
|
COPY .sequelizerc ${APP_DIR}/
|
2018-09-19 21:31:55 +00:00
|
|
|
|
|
|
|
EXPOSE 3030
|
|
|
|
|
2023-10-27 15:42:39 +00:00
|
|
|
# hadolint ignore=DL3025
|
2018-10-27 22:53:38 +00:00
|
|
|
CMD node ./node_modules/.bin/sequelize db:migrate || node ./build/
|