Commit fcd9455d authored by Julie gauthier's avatar Julie gauthier

Merge branch '431-uprgade-documentation-install' into 'develop'

Resolve "Uprgade Documentation install"

Closes #431

See merge request !120
parents 2bad6c2a a7aab341
Pipeline #1300 passed with stages
in 87 minutes and 54 seconds
......@@ -17,7 +17,10 @@ apt-get install \
libapache2-mod-php \
postgresql \
php-pgsql \
php7.0-sqlite3
php7.0-sqlite3 \
php7.0-xml \
php7.0-mbstring
```
## Prerequisites: PHP > timezone + max_upload
......@@ -143,7 +146,7 @@ As any user, do:
as user `root` postgresql, do :
```
```postgresql
CREATE DATABASE debug_kit WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'fr_FR.UTF-8' LC_CTYPE = 'fr_FR.UTF-8';
ALTER DATABASE debug_kit OWNER TO comptoir;
```
......@@ -182,6 +185,13 @@ sudo groupadd comptoir
sudo usermod -aG comptoir superdupont
sudo chown -R www-data:comptoir /home/comptoir/Comptoir-srv/webroot/img/files
```
Test it:
```shell
grep -E "^comptoir:" /etc/group
```
Comptoir's group must contain 2 users : comptoir, superdupont.
## POSTGRESQL sanitize content
......@@ -198,13 +208,6 @@ cd /home/comptoir/Comptoir-srv/
/usr/local/bin/composer install
```
## Load Debug kit for Comptoir **SRV**
As user `superdupont`, do:
```shell
bin/cake plugin load DebugKit
```
## APP.PHP Configure logs for CRUD actions
......@@ -264,13 +267,27 @@ Replace `my-password` with suitable value.
Adjust Postgres credentials in `config/app.php`, search for 'Datasources'
and 'default'. Now adjust:
* host
* port
* username
* password
* database
```php
'default' => [
'className' => 'Cake\Database\Connection',
'driver' => 'Cake\Database\Driver\Postgres',
'persistent' => false,
'host' => 'localhost',
//'port' => 'non_standard_port_number',
'username' => 'comptoir',
'password' => 'comptoir',
'database' => 'comptoir',
'encoding' => 'utf8',
'timezone' => 'Europe/Paris',
'cacheMetadata' => true,
'log' => false,
```
/!\ You should comment the 'test' section of Datasources.
## APP.PHP Configure debug-kit database credentials
* Datasource for debug-kit
After the 'test' commented, add datasource for debug-kit
```php
'debug_kit' => [
......@@ -281,8 +298,8 @@ and 'default'. Now adjust:
'username' => 'comptoir',
'password' => 'comptoir',
'database' => 'debug_kit',
'encoding' => 'Europe/Paris',
'timezone' => 'UTC',
'encoding' => 'utf8',
'timezone' => 'Europe/Paris',
'cacheMetadata' => true,
'quoteIdentifiers' => false,
],
......@@ -293,18 +310,29 @@ and 'default'. Now adjust:
Copy default parameters of `comptoir.default.php` into `comptoir.php`
```shell
cp config/comptoir.default.php config/comptoir.default.php
cd /home/comptoir/Comptoir-srv
cp config/comptoir.default.php config/comptoir.php
```
### Categories.PickOfTheMonth
The array `Categories => PickOfTheMonth` contain the four ids of softwares you want see in the section `Pick of the month` on the home page.
In `comptoir.php`, the array `Categories => PickOfTheMonth` contain the four ids of softwares you want see in the section `Pick of the month` on the home page.
Default ids [ 27, // Authentik
49, // Maarch Courrier
9, // Asqatasun
23 // OpenADS ]
## Load Debug kit for Comptoir **SRV**
As user `superdupont`, do:
```shell
bin/cake plugin load DebugKit
```
## Set UNIX permissions
As user `root` do:
......@@ -325,10 +353,10 @@ done
## APACHE Vhost preparation
As `root`, edit `/etc/hosts` and add `comptoir-srv.local` next to the "localhost" entry:
As `root`, do:
```
127.0.0.1 localhost my-computer-name comptoir-srv.local
echo "127.0.0.1 comptoir-srv.local" >> /etc/hosts
```
## APACHE Vhost creation "comptoir-srv"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment