From 8d39eb3d5ad5baee721a2c6518a8429fb0cbd1bf Mon Sep 17 00:00:00 2001 From: Ludovic Pouzenc Date: Mon, 16 Jul 2018 11:30:15 +0200 Subject: Config : add app.php to git without credentials --- app-from-scratch.sh | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'app-from-scratch.sh') 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" + [ + '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 + -- cgit v1.1