read me
parent
187190efc0
commit
1eb6edb768
|
@ -17,7 +17,6 @@ public/img/
|
|||
public/views/
|
||||
module/
|
||||
node_modules/
|
||||
config/application.config.php
|
||||
bin/
|
||||
data/DoctrineORMModule/
|
||||
data/json/
|
||||
|
|
100
README.md
100
README.md
|
@ -8,19 +8,27 @@ Skeleton Monarc Project.
|
|||
Installation
|
||||
------------
|
||||
|
||||
PHP & MySQL
|
||||
-----------
|
||||
Install PHP (version 7.0 recommended) with Apache (or Nginx) with extensions : xml, mbstring, mysql, zip, unzip
|
||||
For Apache add mods : rewrite, ssl
|
||||
|
||||
Install MySQL (version 5.7 recommended) or MariaDb equivalent
|
||||
|
||||
|
||||
Using Composer (recommended)
|
||||
----------------------------
|
||||
The recommended way to get a working copy of this project is to clone the repository
|
||||
and use `composer` to install dependencies using the `create-project` command:
|
||||
|
||||
|
||||
curl -s https://getcomposer.org/installer | php --
|
||||
php composer.phar create-project -sdev --repository="https://rhea.netlor.fr/monarc/skeleton/raw/master/packages.json" monarc/skeleton ./monarc
|
||||
php composer.phar create-project -sdev --repository="https://github.com/CASES-LU/skeleton/raw/master/packages.json" monarc/skeleton ./monarc
|
||||
|
||||
Alternately, clone the repository and manually invoke `composer` using the shipped
|
||||
`composer.phar`:
|
||||
|
||||
cd my/project/dir
|
||||
git clone ssh://gogs@rhea.netlor.fr:2222/monarc/skeleton.git ./monarc
|
||||
git clone ssh://github.com/CASES-LU/MonarcAppFO.git ./monarc
|
||||
cd monarc
|
||||
php composer.phar self-update
|
||||
php composer.phar install -o
|
||||
|
@ -28,6 +36,39 @@ Alternately, clone the repository and manually invoke `composer` using the shipp
|
|||
(The `self-update` directive is to ensure you have an up-to-date `composer.phar`
|
||||
available.)
|
||||
|
||||
|
||||
Databases
|
||||
---------
|
||||
Create 2 databases:
|
||||
|
||||
CREATE DATABASE monarc_cli;
|
||||
CREATE DATABASE monarc_common;
|
||||
|
||||
Change Sql Mode for each database:
|
||||
|
||||
SET GLOBAL sql_mode = 'MYSQL40';
|
||||
SET SESSION sql_mode = 'MYSQL40';
|
||||
|
||||
|
||||
Symbolics links
|
||||
---------------
|
||||
Create 2 symbolics links at project root:
|
||||
|
||||
mkdir module
|
||||
cd module
|
||||
ln -s ./../vendor/monarc/core MonarcCore;
|
||||
ln -s ./../vendor/monarc/frontoffice MonarcFO;
|
||||
|
||||
Interfaces
|
||||
----------
|
||||
Repository for angular at project root:
|
||||
|
||||
mkdir node_modules
|
||||
cd node_modules
|
||||
git clone https://github.com/CASES-LU/ng-client.git ng_client
|
||||
git clone https://github.com/CASES-LU/ng-anr.git ng_anr
|
||||
|
||||
|
||||
Web Server Setup
|
||||
----------------
|
||||
|
||||
|
@ -63,7 +104,7 @@ project and you should be ready to go! It should look something like below:
|
|||
Database connection
|
||||
-------------------
|
||||
|
||||
Create file `config/autoload.local.php`:
|
||||
Create file `config/autoload/local.php`:
|
||||
|
||||
return array(
|
||||
'doctrine' => array(
|
||||
|
@ -73,9 +114,58 @@ Create file `config/autoload.local.php`:
|
|||
'host' => 'host',
|
||||
'user' => 'user',
|
||||
'password' => 'password',
|
||||
'dbname' => 'monarc',
|
||||
'dbname' => 'monarc_common',
|
||||
),
|
||||
),
|
||||
'orm_cli' => array(
|
||||
'params' => array(
|
||||
'host' => 'host',
|
||||
'user' => 'user',
|
||||
'password' => 'password',
|
||||
'dbname' => 'monarc_cli',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
|
||||
Create file configuration
|
||||
|
||||
sudo cp /config/autoload/local.php.dist /config/autoload/local.php
|
||||
|
||||
Update connexion information to local.php and global.php
|
||||
|
||||
Configuration files are stored in cache.
|
||||
If yours changes have not been considered, empty cache by deleting file in /data/cache
|
||||
|
||||
Install Grunt
|
||||
-------------
|
||||
|
||||
sudo apt-get install nodejs
|
||||
sudo apt-get install npm
|
||||
sudo npm install -g grunt-cli
|
||||
|
||||
Only for linux system:
|
||||
|
||||
sudo ln -s /usr/bin/nodejs /usr/bin/node (seulement linux)
|
||||
|
||||
Update project
|
||||
--------------
|
||||
Play script (pull and migrations):
|
||||
|
||||
sudo sh ./scripts/update-all.sh
|
||||
|
||||
This shell script use others shell script. May be you node to change rights of these others files
|
||||
|
||||
Create Initial User
|
||||
-------------------
|
||||
|
||||
Modify email and password of first user in /module/MonarcFO/migrations/seeds/adminUserInit.php
|
||||
|
||||
Create first user:
|
||||
|
||||
php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/MonarcFO/migrations/phinx.php
|
|
@ -1,32 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Configuration file generated by ZFTool
|
||||
* The previous configuration file is stored in application.config.old
|
||||
*
|
||||
* @see https://github.com/zendframework/ZFTool
|
||||
*/
|
||||
$env = getenv('APP_ENV') ?: 'production';
|
||||
|
||||
return array(
|
||||
'modules' => array(
|
||||
'DoctrineModule',
|
||||
'DoctrineORMModule',
|
||||
'MonarcCore',
|
||||
'MonarcBO',
|
||||
),
|
||||
'module_listener_options' => array(
|
||||
'module_paths' => array(
|
||||
'./module',
|
||||
'./vendor'
|
||||
),
|
||||
'config_glob_paths' => array(
|
||||
'config/autoload/{,*.}{global,local}.php'
|
||||
),
|
||||
'config_cache_enabled' => ($env == 'production'),
|
||||
'config_cache_key' => 'c8aaaaa11586f8b1bf5565cc6064e70a', // md5('config_cache_key_monarc')
|
||||
'module_map_cache_enabled' => ($env == 'production'),
|
||||
'module_map_cache_key' => '664579376c4dcdcaa0bcdd0f7e7bf25b', // md5('module_map_cache_key_monarc'),
|
||||
'cache_dir' => 'data/cache/',
|
||||
'check_dependencies' => ($env != 'production'),
|
||||
),
|
||||
);
|
Loading…
Reference in New Issue