Created
August 11, 2021 10:02
-
-
Save thoughtspeed7/231df839764f94f3a0bf4cd13eeb6805 to your computer and use it in GitHub Desktop.
Apollo GraphQL Server 3 Using Express On Google Cloud Run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# om namah shivaya | |
# Use the official lightweight Node.js 14 image. | |
# https://hub.docker.com/_/node | |
FROM node:14-slim | |
# Create and change to the app directory. | |
WORKDIR /usr/src/app | |
# Copy application dependency manifests to the container image. | |
# A wildcard is used to ensure copying both package.json AND package-lock.json (when available). | |
# Copying this first prevents re-running npm install on every code change. | |
COPY package*.json ./ | |
# Install production dependencies. | |
# If you add a package-lock.json, speed your build by switching to 'npm ci'. | |
# RUN npm ci --only=production | |
RUN npm install --only=production | |
# Copy local code to the container image. | |
COPY . ./ | |
# Run the web service on container startup. | |
CMD [ "node", "index.js" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment