diff --git a/README.md b/README.md index 57feae92b1a2b4202bf6819fb359782a30132b28..8a19241c8a1fe93f15f2263b8222e568a9a86a4a 100755 --- a/README.md +++ b/README.md @@ -1 +1,113 @@ # EduGAIN Attribute Release Check + +## Application description + +## Application deployment + +### Application requirements for web interface deployment + +1. Web server Apache / nginx +2. PHP 7.4+ +3. Database manager mysql / mariadb +4. Composer + +### Application's environment setup example + +1. nginx setup example +- example of nginx configuration for application +``` +server { + listen 80; + server_name earc.edugain.org; + + access_log /var/log/nginx/access.log main; + error_log /var/log/nginx/error.log warn; + root /var/www/earc/public; #EARC application root /var/www/earc + + index index.php; + + location / { + try_files $uri $uri/ /index.php?$query_string; + } + + location ~ \.php$ + { + fastcgi_pass 127.0.0.1:9000; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + } +} +``` +- check nginx configuration for errors +``` +sudo nginx -t +``` +- reload nginx configuration without restart +``` +sudo nginx -s reload +``` + +2. Web application require following PHP extensions +``` +- bcmath +- ctype +- fileinfo +- json +- mbstring +- openssl +- pdo +- tokenizer +- xml +``` +- check installed PHP extestions using: +``` +php -m +``` +- install missing extensions + +3. Setup DB for application +- add DB using +``` +CREATE DATABASE earc; +``` +- add DB user and grants. Grant all rights and FILE operations +``` +CREATE USER 'travellist_user'@'%' IDENTIFIED WITH mysql_native_password BY 'password'; +GRANT ALL ON earc.* TO 'earc_user'@'localhost'; +GRANT FILE ON earc.* TO 'earc_user'@'localhost'; +``` + +### Application setup + +0. clone application to /var/www/earc +1. install vendor +- from application root run +``` +composer install +``` +2. create and populate application's .env file +- from application root run +``` +cp .env.example .env +php artisan key:generate +``` +- clear cached configuration +``` +php artisan config:cache +``` +3. populate basic configuration for simpleSAMLphp +- from application root run +``` +cp vendor/simplesamlphp/simplesamlphp/config-templates/config.php vendor/simplesamlphp/simplesamlphp/config/config.php +``` +4. simplesaml sp-remote-metadata : !!!to do automatically +currently found here : technical-test>edugain.org /var/www/earc-deployed/releases/1541529858 + +5. configure and populate database +- update database configuration file by addind username, password and database: config/database.php +- populate database using prepared migration. From application root run: +``` +php artisan migrate +``` + +6. check application \ No newline at end of file diff --git a/composer.json b/composer.json index fd2a5645e862f23fedba1a2b6d03ccf24a408434..f09e7be04d3d2199a8f21186d31b2a1e7bff2149 100755 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "license": "MIT", "type": "project", "require": { - "php": "7.4|^8.0", + "php": "^7.4|^8.0", "laravel/framework": "^8.0", "simplesamlphp/simplesamlphp": "v1.19.2", "doctrine/dbal": "^3.1" diff --git a/config/database.php b/config/database.php index 0ec83b30d0290c1a0581dff29f2fca344f18f7f0..f3ab5678bb8661a37fdd86aeb50fa688512ee765 100755 --- a/config/database.php +++ b/config/database.php @@ -56,8 +56,6 @@ return [ 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', - 'strict' => false, - 'engine' => null, 'modes' => [ 'ONLY_FULL_GROUP_BY', 'STRICT_TRANS_TABLES',