Web Interfaces of PROSUME
Francesco Arcarese 7e50298209 updated LICENSE and README + upload of the whole project files and sql dump 2 years ago
bin updated LICENSE and README + upload of the whole project files and sql dump 2 years ago
config updated LICENSE and README + upload of the whole project files and sql dump 2 years ago
plugins updated LICENSE and README + upload of the whole project files and sql dump 2 years ago
sql updated LICENSE and README + upload of the whole project files and sql dump 2 years ago
src updated LICENSE and README + upload of the whole project files and sql dump 2 years ago
tests updated LICENSE and README + upload of the whole project files and sql dump 2 years ago
tmp/cache updated LICENSE and README + upload of the whole project files and sql dump 2 years ago
vendor updated LICENSE and README + upload of the whole project files and sql dump 2 years ago
webroot updated LICENSE and README + upload of the whole project files and sql dump 2 years ago
.gitignore updated LICENSE and README + upload of the whole project files and sql dump 2 years ago
LICENSE updated LICENSE and README + upload of the whole project files and sql dump 2 years ago
README.md updated LICENSE and README + upload of the whole project files and sql dump 2 years ago
client.ini.dist updated LICENSE and README + upload of the whole project files and sql dump 2 years ago
composer.json updated LICENSE and README + upload of the whole project files and sql dump 2 years ago
composer.lock updated LICENSE and README + upload of the whole project files and sql dump 2 years ago
index.php updated LICENSE and README + upload of the whole project files and sql dump 2 years ago
phpunit.xml.dist updated LICENSE and README + upload of the whole project files and sql dump 2 years ago

README.md

WEB

Web Interfaces of PROSUME

Stack

The Web Interfaces is built upon CakePHP v3.7 Framework. The composer.lock is provided as the related vendors files. Javascript and CSS frameworks/library are also provided in the webroot/ directory. The Web Interfaces are backed by a MariaDB and the schema is provided in the sql/ directory. The HTTP server could be Apache or Nginx or else. For Apache the needed .htaccess files are provided. An example of Nginx configuration could be

server {
    listen 80;
    listen [::]:80;

    server_name *serverName*;
    server_tokens off;

    client_max_body_size 128M;

    root /path/to/webroot;
        index index.php index.html index.htm;

    error_log  /path/to/error.log  warn;
    access_log  /path/to/access.log  combined;

    location / {
        try_files $uri $uri/ /index.php?$uri&$args;
    }

    location = /robots.txt {
            log_not_found off;
            access_log off;
    }

    location ~ \.php$ {
            set $newurl $request_uri;
            include fastcgi_params;
            fastcgi_param SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            fastcgi_pass unix:/var/run/php/php*VERSION*-fpm.sock;
            try_files $uri =404;
            fastcgi_index index.php;
            fastcgi_param REQUEST_URI $newurl;
    }
}

Configuration

  • ./client.ini.dist has to be copied as client.ini and the 3 variables of the wallet group has to be changed setting the path to the utility account key, the path of configuration file in YAML format and the path of the prosume-cli executable. Change also the databaseb settings in the related group.
  • in the database table conf change as needed the values accordingly to your needs pointing out the name of the utility account and the settings for the automatic top ups for both PRS and TFT tokens.
  • ./logs/ and ./tmp directory must be writable by the user that run the web server.

Cronjob

The following cron has to be set for an user able to execute a php command and to write in the ./locks directory

*/5 * * * * /usr/bin/php -f /path/to/webroot/readhistory.php