Compare commits

...

87 Commits

Author SHA1 Message Date
Ruslan Baidan 8f005da738 Updated the dependency with "Fixed all the clients' models unlink when a single one is removed.". 2023-12-04 15:44:13 +01:00
Ruslan Baidan 497ab325f3 Added definition and usage of the DATA_PATH global const. 2023-10-24 11:40:14 +02:00
Ruslan Baidan 3d99019bfc Added the PROJECT_ROOT definition and usage in the core lib patch. 2023-10-18 16:29:47 +02:00
Ruslan Baidan 5d92aa8aa5 Updated the backoffice dependency with the 2FA fix. 2023-08-08 12:55:27 +02:00
Ruslan Baidan 2aa121d41b Updated the backoffice dependency with added the missing space in the sql. 2023-06-22 14:19:18 +02:00
Ruslan Baidan 561e6793e1 Updated the backoffice dependency with the password reset when clients' 1st user's email is changed. 2023-06-22 14:07:19 +02:00
Ruslan Baidan 4aacfe4ccf Updated the backoffice dependency with the reset 2FA feature. 2023-06-20 17:00:17 +02:00
Ruslan Baidan 93b847191e Updated the Core dependency with the fix of typcasting. 2023-06-14 13:40:15 +02:00
Ruslan Baidan 862879066b Updated the zm-backoffice dependency. 2023-04-11 09:34:42 +02:00
Ruslan Baidan 29a78ddfd0 Updated the BackOffice dependency with the models unlink fix. 2023-03-31 11:25:01 +02:00
Ruslan Baidan 368c9b7c60 Reinstalled all the dependencies. 2023-03-24 09:57:16 +01:00
Ruslan Baidan 11364f3b3f Update the version and the dependencies. 2023-03-23 16:14:04 +01:00
Ruslan Baidan 2fcd92e05d Added the client update folder config option. 2023-03-23 11:41:28 +01:00
Ruslan Baidan 03e6d47f78
Update releases.yml
Fixed the typo.
2023-03-09 15:11:23 +01:00
Ruslan Baidan 1e307691bb Applied all the PHP8 required changes. 2023-03-09 15:05:40 +01:00
Ruslan Baidan b7eb17f06b Updated the core version. 2023-03-06 16:33:57 +01:00
Ruslan Baidan 4118d48c4a Release of the new version 2.12.4 2022-12-21 10:44:30 +01:00
Ruslan Baidan 4e82cc864a Release of the new version 2.12.4 2022-12-21 10:21:42 +01:00
Ruslan Baidan 650831e071 Release of the new version 2.12.15 2022-12-21 10:14:40 +01:00
jfrocha 0bfd7dd322 Updated logos 2022-11-16 15:36:47 +01:00
Ruslan Baidan acff5b43ac Added the checkout to the latest tags for ng packages. 2022-10-11 09:26:03 +02:00
Ruslan Baidan 03465c2f44 Updated the version and the dependencies. 2022-10-10 17:17:25 +02:00
Ruslan Baidan 855100136c
Update releases.yml
Fixed the output typo.
2022-10-10 16:59:08 +02:00
Ruslan Baidan f892fc7cd1
Update link_modules_resources.sh
Replaced the flags link to the public folder.
2022-10-10 16:53:20 +02:00
Ruslan Baidan 2648319da1
Update releases.yml
Fixed the latest tags fetching for the ng repos.
2022-10-10 16:41:35 +02:00
Ruslan Baidan 4ddb6c42d8
Update releases.yml
Updated the workflow to avoid installing node dependencies twice.
2022-10-06 09:14:56 +02:00
Ruslan Baidan ead469f096 Updated the backoffice dev with the fix of clients' search. 2022-09-16 12:30:23 +02:00
Ruslan Baidan 01600858d5 Updated the Core dependency with the fix of models duplication. 2022-08-19 12:24:13 +02:00
Ruslan Baidan c2dfb60dca Downgraded the version of the laminas-dependency-plugin dependency to fix cross dependencies issues. 2022-07-18 12:12:40 +02:00
Ruslan Baidan 7cbd53eef4 Updated the core dependency version with the fixes. 2022-07-18 11:29:15 +02:00
Cédric Bonhomme 77b0a68e27
updated dependency to monarc/backoffice and new QRCode backend. 2022-06-22 09:54:37 +02:00
Cédric Bonhomme ab95ee6c6e
fixed link of dependencies 2022-06-21 16:32:00 +02:00
Cédric Bonhomme b91e2bfaf3
chg: [dependencies] Updated JavaScript dependencies. 2022-06-21 16:21:55 +02:00
Ruslan Baidan df8d8ac90d FIxed the doctrine driver class. 2022-06-21 15:09:07 +02:00
Cédric Bonhomme 74a13d269e
chg: [ci-releases] Do not install dev packages. 2022-06-13 17:28:40 +02:00
Cedric 78f274075a
Merge pull request #10 from remil1000/ci-releases
Ci releases
2022-06-13 14:30:35 +00:00
Rémi Laurent 24b1bfcf5e prepare pull-request with correct branch 2022-06-13 16:25:15 +02:00
Rémi Laurent 97b75586e9 [skip ci] allowing dash in release tags 2022-05-31 12:54:15 +02:00
Rémi Laurent f208ed4f5a removing partials symlinking in ng_backoffice 2022-05-31 10:20:08 +02:00
Rémi Laurent 3daefd99ed pinning ng-anr and ng-backoffice versions 2022-05-31 10:07:12 +02:00
Rémi Laurent 62681f0275 release workflow initial release 2022-05-31 09:58:42 +02:00
Cédric Bonhomme 25fb2513a0
removed allow-plugins section and added composer.lock 2022-05-30 07:52:59 +02:00
Cédric Bonhomme 239166a930
revert changes in composer.json 2022-05-24 10:45:07 +02:00
Cédric Bonhomme 39c490abc6
updated README. 2022-05-23 15:02:16 +02:00
Cédric Bonhomme b5ded532fa
updated MONARC backend dependencies. !minor 2022-05-23 15:00:01 +02:00
Cédric Bonhomme 0c543d6847
updated composer.json with laminas-dependency-plugin 2022-05-23 14:55:11 +02:00
Cédric Bonhomme 35458470e0
chg: updated package.json 2022-05-19 11:35:45 +02:00
Cédric Bonhomme 6995ec1218
removed useless package-lock.json 2022-05-19 11:34:08 +02:00
Ruslan Baidan 23dacbffa4
Merge pull request #6 from monarc-project/dependabot/npm_and_yarn/path-parse-1.0.7
Bump path-parse from 1.0.6 to 1.0.7
2022-03-30 08:37:11 +02:00
dependabot[bot] 8de0a994dc
Bump path-parse from 1.0.6 to 1.0.7
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-30 06:26:51 +00:00
Ruslan Baidan 2095d4751f
Merge pull request #5 from monarc-project/dependabot/npm_and_yarn/minimist-1.2.6
Bump minimist from 1.2.5 to 1.2.6
2022-03-30 08:26:26 +02:00
dependabot[bot] 4a9e1188c3
Bump minimist from 1.2.5 to 1.2.6
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-29 21:47:40 +00:00
Ruslan Baidan 5012fb9d4b Updated the dependency with fixed the group statement for the query. 2021-11-29 14:27:02 +01:00
Ruslan Baidan 105399730f Updated the dependencies. 2021-11-29 14:17:35 +01:00
Ruslan Baidan f3105a6761 Fixed the installatino instructions. 2021-11-02 10:58:10 +01:00
Ruslan Baidan fc31de9b80 Updated the dependencies. 2021-11-02 10:22:05 +01:00
jfrocha 11c9a58d73 Updated the check_composer.sh permissions 2021-09-24 10:31:06 +02:00
Cédric Bonhomme c6173bfea7
updated dependencies in composer.lock file. 2021-09-14 10:22:30 +02:00
Cédric Bonhomme f4c179493a
updated dependencies in composer.lock file. 2021-09-06 07:54:46 +02:00
Cédric Bonhomme cede994b83
updated composer.lock 2021-09-02 16:40:48 +02:00
Ruslan Baidan d62d9d5d7f
Update zm_core version with the fix. 2021-05-25 21:13:27 +02:00
Ruslan Baidan 8ba95c8bf0
Updated the zm_core package. 2021-05-21 14:40:41 +02:00
Cédric Bonhomme aac3aaaa1c
chg: set Vagrant privileged mode to false, adapt some permissions and execute mysql_secure_installation with sudo 2021-05-21 11:47:05 +02:00
Ruslan Baidan 6cd81e4baa Updated zm_backoffice dependency with the fix. 2021-05-19 11:20:11 +02:00
Ruslan Baidan 481d1b60d7 Updated zm-backoffice dependency. 2021-05-18 14:39:33 +02:00
Ruslan Baidan beeb9d6207 Update the core dependency. 2021-05-18 12:33:34 +02:00
Ruslan Baidan 789b63c771 FIxed the vagrant installation. 2021-05-18 09:34:44 +02:00
Ruslan Baidan 9ad7b375da Updated the dependencies and vagrant bootstrap. 2021-05-17 22:37:29 +02:00
Cédric Bonhomme 71d4a109c1
fix: [security] GHSA-m5pj-vjjf-4m3h 2021-05-11 09:38:39 +02:00
Ruslan Baidan f22b0d27d6 Update the vagrant with ubuntu 20.04 and some permissions fixes. 2021-05-10 18:23:56 +02:00
Cédric Bonhomme dc88640d91
chg: [dependencies] updated monarc/backoffice to fix the issue with laminas-dependency-plugin 2021-04-22 09:02:30 +02:00
Ruslan Baidan 885a80a552 Updated composer.lock with the libs updated tags. 2020-08-19 12:32:35 +02:00
Ruslan Baidan 48a6b299e2 Release of v2.9.12. 2020-08-14 13:01:24 +02:00
Ruslan Baidan cbbee4a643 Updated the core version. 2020-04-15 18:45:04 +02:00
Ruslan Baidan 2d854e56fa Merge branch 'master' of https://github.com/monarc-project/MonarcAppBO
* 'master' of https://github.com/monarc-project/MonarcAppBO:
  added check_composer.sh
