Go to the directory of where your Ruby on Rails Application is located.
$ cd hxeapp
Create a file app.yaml
:
hxeapp$ touch app.yaml
Copy the below code to the app.yaml
file:
entrypoint: bundle exec rackup --port $PORT
env: flex
runtime: ruby
Note:
If YARN is not installed on the machine, please install YARN using the instructions,
YARN Install before running the above command.
Run the following command and copy the generated key in the console output.
hxeapp$ bundle exec rails secret
Add the below code to app.yaml
file.
env_variables:
SECRET_KEY_BASE: <YOUR_GENERATED_LONG KEY>
Run the following command.
hxeapp$ RAILS_ENV=production bundle exec rails assets:precompile
Execute the command below to deploy the application.
hxeapp$ gcloud app deploy
Note:
The deployment will take ~5 minutes.
After successful deployment, open the application by the following command.
gcloud app browse