Created
July 20, 2020 14:32
-
-
Save nathanfletcher/70057a07d9eb9482fe1cbf377765ec91 to your computer and use it in GitHub Desktop.
Strapi database config file for Cloud Run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = ({ env }) => ({ | |
defaultConnection: 'default', | |
connections: { | |
default: { | |
connector: 'bookshelf', | |
settings: { | |
client: 'mysql', | |
socketPath: "/cloudsql/gcloud-project-name:europe-west4:databasename", | |
database: process.env.DATABASE_NAME || '', | |
username: process.env.DATABASE_USERNAME || '', | |
password: process.env.DATABASE_PASSWORD || '', | |
ssl: false, | |
}, | |
options: { | |
pool: { | |
min: 0, | |
max: 50, | |
idleTimeoutMillis: 30000, | |
createTimeoutMillis: 30000, | |
acquireTimeoutMillis: 30000 | |
} | |
} | |
}, | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment