Databases
PostgreSQL
Section intitulée « PostgreSQL »databases: pgs: - name: mon_app - name: mon_app_analyticsLe deployer cree automatiquement :
- La base de donnees sur l’instance Cloud SQL partagee
- Un Cloud SQL Auth Proxy (sidecar deployment)
- Les credentials Vault (
PG_HOST_{NAME},PG_USER_{NAME},PG_PASS_{NAME},PG_DBNAME_{NAME})
| Propriete | Type | Requis | Defaut | Description |
|---|---|---|---|---|
name | string | oui | — | Nom de la base |
instance | string | non | psql-1 | Instance Cloud SQL |
branch | string | non | branche courante | Override de branche |
project | string | non | projet courant | Override de projet GCP |
extensions | string[] | non | [] | Extensions PostgreSQL a activer |
restoreFileName | string | non | — | Fichier de restauration (backup) |
Base PostgreSQL externe
Section intitulée « Base PostgreSQL externe »Pour acceder a une base sur un autre projet :
databases: pgsExt: - name: shared_db project: buhsv-prod-platform instance: psql-2databases: mgs: - name: mon_appCreee sur le cluster MongoDB Atlas partage. Variables injectees : MG_HOST_{NAME}, MG_USER_{NAME}, MG_PASS_{NAME}, MG_DBNAME_{NAME}.
| Propriete | Type | Requis | Defaut | Description |
|---|---|---|---|---|
name | string | oui | — | Nom de la base |
clusterHost | string | non | depuis Vault | Host du cluster Atlas |
branch | string | non | branche courante | Override de branche |
restoreFileName | string | non | — | Fichier de restauration |
Base MongoDB externe
Section intitulée « Base MongoDB externe »databases: mgsExt: - name: shared_mongoMigration
Section intitulée « Migration »Pour executer des migrations au deploiement :
migration: enable: true useAppImg: true # Utilise l'image de l'app command: ["npm", "run", "migrate"]| Champ | Type | Description |
|---|---|---|
enable | boolean | Activer les migrations |
useAppImg | boolean | Utiliser l’image Docker de l’app pour la migration |
command | string/string[] | Commande de migration |
Exemples
Section intitulée « Exemples »# Node.jsmigration: enable: true useAppImg: true command: ["npm", "run", "migrate"]
# PHP/Symfonymigration: enable: true useAppImg: true command: ["/bin/sh", "-c", "php bin/console doctrine:migrations:migrate --no-interaction"]
# Python/Djangomigration: enable: true useAppImg: true command: ["python", "manage.py", "migrate", "--noinput"]Voir aussi : Toutes les proprietes | Workers & CronJobs