diff options
author | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2018-07-16 11:30:15 +0200 |
---|---|---|
committer | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2018-07-16 11:30:15 +0200 |
commit | 8d39eb3d5ad5baee721a2c6518a8429fb0cbd1bf (patch) | |
tree | 852a62e3dc34990b034a65201ad04cd827684547 /app-from-scratch.sh | |
parent | 4a3ec0ca3f7d0ca8776a6ee7f2a2615234395eb8 (diff) | |
download | chd_gestion-8d39eb3d5ad5baee721a2c6518a8429fb0cbd1bf.zip chd_gestion-8d39eb3d5ad5baee721a2c6518a8429fb0cbd1bf.tar.gz chd_gestion-8d39eb3d5ad5baee721a2c6518a8429fb0cbd1bf.tar.bz2 |
Config : add app.php to git without credentials
Diffstat (limited to 'app-from-scratch.sh')
-rw-r--r-- | app-from-scratch.sh | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/app-from-scratch.sh b/app-from-scratch.sh index 418686d..91e5cf1 100644 --- a/app-from-scratch.sh +++ b/app-from-scratch.sh @@ -28,7 +28,7 @@ composer.phar --version # cake install cd ~/chd_gestion/ mkdir fai_gestion -yes | php ~/composer.phar create-project --prefer-dist cakephp/app fai_gestion +yes | composer.phar create-project --prefer-dist cakephp/app fai_gestion ln -s ~intarnet/chd_gestion/fai_gestion/bin/cake ~/bin/ cd ~/chd_gestion/fai_gestion cake version @@ -89,3 +89,33 @@ cat fai_gestion/.gitignore git add app-from-scratch.sh fai_gestion git commit -m "Cake 3.6.7 fresh install" + +# Cake startup configuration +sed --in-place -e 's#^/config/app.php#/config/app_credentials.php#' fai_gestion/.gitignore +git add app-from-scratch.sh fai_gestion/.gitignore fai_gestion/config/app.php +git commit -m "Config : add app.php to git without credentials" + +cat > config/app_credentials.php <<"EOT" +<?php +return [ + 'Security' => [ + 'salt' => env('SECURITY_SALT', 'hexhexhexhexhexhexhexhexhexhexhexhexhexhexhexhexhexhexhexhexhexh'), + ], + 'Datasources' => [ + 'default' => [ + 'className' => 'Cake\Database\Connection', + 'driver' => 'Cake\Database\Driver\Mysql', + 'persistent' => false, + 'host' => 'localhost', + 'username' => 'my_app', + 'password' => 'secret', + 'database' => 'my_app', + 'timezone' => 'UTC', + 'cacheMetadata' => true, + 'log' => false, + 'quoteIdentifiers' => false, + ], + ], +]; +EOT + |