2022-04-22 14:46:43 +00:00
|
|
|
FROM registry.odit.services/hub/library/node:18.0.0-alpine3.14
|
2022-01-12 17:26:49 +00:00
|
|
|
ARG NPM_REGISTRY_DOMAIN=registry.npmjs.org
|
|
|
|
ARG NPM_REGISTRY_TOKEN=null
|
2021-08-14 07:55:34 +00:00
|
|
|
WORKDIR /app
|
2021-08-14 08:42:42 +00:00
|
|
|
COPY package.json .
|
2022-01-12 17:26:49 +00:00
|
|
|
RUN npm config set registry https://$NPM_REGISTRY_DOMAIN && npm config set //$NPM_REGISTRY_DOMAIN/:_authToken $NPM_REGISTRY_TOKEN
|
|
|
|
RUN npm i -g pnpm && pnpm i
|
2021-08-14 07:55:34 +00:00
|
|
|
COPY migrations ./migrations
|
2021-08-14 11:23:11 +00:00
|
|
|
COPY src ./src
|
2021-08-14 07:55:34 +00:00
|
|
|
COPY knexfile.js ./
|
2021-08-14 11:09:25 +00:00
|
|
|
RUN mkdir db
|
2022-01-12 17:26:49 +00:00
|
|
|
|
2022-04-22 14:46:43 +00:00
|
|
|
FROM registry.odit.services/hub/library/node:18.0.0-alpine3.14
|
2021-08-14 08:42:42 +00:00
|
|
|
WORKDIR /app
|
2021-08-14 09:06:16 +00:00
|
|
|
COPY --from=0 /app /app
|
2021-08-14 08:42:42 +00:00
|
|
|
ENV NODE_ENV production
|
|
|
|
EXPOSE 3000
|
2021-08-14 11:23:11 +00:00
|
|
|
ENTRYPOINT ["/bin/sh", "-c", "yarn migrate && node ./src/server.js"]
|