2020-02-24 17:01:05 +01:00
Ruslan Baidan 480916c33f Update the core package with the last fix. 2020-02-24 17:00:31 +01:00
Cédric Bonhomme 7c843fef61 Merge branch 'master' of https://github.com/monarc-project/MonarcAppBO 2020-02-24 14:04:00 +01:00
Cédric Bonhomme 304555d580
added check_composer.sh 2020-02-24 14:03:45 +01:00
Ruslan Baidan 699f983105 Updated the composer.lock file to use core package with input filter dependencies. 2020-02-24 09:20:02 +01:00
Ruslan Baidan 05e0ad3d8b Added back the dependency pluging package. 2020-02-22 11:56:18 +01:00
Ruslan Baidan 3e0d611c48 Updated the composer.lock with the removed dependency. 2020-02-21 17:01:47 +01:00
ruslanbaidan b169fffd3a
Merge pull request #4 from monarc-project/laminas
Migrated to Laminas.
2020-02-21 15:34:10 +01:00
Ruslan Baidan dc96289c36 Updated the composer with the latest versions of core and backoffice to use Laminas. 2020-02-21 15:25:17 +01:00
Cédric Bonhomme a7d811749f
Updated README and AUTHORS file. 2020-02-21 11:51:09 +01:00
Cédric Bonhomme 905a638318
Migrated to Laminas. 2020-02-21 11:46:10 +01:00
Ruslan Baidan 8bebf629c2
Updated the hash of the core dependency. 2020-01-29 15:15:18 +01:00
Ruslan Baidan 6b78d0d470
Releasing of the new version 2.9.5. 2020-01-29 10:17:25 +01:00
47 changed files with 5374 additions and 3041 deletions

107
.github/workflows/releases.yml vendored Normal file
View File

@ -0,0 +1,107 @@
name: MonarcAppBO releases
on:
push:
branches: [ 'master' ]
tags: [ 'v*.*', 'v*.*.*', 'v*.*.*-*' ]
pull_request:
branches: [ 'master' ]
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
node-version: [ "16.x" ]
php-version: [ "8.1" ]
steps:
- uses: actions/checkout@v2
- name: install deps
run: sudo apt-get update && sudo apt install -y gettext
# PHP
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: composer:v2.3
extensions: bcmath
- name: Validate composer.json and composer.lock
run: composer validate
- name: Install PHP dependencies
run: composer ins --prefer-dist --no-progress --no-suggest --no-dev --ignore-platform-req=php
- name: Symlink Monarc modules
run: |
mkdir -p module/Monarc
ln -s ../../vendor/monarc/core module/Monarc/Core
ln -s ../../vendor/monarc/backoffice module/Monarc/BackOffice
# javascript
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- uses: oprypin/find-latest-tag@v1
with:
repository: monarc-project/ng-anr
releases-only: true
id: ng_anr_lasttag
- run: echo "ng-anr is at version ${{ steps.ng_anr_lasttag.outputs.tag }}"
- name: Install ng-anr
uses: actions/checkout@v3
with:
repository: monarc-project/ng-anr
ref: ${{ steps.ng_anr_lasttag.outputs.tag }}
path: './node_modules/ng_anr'
- uses: oprypin/find-latest-tag@v1
with:
repository: monarc-project/ng-backoffice
releases-only: true
id: ng_backoffice_lasttag
- run: echo "ng-backoffice is at version ${{ steps.ng_backoffice_lasttag.outputs.tag }}"
- name: Install ng-backoffice
uses: actions/checkout@v3
with:
repository: monarc-project/ng-backoffice
ref: ${{ steps.ng_backoffice_lasttag.outputs.tag }}
path: './node_modules/ng_backoffice'
- name: Install ng-backoffice dependencies
run: |
cd node_modules/ng_backoffice
npm ci
# final "cleanup"
- name: post job
run: |
bash -ex ./scripts/link_modules_resources.sh
bash -ex ./scripts/compile_translations.sh
# prepare release
- name: Get repository name
id: repository
run: echo "::set-output name=pathref::$(echo '${{ github.repository }}' | cut -d'/' -f2)-$(echo '${{ github.ref_name }}' | sed 's/[^[:alnum:]\.-]/_/g')"
- name: create artifact archive
run: |
tar --exclude .git --exclude .github -zcf '../${{ steps.repository.outputs.pathref }}.tar.gz' .
- name: release
uses: softprops/action-gh-release@v1
with:
files: |
../${{ steps.repository.outputs.pathref }}.tar.gz
fail_on_unmatched_files: true
if: startsWith(github.ref, 'refs/tags/')

12
AUTHORS
View File

@ -1,8 +1,9 @@
# Developers
Cédric Bonhomme
Cédric Bonhomme - https://www.cedricbonhomme.org
Jérôme Lombardi
Juan Rocha
Ruslan Baidan
# Contributors
@ -19,10 +20,11 @@ Thomas Metois
# Copyright holders
- Copyright (C) 2016-2019 Jérôme Lombardi - https://github.com/jerolomb
- Copyright (C) 2016-2019 Juan Rocha - https://github.com/jfrocha
- Copyright (C) 2016-2019 SMILE gie securitymadein.lu
- Copyright (C) 2017-2019 Cédric Bonhomme - https://github.com/cedricbonhomme
- Copyright (C) 2016-2021 Jérôme Lombardi - https://github.com/jerolomb
- Copyright (C) 2016-2021 Juan Rocha - https://github.com/jfrocha
- Copyright (C) 2016-2021 SMILE gie securitymadein.lu
- Copyright (C) 2017-2021 Cédric Bonhomme - https://github.com/cedricbonhomme
- Copyright (C) 2016-2017 Guillaume Lesniak
- Copyright (C) 2016-2017 Thomas Metois
- Copyright (C) 2016-2017 Jérôme De Almeida
- Copyright (C) 2019-2021 Ruslan Baidan - https://github.com/ruslanbaydan

View File

@ -83,7 +83,7 @@ Create two symbolic links:
$ cd module/Monarc
$ ln -s ./../../vendor/monarc/core Core
$ ln -s ./../../vendor/monarc/frontoffice FrontOffice
$ ln -s ./../../vendor/monarc/backoffice BackOffice
$ cd ../..
There are 2 parts:

View File

@ -24,17 +24,18 @@ License
This software is licensed under
[GNU Affero General Public License version 3](http://www.gnu.org/licenses/agpl-3.0.html)
- Copyright (C) 2016-2019 Jérôme Lombardi - https://github.com/jerolomb
- Copyright (C) 2016-2019 Juan Rocha - https://github.com/jfrocha
- Copyright (C) 2016-2019 SMILE gie securitymadein.lu
- Copyright (C) 2017-2019 Cédric Bonhomme - https://github.com/cedricbonhomme
- Copyright (C) 2016-2022 SECURITYMADEIN.LU
- Copyright (C) 2016-2022 Jérôme Lombardi - https://github.com/jerolomb
- Copyright (C) 2016-2022 Juan Rocha - https://github.com/jfrocha
- Copyright (C) 2017-2022 Cédric Bonhomme - https://www.cedricbonhomme.org
- Copyright (C) 2016-2017 Guillaume Lesniak
- Copyright (C) 2016-2017 Thomas Metois
- Copyright (C) 2016-2017 Jérôme De Almeida
- Copyright (C) 2019-2022 Ruslan Baidan - https://github.com/ruslanbaydan
For more information, [the list of authors and contributors](AUTHORS) is available.
Data provided with MONARC (threats, assets, vulnerabilities, referentials,
Data provided with MONARC (threats, assets, vulnerabilities, standards,
etc.) are licensed under
[CC0 1.0 Universal (CC0 1.0)](https://creativecommons.org/publicdomain/zero/1.0/) -
Public Domain Dedication.

View File

@ -1 +1 @@
{"major":2, "minor":9, "hotfix":4}
{"major":2, "minor":12, "hotfix":6}

View File

@ -2,35 +2,65 @@
"name": "monarc/monarc-backoffice",
"description": "Monarc back office application",
"authors": [
{"name": "Cyril Rouyer", "email": "cyril@netlor.fr"},
{"name": "Guillaume Lesniak", "email": "guillaume@netlor.fr"},
{"name": "Jerôme De Almeida", "email": "jerome.dealmeida@vesperiagroup.com"},
{"name": "Benjamin Ganivet", "email": "benjamin@netlor.fr"},
{"name": "Thomas Metois", "email": "thomas@netlor.fr"},
{"name": "Jérôme Lombardi", "email": "jerome.lombardi@cases.lu"},
{"name": "Juan Rocha", "email": "juan.rocha@cases.lu"},
{"name": "Cédric Bonhomme", "email": "cedric.bonhomme@cases.lu"},
{"name": "Ruslan Baidan", "email": "ruslan.baidan@cases.lu"}
{
"name": "Cyril Rouyer",
"email": "cyril@netlor.fr"
},
{
"name": "Guillaume Lesniak",
"email": "guillaume@netlor.fr"
},
{
"name": "Jérôme De Almeida",
"email": "jerome.dealmeida@vesperiagroup.com"
},
{
"name": "Benjamin Ganivet",
"email": "benjamin@netlor.fr"
},
{
"name": "Thomas Metois",
"email": "thomas@netlor.fr"
},
{
"name": "Jérôme Lombardi",
"email": "jerome.lombardi@cases.lu"
},
{
"name": "Juan Rocha",
"email": "juan.rocha@cases.lu"
},
{
"name": "Cédric Bonhomme",
"email": "cedric.bonhomme@cases.lu"
},
{
"name": "Ruslan Baidan",
"email": "ruslan.baidan@cases.lu"
}
],
"require": {
"php": "^7.1",
"php": "^7.4 || ^8.0",
"ext-json": "*",
"ext-pdo": "*",
"monarc/backoffice": "^2.9",
"monarc/core": "^2.9",
"zendframework/zend-mvc": "^3.1",
"zendframework/zend-di": "^3.1",
"zendframework/zend-permissions-rbac": "^3.0",
"zendframework/zend-log": "^2.11",
"zendframework/zend-i18n": "^2.9"
}
,
"monarc/backoffice": "^2.12.6",
"monarc/core": "^v2.12.6",
"laminas/laminas-mvc": "^3.1",
"laminas/laminas-di": "^3.1",
"laminas/laminas-permissions-rbac": "^3.0",
"laminas/laminas-log": "^2.11",
"laminas/laminas-i18n": "^2.9",
"laminas/laminas-dependency-plugin": "^2.0",
"endroid/qr-code": "^4.4"
},
"require-dev": {
"roave/security-advisories": "dev-master",
"zendframework/zend-component-installer": "^2.1"
"roave/security-advisories": "dev-latest"
},
"config": {
"bin-dir": "bin/"
"bin-dir": "bin/",
"allow-plugins": {
"laminas/laminas-dependency-plugin": true
}
},
"minimum-stability": "dev",
"prefer-stable": true

7707
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -6,34 +6,41 @@
* @see https://github.com/zendframework/ZFTool
*/
$env = getenv('APP_ENV') ?: 'production';
$appConfDir = getenv('APP_CONF_DIR') ?: '';
$appConfDir = getenv('APP_CONF_DIR') ?: null;
$confPaths = ['config/autoload/{,*.}{global,local}.php'];
defined('PROJECT_ROOT') or define('PROJECT_ROOT', __DIR__ . '/../');
if ($env !== 'testing') {
$confPaths = ['config/autoload/{,*.}{global,local}.php'];
}
$dataPath = 'data';
if (!empty($appConfDir)) {
$confPaths[] = $appConfDir . '/local.php';
$dataPath = $appConfDir . '/data';
if (!is_dir($dataPath . '/cache')
&& !mkdir($concurrentDirectory = $dataPath . '/cache') && !is_dir($concurrentDirectory)
) {
throw new RuntimeException(sprintf('Directory "%s" was not created', $concurrentDirectory));
if (!is_dir($dataPath . '/cache')) {
if (is_dir(PROJECT_ROOT . 'data/cache')) {
$dataPath = PROJECT_ROOT . 'data';
} elseif (!mkdir($concurrentDirectory = $dataPath . '/cache') && !is_dir($concurrentDirectory)) {
throw new \RuntimeException(sprintf('Directory "%s" was not created', $concurrentDirectory));
}
}
}
defined('DATA_PATH') or define('DATA_PATH', $dataPath);
return array(
'modules' => array(
'Zend\Di',
'Zend\Cache',
'Zend\Form',
'Zend\InputFilter',
'Zend\Filter',
'Zend\Paginator',
'Zend\Hydrator',
'Zend\Router',
'Zend\Log',
'Zend\Mail',
'Zend\Validator',
'Zend\I18n',
'Laminas\Di',
'Laminas\Cache',
'Laminas\Form',
'Laminas\InputFilter',
'Laminas\Filter',
'Laminas\Paginator',
'Laminas\Hydrator',
'Laminas\Router',
'Laminas\Log',
'Laminas\Mail',
'Laminas\Validator',
'Laminas\I18n',
'DoctrineModule',
'DoctrineORMModule',
'Monarc\Core',

View File

@ -11,60 +11,60 @@
* file.
*/
use Doctrine\DBAL\Driver\PDOMySql\Driver;
use Doctrine\DBAL\Driver\PDO\MySQL\Driver;
use Monarc\Core\Service\DoctrineCacheServiceFactory;
use Monarc\Core\Service\DoctrineLoggerFactory;
$appconfdir = getenv('APP_CONF_DIR') ?: '';
$datapath = "data";
if( ! empty($appconfdir) ){
$datapath = $appconfdir.'/data';
$dataPath = 'data';
if (defined('DATA_PATH')) {
$dataPath = DATA_PATH;
} elseif (!empty(getenv('APP_CONF_DIR'))) {
$dataPath = getenv('APP_CONF_DIR') . '/data';
}
return array(
return [
// DOCTRINE CONF
'service_manager' => array(
'factories' => array(
'service_manager' => [
'factories' => [
'doctrine.cache.mycache' => DoctrineCacheServiceFactory::class,
'doctrine.monarc_logger' => DoctrineLoggerFactory::class,
),
),
'doctrine' => array(
'connection' => array(
'orm_default' => array(
],
],
'doctrine' => [
'connection' => [
'orm_default' => [
'driverClass' => Driver::class,
'params' => array(
'params' => [
'host' => '127.0.0.1',
'port' => 3306,
'user' => 'root',
'password' => '',
'dbname' => 'monarc_common',
'charset' => 'utf8',
'driverOptions' => array(
'driverOptions' => [
PDO::ATTR_STRINGIFY_FETCHES => false,
PDO::ATTR_EMULATE_PREPARES => false,
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',
),
),
),
'orm_cli' => array(
],
],
],
'orm_cli' => [
'driverClass' => Driver::class,
'params' => array(
'params' => [
'host' => '127.0.0.1',
'port' => 3306,
'user' => 'root',
'password' => '',
'dbname' => 'monarc_cli',
'charset' => 'utf8',
'driverOptions' => array(
'driverOptions' => [
PDO::ATTR_STRINGIFY_FETCHES => false,
PDO::ATTR_EMULATE_PREPARES => false,
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',
),
),
),
),
],
],
],
],
/*'migrations_configuration' => array(
'orm_default' => array(
'name' => 'Monarc Migrations',
@ -81,52 +81,55 @@ return array(
'column' => 'version',
),
),*/
'entitymanager' => array(
'orm_default' => array(
'connection' => 'orm_default',
'configuration' => 'orm_default'
),
'orm_cli' => array(
'connection' => 'orm_cli',
'entitymanager' => [
'orm_default' => [
'connection' => 'orm_default',
'configuration' => 'orm_default',
],
'orm_cli' => [
'connection' => 'orm_cli',
'configuration' => 'orm_cli',
),
),
'configuration' => array(
'orm_default' => array(
'metadata_cache' => 'mycache',
'query_cache' => 'mycache',
'result_cache' => 'mycache',
'driver' => 'orm_default', // This driver will be defined later
'generate_proxies' => true,
'proxy_dir' => $datapath.'/DoctrineORMModule/Proxy',
'proxy_namespace' => 'DoctrineORMModule\Proxy',
'filters' => array(),
'datetime_functions' => array(),
'string_functions' => array(),
'numeric_functions' => array(),
'second_level_cache' => array(),
'sql_logger' => 'doctrine.monarc_logger',
),
'orm_cli' => array(
'metadata_cache' => 'mycache',
'query_cache' => 'mycache',
'result_cache' => 'mycache',
'driver' => 'orm_cli', // This driver will be defined later
'generate_proxies' => true,
'proxy_dir' => $datapath.'/DoctrineORMModule/Proxy',
'proxy_namespace' => 'DoctrineORMModule\Proxy',
'filters' => array(),
'datetime_functions' => array(),
'string_functions' => array(),
'numeric_functions' => array(),
'second_level_cache' => array(),
'sql_logger' => 'doctrine.monarc_logger',
),
),
),
],
],
'configuration' => [
'orm_default' => [
'metadata_cache' => 'mycache',
'query_cache' => 'mycache',
'result_cache' => 'mycache',
'driver' => 'orm_default', // This driver will be defined later
'generate_proxies' => true,
'proxy_dir' => $dataPath . '/DoctrineORMModule/Proxy',
'proxy_namespace' => 'DoctrineORMModule\Proxy',
'filters' => [],
'datetime_functions' => [],
'string_functions' => [],
'numeric_functions' => [],
'second_level_cache' => [],
'sql_logger' => 'doctrine.monarc_logger',
],
'orm_cli' => [
'metadata_cache' => 'mycache',
'query_cache' => 'mycache',
'result_cache' => 'mycache',
'driver' => 'orm_cli', // This driver will be defined later
'generate_proxies' => true,
'proxy_dir' => $dataPath . '/DoctrineORMModule/Proxy',
'proxy_namespace' => 'DoctrineORMModule\Proxy',
'filters' => [],
'datetime_functions' => [],
'string_functions' => [],
'numeric_functions' => [],
'second_level_cache' => [],
'sql_logger' => 'doctrine.monarc_logger',
],
],
],
'spool_path_create' => $datapath.'/json/create/',//default location path where the json file enabling the creation of the environment of the client should be generated
'spool_path_delete' => $datapath.'/json/delete/', //default location path where the json file enabling the deletion of the environment of the client should be generated
'spool_path_create' => $dataPath . '/json/create/',
//default location path where the json file enabling the creation of the environment of the client should be generated
'spool_path_delete' => $dataPath . '/json/delete/',
//default location path where the json file enabling the deletion of the environment of the client should be generated
'spool_path_update' => $dataPath . '/json/update/',
// END DOCTRINE CONF
);
];

View File

@ -10,6 +10,14 @@
* control, so do not include passwords or other sensitive information in this
* file.
*/
$dataPath = 'data';
if (defined('DATA_PATH')) {
$dataPath = DATA_PATH;
} elseif (!empty(getenv('APP_CONF_DIR'))) {
$dataPath = getenv('APP_CONF_DIR') . '/data';
}
return array(
// DOCTRINE CONF
'service_manager' => array(
@ -20,7 +28,7 @@ return array(
'doctrine' => array(
'connection' => array(
'orm_default' => array(
'driverClass' => 'Doctrine\DBAL\Driver\PDOMySql\Driver',
'driverClass' => 'Doctrine\DBAL\Driver\PDO\MySQL\Driver',
'params' => array(
'host' => 'localhost',
'port' => 3306,
@ -34,7 +42,7 @@ return array(
),
),
'orm_cli' => array(
'driverClass' => 'Doctrine\DBAL\Driver\PDOMySql\Driver',
'driverClass' => 'Doctrine\DBAL\Driver\PDO\MySQL\Driver',
'params' => array(
'host' => 'localhost',
'port' => 3306,
@ -81,7 +89,7 @@ return array(
'result_cache' => 'mycache',
'driver' => 'orm_default', // This driver will be defined later
'generate_proxies' => true,
'proxy_dir' => 'data/DoctrineORMModule/Proxy',
'proxy_dir' => $dataPath .'data/DoctrineORMModule/Proxy',
'proxy_namespace' => 'DoctrineORMModule\Proxy',
'filters' => array(),
'datetime_functions' => array(),
@ -95,7 +103,7 @@ return array(
'result_cache' => 'mycache',
'driver' => 'orm_cli', // This driver will be defined later
'generate_proxies' => true,
'proxy_dir' => 'data/DoctrineORMModule/Proxy',
'proxy_dir' => $dataPath . 'data/DoctrineORMModule/Proxy',
'proxy_namespace' => 'DoctrineORMModule\Proxy',
'filters' => array(),
'datetime_functions' => array(),

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
deliveries/cases/DE/6.docx Normal file

Binary file not shown.

BIN
deliveries/cases/DE/7.docx Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
deliveries/cases/EN/6.docx Normal file

Binary file not shown.

BIN
deliveries/cases/EN/7.docx Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
deliveries/cases/FR/6.docx Normal file

Binary file not shown.

BIN
deliveries/cases/FR/7.docx Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
deliveries/cases/NE/6.docx Normal file

Binary file not shown.

BIN
deliveries/cases/NE/7.docx Normal file

Binary file not shown.

View File

@ -1,7 +1,7 @@
{
"name": "MONARC",
"version": "2.9.4",
"description": "Monarc back office",
"name": "MONARC Back Office",
"version": "2.12.6",
"description": "MONARC Back Office",
"private": true,
"repository": {
"type": "git",
@ -10,11 +10,11 @@
"author": "CASES",
"license": "GNU Affero General Public License version 3",
"dependencies": {
"ng_anr": "git+https://github.com/monarc-project/ng-anr.git#master",
"ng_backoffice": "git+https://github.com/monarc-project/ng-backoffice.git#master"
"ng_anr": "git+https://github.com/monarc-project/ng-anr.git",
"ng_backoffice": "git+https://github.com/monarc-project/ng-backoffice.git"
},
"devDependencies": {
"grunt": "~1.0.3",
"grunt-cli": "~1.3.2"
"grunt": "~1.5.3",
"grunt-cli": "~1.4.3"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

View File

@ -1,6 +1,6 @@
<?php
use Zend\Mvc\Application;
use Laminas\Mvc\Application;
chdir(dirname(__DIR__));
@ -28,7 +28,7 @@ if (! class_exists(Application::class)) {
$appConfig = require 'config/application.config.php';
if (file_exists('config/development.config.php')) {
$appConfig = Zend\Stdlib\ArrayUtils::merge($appConfig, include 'config/development.config.php');
$appConfig = Laminas\Stdlib\ArrayUtils::merge($appConfig, include 'config/development.config.php');
}
Application::init($appConfig)->run();

51
scripts/check_composer.sh Executable file
View File

@ -0,0 +1,51 @@
#! /usr/bin/env bash
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color
vercomp () {
if [[ $1 == $2 ]]
then
return 1
fi
local IFS=.
local i ver1=($1) ver2=($2)
# fill empty fields in ver1 with zeros
for ((i=${#ver1[@]}; i<${#ver2[@]}; i++))
do
ver1[i]=0
done
for ((i=0; i<${#ver1[@]}; i++))
do
if [[ -z ${ver2[i]} ]]
then
# fill empty fields in ver2 with zeros
ver2[i]=0
fi
if ((10#${ver1[i]} > 10#${ver2[i]}))
then
return 1
fi
done
return 0
}
composer_version_string=`composer --version`
composer_version=`echo $composer_version_string | awk 'BEGIN { FS="[ ]" } ; { print $3 }'`
if [[ $(vercomp $composer_version 1.9.0 ; echo $?) -eq 0 ]]; then
echo -e "${RED}Please update your version of composer.${NC} The minimum requirements is 1.9.0."
echo -e "The minimum requirement is 1.9.0. You can use the following to update your composer installation:"
cat << EOF
$ php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
$ php -r "if (hash_file('sha384', 'composer-setup.php') === 'e0012edf3e80b6978849f5eff0d4b4e4c79ff1609dd1e613307e16318854d24ae64f26d17af3ef0bf7cfb710ca74755a') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
$ php composer-setup.php --install-dir=/tmp --filename=composer
$ mv /tmp/composer /usr/local/bin/composer
EOF
exit 1
fi

View File

@ -40,11 +40,11 @@ fi
# Link modules resources. TODO: Replace with Grunt tasks to minify the JS and CSS.
cd public/views/ && find ../../node_modules/ng_backoffice/views -maxdepth 1 -name "*.html" -exec ln -s {} \; 2>/dev/null
cd dialogs/ && find ../../../node_modules/ng_backoffice/views/dialogs -maxdepth 1 -name "*.html" -exec ln -s {} \; 2>/dev/null
cd ../partials/ && find ../../../node_modules/ng_backoffice/views/partials -maxdepth 1 -name "*.html" -exec ln -s {} \; 2>/dev/null
#cd ../partials/ && find ../../../node_modules/ng_backoffice/views/partials -maxdepth 1 -name "*.html" -exec ln -s {} \; 2>/dev/null
cd ../../js/ && find ../../node_modules/ng_backoffice/src -maxdepth 1 -name "*" -exec ln -s {} \; 2>/dev/null
cd ../css/ && find ../../node_modules/ng_backoffice/css -name "*" -exec ln -s {} \; 2>/dev/null
cd ../img/ && find ../../node_modules/ng_backoffice/img -name "*" -exec ln -s {} \; 2>/dev/null
cd ../flags/ && find ../../node_modules/ng_backoffice/node_modules/ng-country-flags/dist/flags -mindepth 1 -type d -exec ln -s {} \; 2>/dev/null
cd ../flags/ && find ../../node_modules/ng_backoffice/node_modules/flag-icons/flags -mindepth 1 -type d -exec ln -s {} \; 2>/dev/null
cd ../js/
mkdir -p anr

View File

@ -26,6 +26,17 @@ do
esac
done
checkout_to_latest_tag() {
if [ -d $1 ]; then
pushd $1
git fetch --tags
tag=$(git describe --tags `git rev-list --tags --max-count=1`)
git checkout $tag -b $tag
git pull origin $tag
popd
fi
}
pull_if_exists() {
if [ -d $1 ]; then
pushd $1
@ -52,29 +63,32 @@ if [ $? != 0 ]; then
exit 1
fi
composer install -o
./scripts/check_composer.sh
if [[ $? -eq 1 ]]; then
exit 1
fi
composer install -o --no-dev --ignore-platform-req=php
pathCore="module/Monarc/Core"
pathBO="module/Monarc/BackOffice"
if [[ -d node_modules && -d node_modules/ng_anr ]]; then
if [[ -d node_modules/ng_anr/.git ]]; then
pull_if_exists node_modules/ng_backoffice
pull_if_exists node_modules/ng_anr
else
npm update
fi
else
npm install
fi
if [[ $bypass -eq 0 ]]; then
migrate_module $pathCore
migrate_module $pathBO
fi
if [[ -d node_modules && -d node_modules/ng_anr ]]; then
if [[ -d node_modules/ng_anr/.git ]]; then
checkout_to_latest_tag node_modules/ng_backoffice
checkout_to_latest_tag node_modules/ng_anr
else
npm update
fi
fi
cd node_modules/ng_backoffice
npm install
npm ci
cd ../..
./scripts/link_modules_resources.sh

View File

@ -0,0 +1,10 @@
#!/bin/bash
pushd node_modules/ng_backoffice
if [[ -d po && -f po/template.pot ]]; then
for f in po/*.po; do
msgmerge --backup=none -U "$f" po/template.pot
msgattrib --no-obsolete --clear-fuzzy --empty -o "$f" "$f"
done;
fi

13
vagrant/Vagrantfile vendored
View File

@ -10,8 +10,9 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "ubuntu/bionic64"
config.vm.provision :shell, path: "bootstrap.sh"
config.vm.box = "bento/ubuntu-22.04"
config.disksize.size = "100GB"
config.vm.provision "shell", privileged: false, path: "bootstrap.sh"
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
@ -21,7 +22,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
config.vm.network "forwarded_port", guest: 80, host: 5000
config.vm.network :forwarded_port, guest: 80, host: 5000
config.vm.network :forwarded_port, guest: 3306, host: 3309
# Create a private network, which allows host-only access to the machine
@ -41,8 +42,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
config.vm.synced_folder "..", "/home/ubuntu/monarc",
owner: "www-data", group: "www-data", disabled: false
config.vm.synced_folder "..", "/home/vagrant/monarc",
owner: "vagrant", group: "vagrant", disabled: false, mount_options: ["dmode=777", "fmode=775"]
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
@ -54,7 +55,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
#
# # Use VBoxManage to customize the VM. For example to change memory:
vb.customize ["modifyvm", :id, "--memory", "2048"]
vb.customize ["modifyvm", :id, "--name", "MONARC BO - Ubuntu 18.04 - DEV"]
vb.customize ["modifyvm", :id, "--name", "MONARC BO - Ubuntu 22.04 - DEV"]
end
#
# View the documentation for the provider you're using for more

View File

@ -1,6 +1,10 @@
#! /usr/bin/env bash
PATH_TO_MONARC='/home/ubuntu/monarc'
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color
PATH_TO_MONARC='/home/vagrant/monarc'
APPENV='local'
ENVIRONMENT='development'
@ -18,37 +22,38 @@ post_max_size=50M
max_execution_time=100
max_input_time=223
memory_limit=512M
PHP_INI=/etc/php/7.2/apache2/php.ini
X_DEBUG_CFG=/etc/php/7.2/apache2/conf.d/20-xdebug.ini
PHP_INI=/etc/php/8.1/apache2/php.ini
XDEBUG_CFG=/etc/php/8.1/apache2/conf.d/20-xdebug.ini
MARIA_DB_CFG=/etc/mysql/mariadb.conf.d/50-server.cnf
export DEBIAN_FRONTEND=noninteractive
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
dpkg-reconfigure locales
sudo -E locale-gen en_US.UTF-8
sudo -E dpkg-reconfigure locales
echo -e "\n--- Installing now… ---\n"
echo -e "\n--- Updating packages list ---\n"
apt-get update && apt-get -y upgrade
sudo apt-get update && sudo apt-get upgrade -y
echo -e "\n--- Install base packages… ---\n"
apt-get -y install vim zip unzip git gettext > /dev/null
sudo apt-get -y install vim zip unzip git gettext curl gsfonts > /dev/null
echo -e "\n--- Install MariaDB specific packages and settings… ---\n"
apt-get -y install mariadb-server mariadb-client > /dev/null
sudo apt-get -y install mariadb-server mariadb-client > /dev/null
# Secure the MariaDB installation (especially by setting a strong root password)
systemctl restart mariadb.service > /dev/null
sudo systemctl restart mariadb.service > /dev/null
sleep 5
apt-get -y install expect > /dev/null
## do we need to spawn mysql_secure_install with sudo in future?
sudo apt-get -y install expect > /dev/null
expect -f - <<-EOF
set timeout 10
spawn mysql_secure_installation
spawn sudo mysql_secure_installation
expect "Enter current password for root (enter for none):"
send -- "\r"
expect "Set root password?"
@ -67,45 +72,51 @@ expect -f - <<-EOF
send -- "y\r"
expect eof
EOF
sudo apt-get purge -y expect php-xdebug > /dev/null 2>&1
sudo apt-get purge -y expect > /dev/null 2>&1
echo -e "\n--- Configuring… ---\n"
sed -i "s/skip-external-locking/#skip-external-locking/g" $MARIA_DB_CFG
sed -i "s/.*bind-address.*/bind-address = 0.0.0.0/" $MARIA_DB_CFG
sudo sed -i "s/skip-external-locking/#skip-external-locking/g" $MARIA_DB_CFG
sudo sed -i "s/.*bind-address.*/bind-address = 0.0.0.0/" $MARIA_DB_CFG
sudo sed -i "s/.*character-set-server.*/character-set-server = utf8mb4/" $MARIA_DB_CFG
sudo sed -i "s/.*collation-server.*/collation-server = utf8mb4_general_ci/" $MARIA_DB_CFG
echo -e "\n--- Setting up our MariaDB user for MONARC… ---\n"
mysql -u root -p$DBPASSWORD_ADMIN -e "CREATE USER '$DBUSER_MONARC'@'%' IDENTIFIED BY '$DBPASSWORD_MONARC';"
mysql -u root -p$DBPASSWORD_ADMIN -e "GRANT ALL PRIVILEGES ON * . * TO '$DBUSER_MONARC'@'%';"
mysql -u root -p$DBPASSWORD_ADMIN -e "FLUSH PRIVILEGES;"
systemctl restart mariadb.service > /dev/null
sudo mysql -u root -p$DBPASSWORD_ADMIN -e "CREATE USER '$DBUSER_MONARC'@'%' IDENTIFIED BY '$DBPASSWORD_MONARC';"
sudo mysql -u root -p$DBPASSWORD_ADMIN -e "GRANT ALL PRIVILEGES ON * . * TO '$DBUSER_MONARC'@'%';"
sudo mysql -u root -p$DBPASSWORD_ADMIN -e "FLUSH PRIVILEGES;"
sudo systemctl restart mariadb.service > /dev/null
echo -e "\n--- Installing Apache… ---\n"
sudo apt install apache2 -y
echo -e "\n--- Installing PHP-specific packages… ---\n"
apt-get -y install php apache2 libapache2-mod-php php-curl php-gd php-mysql php-pear php-apcu php-xml php-mbstring php-intl php-imagick php-zip php-xdebug > /dev/null
sudo apt-get install -y php8.1 php8.1-cli php8.1-common php8.1-mysql php8.1-zip php8.1-gd php8.1-mbstring php8.1-curl php8.1-xml php8.1-bcmath php8.1-intl php8.1-imagic php8.1-xdebug > /dev/null
echo -e "\n--- Configuring PHP… ---\n"
for key in upload_max_filesize post_max_size max_execution_time max_input_time memory_limit
do
sed -i "s/^\($key\).*/\1 = $(eval echo \${$key})/" $PHP_INI
sudo sed -i "s/^\($key\).*/\1 = $(eval echo \${$key})/" $PHP_INI
done
echo -e "\n--- Configuring Xdebug for development ---\n"
cat > $X_DEBUG_CFG <<EOF
sudo bash -c "cat << EOF > $XDEBUG_CFG
zend_extension=xdebug.so
xdebug.remote_enable=1
xdebug.remote_connect_back=1
xdebug.mode=debug
xdebug.discover_client_host=1
xdebug.idekey=IDEKEY
EOF
EOF"
echo -e "\n--- Enabling mod-rewrite and ssl… ---\n"
a2enmod rewrite > /dev/null
a2enmod ssl > /dev/null
sudo a2enmod rewrite > /dev/null 2>&1
sudo a2enmod ssl > /dev/null 2>&1
sudo a2enmod headers > /dev/null 2>&1
echo -e "\n--- Allowing Apache override to all ---\n"
sed -i "s/AllowOverride None/AllowOverride All/g" /etc/apache2/apache2.conf
sudo sed -i "s/AllowOverride None/AllowOverride All/g" /etc/apache2/apache2.conf
echo -e "\n--- Installing composer… ---\n"
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer > /dev/null
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo "\nERROR: unable to install composer\n"
exit 1;
@ -117,7 +128,7 @@ cd $PATH_TO_MONARC
git config core.fileMode false
echo -e "\n--- Retrieving MONARC libraries… ---\n"
composer install -o
composer ins
# Make modules symlinks.
@ -131,19 +142,25 @@ cd $PATH_TO_MONARC
mkdir -p $PATH_TO_MONARC/data/cache
mkdir -p $PATH_TO_MONARC/data/LazyServices/Proxy
mkdir -p $PATH_TO_MONARC/data/DoctrineORMModule/Proxy
chown -R www-data data
chmod -R 777 data
# Front-end
mkdir node_modules
echo -e "\n--- Installation of Node, NPM… ---\n"
curl -sL https://deb.nodesource.com/setup_15.x | sudo bash -
sudo apt-get install -y nodejs npm
mkdir -p node_modules
cd node_modules
git clone --config core.filemode=false https://github.com/monarc-project/ng-backoffice.git ng_backoffice > /dev/null
if [ ! -d "ng_backoffice" ]; then
git clone --config core.filemode=false https://github.com/monarc-project/ng-backoffice.git ng_backoffice > /dev/null
fi
if [ $? -ne 0 ]; then
echo "\nERROR: unable to clone the ng-backoffice repository\n"
exit 1;
fi
git clone --config core.filemode=false https://github.com/monarc-project/ng-anr.git ng_anr > /dev/null
if [ ! -d "ng_anr" ]; then
git clone --config core.filemode=false https://github.com/monarc-project/ng-anr.git ng_anr > /dev/null
fi
if [ $? -ne 0 ]; then
echo "\nERROR: unable to clone the ng-anr repository\n"
exit 1;
@ -151,13 +168,10 @@ fi
cd ..
chown -R www-data $PATH_TO_MONARC
chgrp -R www-data $PATH_TO_MONARC
chmod -R 700 $PATH_TO_MONARC
echo -e "\n--- Add a VirtualHost for MONARC ---\n"
cat > /etc/apache2/sites-enabled/000-default.conf <<EOF
sudo bash -c "cat << EOF > /etc/apache2/sites-enabled/000-default.conf
<VirtualHost *:80>
ServerName localhost
DocumentRoot $PATH_TO_MONARC/public
@ -176,58 +190,42 @@ cat > /etc/apache2/sites-enabled/000-default.conf <<EOF
SetEnv DB_USER $DBUSER
SetEnv DB_PASS $DBPASSWD
</VirtualHost>
EOF
EOF"
echo -e "\n--- Restarting Apache… ---\n"
systemctl restart apache2.service > /dev/null
sudo systemctl restart apache2.service > /dev/null
echo -e "\n--- Configuration of MONARC database connection ---\n"
cat > config/autoload/local.php <<EOF
<?php
return array(
'doctrine' => array(
'connection' => array(
'orm_default' => array(
'params' => array(
'doctrine' => [
'connection' => [
'orm_default' => [
'params' => [
'host' => '$DBHOST',
'user' => '$DBUSER_MONARC',
'password' => '$DBPASSWORD_MONARC',
'dbname' => '$DBNAME_COMMON',
),
),
'orm_cli' => array(
'params' => array(
],
],
'orm_cli' => [
'params' => [
'host' => '$DBHOST',
'user' => '$DBUSER_MONARC',
'password' => '$DBPASSWORD_MONARC',
'dbname' => '$DBNAME_MASTER',
),
),
),
),
],
],
],
],
/* Link with (ModuleCore)
config['languages'] = [
'fr' => array(
'index' => 1,
'label' => 'Français'
),
'en' => array(
'index' => 2,
'label' => 'English'
),
'de' => array(
'index' => 3,
'label' => 'Deutsch'
),
]
*/
'activeLanguages' => array('fr','en','de','nl'),
'activeLanguages' => ['fr','en','de','nl'],
'monarc' => array(
'ttl' => 60, // timeout
'salt' => '', // salt privé pour chiffrement pwd
),
'monarc' => [
'ttl' => 60,
'salt' => '',
],
);
EOF
@ -240,14 +238,15 @@ mysql -u $DBUSER_MONARC -p$DBPASSWORD_MONARC monarc_common < db-bootstrap/monarc
mysql -u $DBUSER_MONARC -p$DBPASSWORD_MONARC monarc_common < db-bootstrap/monarc_data.sql > /dev/null
echo -e "\n--- Installation of Grunt… ---\n"
curl -sL https://deb.nodesource.com/setup_13.x | sudo bash -
sudo apt-get install -y nodejs
sudo npm install -g grunt-cli
echo -e "\n--- Adjusting user mod… ---\n"
sudo usermod -aG www-data vagrant
sudo usermod -aG vagrant www-data
echo -e "\n--- Update the project… ---\n"
/bin/bash ./scripts/update-all.sh > /dev/null
sudo npm install -g grunt-cli
sudo npm install -g node-gyp
./scripts/update-all.sh -d
echo -e "\n--- Create initial user and client ---\n"
@ -255,8 +254,7 @@ php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/Monarc/BackOffice/mi
echo -e "\n--- Restarting Apache… ---\n"
systemctl restart apache2.service > /dev/null
sudo systemctl restart apache2.service > /dev/null
echo -e "\n--- MONARC is ready! Point your Web browser to http://127.0.0.1:5000 ---\n"