Skip to content

Commit

Permalink
build: Use gcloud run deploy (#298)
Browse files Browse the repository at this point in the history
  • Loading branch information
sasjo authored Aug 6, 2024
1 parent 562ab13 commit 035c1a0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 25 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,17 @@ jobs:
service-account-key: ${{ secrets.GCLOUD_AUTH }}

- name: Deploy to Cloud Run
uses: extenda/actions/cloud-run@v0
with:
service-account-key: ${{ secrets.GCLOUD_AUTH }}
image: ${{ needs.release.outputs.docker-image-name }}
run: |
gcloud run deploy tech-radar \
--image=${{ needs.release.outputs.docker-image-name }} \
--service-account=cloudrun-runtime@${{ steps.gcloud.outputs.project-id }}.iam.gserviceaccount.com \
--platform=managed \
--region=europe-west1 \
--project=${{ steps.gcloud.outputs.project-id }} \
--cpu=1 \
--memory=256Mi \
--min-instances=0 \
--max-instances=20 \
--allow-unauthenticated \
--set-env-vars=SERVICE_PROJECT_ID=${{ steps.gcloud.outputs.project-id }},SERVICE_ENVIRONMENT=prod \
--set-secrets=LD_SDK_KEY=launchdarkly-sdk-key:latest
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ ENV PUBLIC_HTML /var/www

EXPOSE 8080

COPY --from=gcr.io/berglas/berglas:0.5.2 /bin/berglas /bin/berglas

COPY build /var/www
COPY server/dist /opt/tech-radar
COPY entrypoint.sh /usr/local/bin/entrypoint.sh

CMD ["/usr/local/bin/entrypoint.sh"]
ENTRYPOINT ["/usr/local/bin/node"]
CMD ["/opt/tech-radar/index.js"]
10 changes: 0 additions & 10 deletions cloud-run.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions entrypoint.sh

This file was deleted.

0 comments on commit 035c1a0

Please sign in to comment.