Skip to content

Instantly share code, notes, and snippets.

@kizzlebot
Created July 24, 2021 23:06
Show Gist options
  • Save kizzlebot/01344b8efcf5849a6a1e31d3ffdf1e79 to your computer and use it in GitHub Desktop.
Save kizzlebot/01344b8efcf5849a6a1e31d3ffdf1e79 to your computer and use it in GitHub Desktop.
# ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
#
#
# 888b 888 888 888
# 8888b 888 888 888
# 88888b 888 888 888
# .d88b. 888Y88b 888 .d88b. 888888 8888b. 888d888 888 888 888 .d88b. .d88b.
# d8P Y8b 888 Y88b888 d88""88b 888 "88b 888P" 888 888 888 d88""88b d88P"88b
# 88888888 888 Y88888 888 888 888 .d888888 888 888 888 888 888 888 888 888
# Y8b. 888 Y8888 Y88..88P Y88b. 888 888 888 Y88b 888 888 Y88..88P Y88b 888
# "Y8888 888 Y888 "Y88P" "Y888 "Y888888 888 "Y88888 88888888 "Y88P" "Y88888
# 888 888
# Y8b d88P Y8b d88P
# "Y88P" "Y88P"
#
# ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
# ------- this stage installs the dependencies -------
FROM gcr.io/d-enotarylog-core/node:12.22-slim AS install
# ------- this stage copies only whats needed from each layer -------
FROM gcr.io/d-enotarylog-core/node:12.22-slim AS app
WORKDIR /code
ARG NPM_TOKEN=${NPM_TOKEN}
ENV NPM_TOKEN=${NPM_TOKEN}
ARG APP_NAME='gql'
ENV APP_NAME=${APP_NAME}
COPY --chown=node ./dist/apps/${APP_NAME}/package.json ./
COPY --chown=node ./prisma ./prisma
RUN echo "@enotarylog:registry=https://registry.npmjs.org/\n//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> /code/.npmrc
RUN yarn install --production && rm -rf node_modules/@pdftron/pdfnet-node/samples && rm -rf node_modules/@pdftron/pdfnet-node/doc
COPY --chown=node ./dist/apps/${APP_NAME} ./
EXPOSE 4000
CMD node ./main.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment