summaryrefslogtreecommitdiff
path: root/app-from-scratch.sh
diff options
context:
space:
mode:
Diffstat (limited to 'app-from-scratch.sh')
-rw-r--r--app-from-scratch.sh32
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
+