-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4da1dd8
commit 988fc9a
Showing
4 changed files
with
27 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
# .dockerignore | ||
Dockerfile | ||
README.md | ||
node_modules | ||
npm-debug.log |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
default: | ||
image: google/cloud-sdk:alpine | ||
before_script: | ||
- gcloud config set project $GOOGLE_CLOUD_PROJECT | ||
- gcloud auth activate-service-account --key-file $GOOGLE_CLOUD_CREDENTIALS | ||
|
||
build-beta: | ||
stage: build-beta | ||
script: | ||
- gcloud builds submit --tag gcr.io/$GOOGLE_CLOUD_PROJECT/gcs-radio-beta | ||
only: | ||
- beta | ||
|
||
deploy-beta: | ||
stage: deploy-beta | ||
script: | ||
- gcloud run deploy gcs-radio-beta --image gcr.io/$GOOGLE_CLOUD_PROJECT/gcs-radio-beta --platform managed --region us-west1 --allow-unauthenticated | ||
only: | ||
- beta |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
# Use the official lightweight Node.js 12 image. | ||
# https://hub.docker.com/_/node | ||
FROM node:12-alpine | ||
|
||
# Create and change to the app directory. | ||
WORKDIR /usr/src/app | ||
|
||
# Copy application dependency manifests to the container image. | ||
# Copying this separately prevents re-running npm install on every code change. | ||
COPY package*.json ./ | ||
|
||
# Install production dependencies. | ||
RUN npm install --only=production | ||
RUN npm install | ||
|
||
# Copy local code to the container image. | ||
COPY . ./ | ||
|
||
RUN npm run build | ||
RUN npm prune --production | ||
|
||
# Run the web service on container startup. | ||
CMD [ "npm", "start" ] |
This file contains 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