gcloudwith Google Cloud:
YOUR_INSTANCE_NAMEis a name of your choice. You may want to set your region:
YOUR_INSTANCE_NAMEis the name you chose in step 1.
YOUR_INSTANCE_ROOT_PASSWORDis a password of your choice.
YOUR_INSTANCE_CONNECTION_NAMEis the connection name of your instance on its overview page in the Cloud Console, or use
MYSQL_DATABASEenvironment variables (see below). This allows your local Ghost app to connect to your Cloud SQL instance through the proxy.
package.jsonfor Google Cloud Node.
config.development.jsonfile from the default configuration file:
config.production.jsonfile from the default config file:
config.development.jsonand set it to the following:
config.production.jsonand set it to the following:
url: The URL at which the blog will be deployed. This is the URL users will use to access the blog.
fileStorage: Setting this value to
falseforces image uploads to use an image URL because App Engine doesn't have persistent disks. Without this setting, any photos uploaded to the blog will eventually disappear.
database: Tells Ghost how to connect to the Cloud SQL instance.
server: Tells Ghost how to listen for web traffic.
app.yamlfile with the following contents:
runtime: Tells App Engine to use the Node.js runtime.
"socketPath": "/cloudsql/YOUR_INSTANCE_NAME"in the connection properties section of your
config.production.json, so you end up with the following:
socketPathproperty is required to deploy on App Engine, but it causes
knex-migratorto throw an error.
YOUR_PROJECT_IDis your Google Cloud project ID).