https://github.com/ryanwi/rails-on-cloudrun
Sample of Rails app on Google Cloud Run
https://github.com/ryanwi/rails-on-cloudrun
Last synced: 11 months ago
JSON representation
Sample of Rails app on Google Cloud Run
- Host: GitHub
- URL: https://github.com/ryanwi/rails-on-cloudrun
- Owner: ryanwi
- Created: 2021-02-11T23:05:51.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-02-11T23:25:29.000Z (over 5 years ago)
- Last Synced: 2025-03-03T20:05:54.739Z (over 1 year ago)
- Language: Ruby
- Size: 24.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rails on Cloud Run
https://cloud.google.com/run/docs/quickstarts/build-and-deploy#ruby
## Build and push the container image
```
gcloud builds submit --tag gcr.io/[project-id]/rails-on-cloudrun
```
## Deploy the container image to Cloud Run
```
gcloud run deploy --image gcr.io/[project-id]/rails-on-cloudrun --platform managed \
--set-env-vars "RAILS_MASTER_KEY=[secret]" \
--set-env-vars "RAILS_ENV=production"
```
## Environment variables
Set any default environment variables in the Dockerfile with
```
ENV KEY1=VALUE1,KEY2=VALUE2
```
Generate a SECRET_KEY_BASE
```
rake secret
```