Switch to using GCR and Cloud Run
This commit is contained in:
parent
7e763556a5
commit
8b3b1b8163
2 changed files with 21 additions and 5 deletions
14
.github/workflows/ci.yml
vendored
14
.github/workflows/ci.yml
vendored
|
@ -22,12 +22,24 @@ jobs:
|
|||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Set up Cloud SDK
|
||||
uses: google-github-actions/setup-gcloud@master
|
||||
with:
|
||||
project_id: ${{ secrets.GCP_PROJECT_ID }}
|
||||
service_account_key: ${{ secrets.GCP_SA_KEY }}
|
||||
export_default_credentials: true
|
||||
|
||||
- name: Login to GCR
|
||||
run: gcloud auth configure-docker
|
||||
|
||||
- name: Build and push
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
push: true
|
||||
tags: ekzhang/rustpad:latest
|
||||
tags: |
|
||||
ekzhang/rustpad:latest
|
||||
gcr.io/rustpad/rustpad:latest
|
||||
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
|
|
12
README.md
12
README.md
|
@ -73,9 +73,13 @@ wasm-pack test rustpad-wasm --chrome --headless
|
|||
|
||||
## Deployment
|
||||
|
||||
Rustpad is distributed as a single ~10 MB Docker image, which is built from the
|
||||
`Dockerfile` in this repository. GitHub Actions automatically builds a new image
|
||||
on each push to the `main` branch.
|
||||
Rustpad is distributed as a single ~10 MB Docker image, which is built
|
||||
automatically from the `Dockerfile` in this repository. You can pull the latest
|
||||
version of the image with
|
||||
|
||||
```
|
||||
docker pull ekzhang/rustpad
|
||||
```
|
||||
|
||||
We deploy a public instance of this image using
|
||||
[DigitalOcean App Platform](https://www.digitalocean.com/products/app-platform/).
|
||||
[Google Cloud Run](https://cloud.google.com/run).
|
||||
|
|
Loading…
Add table
Reference in a new issue