Fixed the scripts paths and removed the githuib libraries pulling as all the projects are on packagist.
parent
f9cc0f1ec1
commit
011fe9812a
|
@ -71,8 +71,8 @@ Backend
|
||||||
|
|
||||||
$ mkdir module
|
$ mkdir module
|
||||||
$ cd module/
|
$ cd module/
|
||||||
$ ln -s ./../vendor/monarc/core MonarcCore
|
$ ln -s ./../vendor/monarc/core Monarc\Core
|
||||||
$ ln -s ./../vendor/monarc/frontoffice MonarcFO
|
$ ln -s ./../vendor/monarc/frontoffice Monarc\FrontOffice
|
||||||
|
|
||||||
Frontend
|
Frontend
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ Update MONARC (including npm config for explicit proxy)
|
||||||
|
|
||||||
Create initial user
|
Create initial user
|
||||||
|
|
||||||
$ php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/MonarcFO/migrations/phinx.php
|
$ php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/Monarc/FrontOffice/migrations/phinx.php
|
||||||
|
|
||||||
# Configure apache (as root)
|
# Configure apache (as root)
|
||||||
|
|
||||||
|
|
|
@ -90,13 +90,13 @@ Create two symbolic links:
|
||||||
|
|
||||||
$ mkdir module
|
$ mkdir module
|
||||||
$ cd module/
|
$ cd module/
|
||||||
$ ln -s ./../vendor/monarc/core MonarcCore
|
$ ln -s ./../vendor/monarc/core Monarc/Core
|
||||||
$ ln -s ./../vendor/monarc/frontoffice MonarcFO
|
$ ln -s ./../vendor/monarc/frontoffice Monarc/FrontOffice
|
||||||
|
|
||||||
There are 2 parts:
|
There are 2 parts:
|
||||||
|
|
||||||
* MonarcFO is only for front office;
|
* Monarc\FrontOffice is only for front office;
|
||||||
* MonarcCore is common to the front office and to the back office.
|
* Monarc\Core is common to the front office and to the back office.
|
||||||
|
|
||||||
|
|
||||||
### Frontend
|
### Frontend
|
||||||
|
@ -188,7 +188,7 @@ execute the database migration scripts and compile the translations.
|
||||||
|
|
||||||
# Create initial user
|
# Create initial user
|
||||||
|
|
||||||
$ php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/MonarcFO/migrations/phinx.php
|
$ php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/Monarc/FrontOffice/migrations/phinx.php
|
||||||
|
|
||||||
|
|
||||||
The username is *admin@admin.test* and the password is *admin*.
|
The username is *admin@admin.test* and the password is *admin*.
|
||||||
|
|
|
@ -80,19 +80,19 @@ Clone the repository and invoke `composer` using the shipped `composer.phar`:
|
||||||
|
|
||||||
### Back-end
|
### Back-end
|
||||||
|
|
||||||
The back-end is using the Zend Framework.
|
The back-end is using the Zend Framework 3.
|
||||||
|
|
||||||
Create two symbolic links:
|
Create two symbolic links:
|
||||||
|
|
||||||
$ mkdir module
|
$ mkdir module
|
||||||
$ cd module/
|
$ cd module/
|
||||||
$ ln -s ./../vendor/monarc/core MonarcCore
|
$ ln -s ./../vendor/monarc/core Monarc/Core
|
||||||
$ ln -s ./../vendor/monarc/frontoffice MonarcFO
|
$ ln -s ./../vendor/monarc/frontoffice Monarc/FrontOffice
|
||||||
|
|
||||||
There are 2 parts:
|
There are 2 parts:
|
||||||
|
|
||||||
* MonarcFO is only for MONARC;
|
* Monarc\FrontOffice is only for MONARC;
|
||||||
* MonarcCore is common to MONARC and to the back office of MONARC.
|
* Monarc\Core is common to MONARC and to the back office of MONARC.
|
||||||
|
|
||||||
|
|
||||||
### Front-end
|
### Front-end
|
||||||
|
@ -175,7 +175,7 @@ then update MONARC:
|
||||||
|
|
||||||
# 4. Create initial user
|
# 4. Create initial user
|
||||||
|
|
||||||
$ php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/MonarcFO/migrations/phinx.php
|
$ php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/Monarc/FrontOffice/migrations/phinx.php
|
||||||
|
|
||||||
|
|
||||||
The username is *admin@admin.test* and the password is *admin*.
|
The username is *admin@admin.test* and the password is *admin*.
|
||||||
|
|
|
@ -17,20 +17,17 @@
|
||||||
"ext-pdo": "*",
|
"ext-pdo": "*",
|
||||||
"monarc/core": "dev-feature/upgrade-to-zf3",
|
"monarc/core": "dev-feature/upgrade-to-zf3",
|
||||||
"monarc/frontoffice": "dev-feature/upgrade-to-zf3",
|
"monarc/frontoffice": "dev-feature/upgrade-to-zf3",
|
||||||
"phpoffice/phpword": "dev-stable",
|
"monarc/phpword": "dev-master",
|
||||||
"zendframework/zend-component-installer": "^2.1",
|
"zendframework/zend-component-installer": "^2.1",
|
||||||
"zendframework/zend-mvc": "^3.1",
|
"zendframework/zend-mvc": "^3.1",
|
||||||
"zendframework/zend-di": "^3.1",
|
"zendframework/zend-di": "^3.1",
|
||||||
"zendframework/zend-permissions-rbac": "^3.0",
|
"zendframework/zend-permissions-rbac": "^3.0",
|
||||||
"zendframework/zend-log": "^2.11"
|
"zendframework/zend-log": "^2.11"
|
||||||
},
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"roave/security-advisories": "dev-master"
|
||||||
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"bin-dir": "bin/"
|
"bin-dir": "bin/"
|
||||||
},
|
|
||||||
"repositories": [
|
|
||||||
{
|
|
||||||
"type": "vcs",
|
|
||||||
"url": "https://github.com/monarc-project/monarc_phpword"
|
|
||||||
}
|
}
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,7 @@ if (!empty($appConfDir)) {
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'modules' => [
|
'modules' => [
|
||||||
|
'Zend\Mail',
|
||||||
'Zend\Log',
|
'Zend\Log',
|
||||||
'Monarc\Core',
|
'Monarc\Core',
|
||||||
'Monarc\FrontOffice',
|
'Monarc\FrontOffice',
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Monarc\Core\Service\Initializer\ObjectManagerInitializer;
|
|
||||||
use Zend\Mvc\Application;
|
use Zend\Mvc\Application;
|
||||||
|
|
||||||
chdir(dirname(__DIR__));
|
chdir(dirname(__DIR__));
|
||||||
|
@ -18,7 +17,7 @@ if(date_default_timezone_get() != ini_get('date.timezone')){
|
||||||
date_default_timezone_set('Europe/Luxembourg');
|
date_default_timezone_set('Europe/Luxembourg');
|
||||||
}
|
}
|
||||||
|
|
||||||
include 'vendor/autoload.php';
|
require 'vendor/autoload.php';
|
||||||
|
|
||||||
if (! class_exists(Application::class)) {
|
if (! class_exists(Application::class)) {
|
||||||
throw new RuntimeException(
|
throw new RuntimeException(
|
||||||
|
|
|
@ -10,9 +10,9 @@ checkout_if_exists() {
|
||||||
|
|
||||||
|
|
||||||
checkout_if_exists . $1
|
checkout_if_exists . $1
|
||||||
checkout_if_exists module/MonarcCore $1
|
checkout_if_exists module/Monarc/Core $1
|
||||||
checkout_if_exists module/MonarcBO $1
|
checkout_if_exists module/Monarc/BackOffice $1
|
||||||
checkout_if_exists module/MonarcFO $1
|
checkout_if_exists module/Monarc/FrontOffice $1
|
||||||
checkout_if_exists node_modules/ng_backoffice $1
|
checkout_if_exists node_modules/ng_backoffice $1
|
||||||
checkout_if_exists node_modules/ng_client $1
|
checkout_if_exists node_modules/ng_client $1
|
||||||
checkout_if_exists node_modules/ng_anr $1
|
checkout_if_exists node_modules/ng_anr $1
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Usage: ./scripts/client-upgrade-db.sh <module> <hostname> <user> <password> <db>
|
# Usage: ./scripts/client-upgrade-db.sh <module> <hostname> <user> <password> <db>
|
||||||
# Example: ./scripts/client-upgrade-db.sh MonarcBO localhost root derp monarc_backoffice
|
# Example: ./scripts/client-upgrade-db.sh Monarc/BackOffice localhost root derp monarc_backoffice
|
||||||
|
|
||||||
MODULE=$1
|
MODULE=$1
|
||||||
SQLHOST=$2
|
SQLHOST=$2
|
||||||
|
@ -11,20 +11,20 @@ SQLBASE=$5
|
||||||
|
|
||||||
path=""
|
path=""
|
||||||
case $MODULE in
|
case $MODULE in
|
||||||
"MonarcCore"|"core")
|
"Monarc/Core"|"core")
|
||||||
path="module/MonarcCore"
|
path="module/Monarc/Core"
|
||||||
if [ ! -d $path ]; then
|
if [ ! -d $path ]; then
|
||||||
path="vendor/monarc/core"
|
path="vendor/monarc/core"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"MonarcFO"|"frontoffice")
|
"Monarc/FrontOffice"|"frontoffice")
|
||||||
path="module/MonarcFO"
|
path="module/Monarc/FrontOffice"
|
||||||
if [ ! -d $path ]; then
|
if [ ! -d $path ]; then
|
||||||
path="vendor/monarc/frontoffice"
|
path="vendor/monarc/frontoffice"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"MonarcBO"|"backoffice")
|
"Monarc/BackOffice"|"backoffice")
|
||||||
path="module/MonarcBO"
|
path="module/Monarc/BackOffice"
|
||||||
if [ ! -d $path ]; then
|
if [ ! -d $path ]; then
|
||||||
path="vendor/monarc/backoffice"
|
path="vendor/monarc/backoffice"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ -d module/MonarcCore ]; then
|
if [ -d module/Monarc/Core ]; then
|
||||||
php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/MonarcCore/migrations/phinx.php
|
php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/Monarc/Core/migrations/phinx.php
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d module/MonarcBO ]; then
|
if [ -d module/Monarc/BackOffice ]; then
|
||||||
php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/MonarcBO/migrations/phinx.php
|
php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/Monarc/BackOffice/migrations/phinx.php
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d module/MonarcFO ]; then
|
if [ -d module/Monarc/FrontOffice ]; then
|
||||||
php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/MonarcFO/migrations/phinx.php
|
php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/Monarc/FrontOffice/migrations/phinx.php
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -89,19 +89,19 @@ fi
|
||||||
|
|
||||||
|
|
||||||
currentPath=`pwd`
|
currentPath=`pwd`
|
||||||
pathCore="module/MonarcCore"
|
pathCore="module/Monarc/Core"
|
||||||
if [ -d $pathCore ]; then
|
if [ -d $pathCore ]; then
|
||||||
pull_if_exists $pathCore
|
pull_if_exists $pathCore
|
||||||
else
|
else
|
||||||
pathCore="vendor/monarc/core"
|
pathCore="vendor/monarc/core"
|
||||||
fi
|
fi
|
||||||
pathBO="module/MonarcBO"
|
pathBO="module/Monarc/BackOffice"
|
||||||
if [ -d $pathBO ]; then
|
if [ -d $pathBO ]; then
|
||||||
pull_if_exists $pathBO
|
pull_if_exists $pathBO
|
||||||
else
|
else
|
||||||
pathBO="vendor/monarc/backoffice"
|
pathBO="vendor/monarc/backoffice"
|
||||||
fi
|
fi
|
||||||
pathFO="module/MonarcFO"
|
pathFO="module/Monarc/FrontOffice"
|
||||||
if [ -d $pathFO ]; then
|
if [ -d $pathFO ]; then
|
||||||
pull_if_exists $pathFO
|
pull_if_exists $pathFO
|
||||||
else
|
else
|
||||||
|
@ -153,7 +153,7 @@ fi
|
||||||
|
|
||||||
if [[ $forceClearCache -eq 1 ]]; then
|
if [[ $forceClearCache -eq 1 ]]; then
|
||||||
# Clear doctrine cache
|
# Clear doctrine cache
|
||||||
# Move to MonarcCore Module.php
|
# Move to Monarc/Core Module.php
|
||||||
$phpcommand ./public/index.php orm:clear-cache:metadata
|
$phpcommand ./public/index.php orm:clear-cache:metadata
|
||||||
$phpcommand ./public/index.php orm:clear-cache:query
|
$phpcommand ./public/index.php orm:clear-cache:query
|
||||||
$phpcommand ./public/index.php orm:clear-cache:result
|
$phpcommand ./public/index.php orm:clear-cache:result
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
php ./vendor/robmorgan/phinx/bin/phinx migrate -c ./module/MonarcCore/migrations/phinx.php
|
php ./vendor/robmorgan/phinx/bin/phinx migrate -c ./module/Monarc/Core/migrations/phinx.php
|
||||||
|
|
||||||
if [ -d module/MonarcBO ]; then
|
if [ -d module/Monarc/BackOffice ]; then
|
||||||
php ./vendor/robmorgan/phinx/bin/phinx migrate -c ./module/MonarcBO/migrations/phinx.php
|
php ./vendor/robmorgan/phinx/bin/phinx migrate -c ./module/Monarc/BackOffice/migrations/phinx.php
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d module/MonarcFO ]; then
|
if [ -d module/Monarc/FrontOffice ]; then
|
||||||
php ./vendor/robmorgan/phinx/bin/phinx migrate -c ./module/MonarcFO/migrations/phinx.php
|
php ./vendor/robmorgan/phinx/bin/phinx migrate -c ./module/Monarc/FrontOffice/migrations/phinx.php
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -11,9 +11,9 @@ oldurl_if_exists() {
|
||||||
|
|
||||||
|
|
||||||
oldurl_if_exists . $1
|
oldurl_if_exists . $1
|
||||||
oldurl_if_exists module/MonarcCore $1
|
oldurl_if_exists module/Monarc/Core $1
|
||||||
oldurl_if_exists module/MonarcBO $1
|
oldurl_if_exists module/Monarc/BackOffice $1
|
||||||
oldurl_if_exists module/MonarcFO $1
|
oldurl_if_exists module/Monarc/FrontOffice $1
|
||||||
oldurl_if_exists node_modules/ng_backoffice $1
|
oldurl_if_exists node_modules/ng_backoffice $1
|
||||||
oldurl_if_exists node_modules/ng_client $1
|
oldurl_if_exists node_modules/ng_client $1
|
||||||
oldurl_if_exists node_modules/ng_anr $1
|
oldurl_if_exists node_modules/ng_anr $1
|
||||||
|
|
|
@ -26,7 +26,6 @@ MONARC will be automatically deployed in an Ubuntu Bionic Server.
|
||||||
|
|
||||||
$ git clone https://github.com/monarc-project/MonarcAppFO
|
$ git clone https://github.com/monarc-project/MonarcAppFO
|
||||||
$ cd MonarcAppFO/vagrant
|
$ cd MonarcAppFO/vagrant
|
||||||
$ export GITHUB_AUTH_TOKEN=<your-github-auth-token>
|
|
||||||
$ vagrant up
|
$ vagrant up
|
||||||
|
|
||||||
Once the VM will be configured by Vagrant, go to the address
|
Once the VM will be configured by Vagrant, go to the address
|
||||||
|
|
|
@ -11,7 +11,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
|
|
||||||
# Every Vagrant virtual environment requires a box to build off of.
|
# Every Vagrant virtual environment requires a box to build off of.
|
||||||
config.vm.box = "ubuntu/bionic64"
|
config.vm.box = "ubuntu/bionic64"
|
||||||
config.vm.provision :shell, path: "bootstrap.sh", args: "#{ENV['GITHUB_AUTH_TOKEN']}"
|
config.vm.provision :shell, path: "bootstrap.sh"
|
||||||
|
|
||||||
# Disable automatic box update checking. If you disable this, then
|
# Disable automatic box update checking. If you disable this, then
|
||||||
# boxes will only be checked for updates when the user runs
|
# boxes will only be checked for updates when the user runs
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
#! /usr/bin/env bash
|
#! /usr/bin/env bash
|
||||||
|
|
||||||
# Variables
|
|
||||||
GITHUB_AUTH_TOKEN=$1
|
|
||||||
|
|
||||||
TAG=''
|
TAG=''
|
||||||
|
|
||||||
PATH_TO_MONARC='/home/ubuntu/monarc'
|
PATH_TO_MONARC='/home/ubuntu/monarc'
|
||||||
|
@ -143,7 +140,6 @@ fi
|
||||||
|
|
||||||
echo -e "\n--- Retrieving MONARC libraries… ---\n"
|
echo -e "\n--- Retrieving MONARC libraries… ---\n"
|
||||||
# TODO: Can be removed when we move to packagis.
|
# TODO: Can be removed when we move to packagis.
|
||||||
composer config -g github-oauth.github.com $GITHUB_AUTH_TOKEN
|
|
||||||
composer install -o
|
composer install -o
|
||||||
|
|
||||||
# Back-end
|
# Back-end
|
||||||
|
@ -306,7 +302,7 @@ echo -e "\n--- Update the project… ---\n"
|
||||||
|
|
||||||
|
|
||||||
echo -e "\n--- Create initial user and client ---\n"
|
echo -e "\n--- Create initial user and client ---\n"
|
||||||
php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/MonarcFO/migrations/phinx.php
|
php ./bin/phinx seed:run -c ./module/Monarc/FrontOffice/migrations/phinx.php
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue