Compare commits
16 Commits
Author | SHA1 | Date |
---|---|---|
Ruslan Baidan | 8f005da738 | |
Ruslan Baidan | 497ab325f3 | |
Ruslan Baidan | 3d99019bfc | |
Ruslan Baidan | 5d92aa8aa5 | |
Ruslan Baidan | 2aa121d41b | |
Ruslan Baidan | 561e6793e1 | |
Ruslan Baidan | 4aacfe4ccf | |
Ruslan Baidan | 93b847191e | |
Ruslan Baidan | 862879066b | |
Ruslan Baidan | 29a78ddfd0 | |
Ruslan Baidan | 368c9b7c60 | |
Ruslan Baidan | 11364f3b3f | |
Ruslan Baidan | 2fcd92e05d | |
Ruslan Baidan | 03e6d47f78 | |
Ruslan Baidan | 1e307691bb | |
Ruslan Baidan | b7eb17f06b |
|
@ -14,7 +14,7 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
node-version: [ "16.x" ]
|
||||
php-version: [ "7.4" ]
|
||||
php-version: [ "8.1" ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -34,7 +34,7 @@ jobs:
|
|||
run: composer validate
|
||||
|
||||
- name: Install PHP dependencies
|
||||
run: composer install --prefer-dist --no-progress --no-suggest --no-dev
|
||||
run: composer ins --prefer-dist --no-progress --no-suggest --no-dev --ignore-platform-req=php
|
||||
|
||||
- name: Symlink Monarc modules
|
||||
run: |
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"major":2, "minor":12, "hotfix":4}
|
||||
{"major":2, "minor":12, "hotfix":6}
|
||||
|
|
|
@ -40,11 +40,11 @@
|
|||
}
|
||||
],
|
||||
"require": {
|
||||
"php": "^7.4",
|
||||
"php": "^7.4 || ^8.0",
|
||||
"ext-json": "*",
|
||||
"ext-pdo": "*",
|
||||
"monarc/backoffice": "^2.9.7",
|
||||
"monarc/core": "^2.9.15",
|
||||
"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",
|
||||
|
@ -54,7 +54,7 @@
|
|||
"endroid/qr-code": "^4.4"
|
||||
},
|
||||
"require-dev": {
|
||||
"roave/security-advisories": "dev-master"
|
||||
"roave/security-advisories": "dev-latest"
|
||||
},
|
||||
"config": {
|
||||
"bin-dir": "bin/",
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -6,19 +6,26 @@
|
|||
* @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(
|
||||
|
|
|
@ -15,56 +15,56 @@ 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(
|
||||
'entitymanager' => [
|
||||
'orm_default' => [
|
||||
'connection' => 'orm_default',
|
||||
'configuration' => 'orm_default'
|
||||
),
|
||||
'orm_cli' => array(
|
||||
'configuration' => 'orm_default',
|
||||
],
|
||||
'orm_cli' => [
|
||||
'connection' => 'orm_cli',
|
||||
'configuration' => 'orm_cli',
|
||||
),
|
||||
),
|
||||
'configuration' => array(
|
||||
'orm_default' => array(
|
||||
],
|
||||
],
|
||||
'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_dir' => $dataPath . '/DoctrineORMModule/Proxy',
|
||||
'proxy_namespace' => 'DoctrineORMModule\Proxy',
|
||||
'filters' => array(),
|
||||
'datetime_functions' => array(),
|
||||
'string_functions' => array(),
|
||||
'numeric_functions' => array(),
|
||||
'second_level_cache' => array(),
|
||||
'filters' => [],
|
||||
'datetime_functions' => [],
|
||||
'string_functions' => [],
|
||||
'numeric_functions' => [],
|
||||
'second_level_cache' => [],
|
||||
'sql_logger' => 'doctrine.monarc_logger',
|
||||
),
|
||||
'orm_cli' => array(
|
||||
],
|
||||
'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_dir' => $dataPath . '/DoctrineORMModule/Proxy',
|
||||
'proxy_namespace' => 'DoctrineORMModule\Proxy',
|
||||
'filters' => array(),
|
||||
'datetime_functions' => array(),
|
||||
'string_functions' => array(),
|
||||
'numeric_functions' => array(),
|
||||
'second_level_cache' => array(),
|
||||
'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
|
||||
);
|
||||
];
|
||||
|
|
|
@ -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(
|
||||
|
@ -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(),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "MONARC Back Office",
|
||||
"version": "2.12.4",
|
||||
"version": "2.12.6",
|
||||
"description": "MONARC Back Office",
|
||||
"private": true,
|
||||
"repository": {
|
||||
|
|
|
@ -68,7 +68,7 @@ if [[ $? -eq 1 ]]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
composer install -o --no-dev
|
||||
composer install -o --no-dev --ignore-platform-req=php
|
||||
|
||||
pathCore="module/Monarc/Core"
|
||||
pathBO="module/Monarc/BackOffice"
|
||||
|
|
|
@ -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
|
|
@ -10,8 +10,8 @@ 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 = "bento/ubuntu-20.04"
|
||||
config.disksize.size = "50GB"
|
||||
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
|
||||
|
@ -55,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 20.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
|
||||
|
|
|
@ -23,8 +23,8 @@ max_execution_time=100
|
|||
max_input_time=223
|
||||
memory_limit=512M
|
||||
|
||||
PHP_INI=/etc/php/7.4/apache2/php.ini
|
||||
XDEBUG_CFG=/etc/php/7.4/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
|
||||
|
@ -46,6 +46,7 @@ sudo apt-get -y install vim zip unzip git gettext curl gsfonts > /dev/null
|
|||
|
||||
echo -e "\n--- Install MariaDB specific packages and settings… ---\n"
|
||||
sudo apt-get -y install mariadb-server mariadb-client > /dev/null
|
||||
|
||||
# Secure the MariaDB installation (especially by setting a strong root password)
|
||||
sudo systemctl restart mariadb.service > /dev/null
|
||||
sleep 5
|
||||
|
@ -71,10 +72,13 @@ 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"
|
||||
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"
|
||||
sudo mysql -u root -p$DBPASSWORD_ADMIN -e "CREATE USER '$DBUSER_MONARC'@'%' IDENTIFIED BY '$DBPASSWORD_MONARC';"
|
||||
|
@ -82,8 +86,11 @@ sudo mysql -u root -p$DBPASSWORD_ADMIN -e "GRANT ALL PRIVILEGES ON * . * TO '$DB
|
|||
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"
|
||||
sudo 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
|
||||
|
@ -92,10 +99,10 @@ do
|
|||
done
|
||||
|
||||
echo -e "\n--- Configuring Xdebug for development ---\n"
|
||||
sudo bash -c cat "<< EOF > $XDEBUG_CFG
|
||||
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"
|
||||
|
||||
|
@ -138,6 +145,10 @@ mkdir -p $PATH_TO_MONARC/data/DoctrineORMModule/Proxy
|
|||
|
||||
|
||||
# Front-end
|
||||
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
|
||||
if [ ! -d "ng_backoffice" ]; then
|
||||
|
@ -227,11 +238,6 @@ 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 Node, NPM… ---\n"
|
||||
curl -sL https://deb.nodesource.com/setup_15.x | sudo bash -
|
||||
sudo apt-get install -y nodejs
|
||||
|
||||
|
||||
echo -e "\n--- Adjusting user mod… ---\n"
|
||||
sudo usermod -aG www-data vagrant
|
||||
sudo usermod -aG vagrant www-data
|
||||
|
|
Loading…
Reference in New Issue