GoogleCloudPlatform / appengine-ruby

Optional integration library for the Ruby runtime for Google App Engine
Apache License 2.0
53 stars 21 forks source link

Run rails server when call db:migrate #34

Closed riouruma closed 4 years ago

riouruma commented 4 years ago

How can I call migrate?

$ bundle exec rake appengine:exec GAE_CONFIG=gcp/app_prd.yaml -- bundle exec rake db:migrate

Using the `cloud_build` strategy for appengine:exec
(i.e. running your app image in Cloud Build)
PROJECT: xxx
SERVICE: default
VERSION: 20200602t090012
TIMEOUT: 10m

...

---------- CONNECT CLOUDSQL ----------
cloud_sql_proxy is running.

---------- EXECUTE COMMAND ----------
bundle exec rake db:migrate
2
=> Booting Puma
=> Rails 5.2.2.1 application starting in staging
=> Run `rails server -h` for more startup options
2
Creating scope :board_plan_count. Overwriting existing method Forecast.board_plan_count.
Creating scope :column. Overwriting existing method Story.column.
Creating scope :comment. Overwriting existing method Notification.comment.
Creating scope :open. Overwriting existing method Recruit.open.
Puma starting in single mode...
* Version 4.3.5 (ruby 2.6.2-p47), codename: Mysterious Traveller
* Min threads: 5, max threads: 5
* Environment: staging
* Listening on tcp://0.0.0.0:3000
Use Ctrl-C to stop
riouruma commented 4 years ago

Solved.