18 lines
624 B
Docker
18 lines
624 B
Docker
FROM registry.odit.services/hub/library/node:18.0.0-alpine3.14
|
|
ARG NPM_REGISTRY_DOMAIN=registry.npmjs.org
|
|
ARG NPM_REGISTRY_TOKEN=null
|
|
WORKDIR /app
|
|
COPY package.json .
|
|
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
|
|
COPY migrations ./migrations
|
|
COPY src ./src
|
|
COPY knexfile.js ./
|
|
RUN mkdir db
|
|
|
|
FROM registry.odit.services/hub/library/node:18.0.0-alpine3.14
|
|
WORKDIR /app
|
|
COPY --from=0 /app /app
|
|
ENV NODE_ENV production
|
|
EXPOSE 3000
|
|
ENTRYPOINT ["/bin/sh", "-c", "yarn migrate && node ./src/server.js"] |