Closed mattlindsey closed 1 year ago
have a look at this for sql issues
https://dev.to/ku6ryo/access-cloud-sql-from-docker-on-cloud-run-41b6
Also this for postgres stuff needed https://dev.to/ku6ryo/access-cloud-sql-from-docker-on-cloud-run-41b6
I think this looks good now. Turns out this doc was the latest/best way to do it, rather than the older 4 step tutorial which is more complicated: https://cloud.google.com/ruby/rails/run
fixes #3819 fixes #3813
@mtc2013. See it this looks good now. We should squash the commits when merging since there's so many.
Modifications to allow running the site on docker locally and on Google Cloud.
It's currently dying on trying to connect to Google Cloud SQL postgres with this: PG::ConnectionBad: could not connect to server: No such file or directory
It seems to happen first when 'rake db:setup' tries to create the db and do migrations. And the postgres logs don't show it hitting the database. And the 'websiteone-production' db doesn't get created unless I do it manually.
I have checked a lot of things, and it may be a problem with the encrypted db password using the 'master key' method in rails, but I also seem to get the error just defining the password in the cloud service. Possibly the master key or 'rails secret key' didn't get saved correctly.