Installation Festi Project

You can set up a project manually or use Festi CLI.

Installation using composer

composer.json:

{
    "name": "your_company/project_name",
    "description": "Description",
    "repositories": [
        { "type": "composer", "url": "https://packages.festi.io/" }
    ],
    "require": {
        "festi-team/festi-framework-core": "dev-develop",
        "festi-team/festi-framework-database": "dev-develop",
        "festi-team/festi-framework-theme": "dev-develop",
        "festi-team/festi-framework-cli": "dev-develop",
        "festi-team/festi-framework-di": "dev-master",
        "php": ">=8.0"
    },
    "minimum-stability": "dev",
    "autoload": {
        "psr-4": {
            "": "src"
        }
    },
    "autoload-dev": {
        "psr-4": {"": ["tests"]}
    },
    "require-dev": {
        "phpunit/phpunit": "9.*",
        "phpunit/php-code-coverage": "9.*",
        "phan/phan": "4.x",
        "squizlabs/php_codesniffer": "3.*"
    }
}
composer install
mkdir src
./vendor/bin/festi-install 

Installation options

  • dashboard (default) - The Jimbo system plugin will be installed.
  • site - The Jimbo system plugin will be installed. Additionally, the Contents plugin will be installed.
  • api - The RESTful system plugin will be installed. The framework will operate in RESTful API mode.
  • async - A project based on Festi Async Framework will be created. For writing asynchronous services for IoT, Games, Data Streaming, etc.

During installation, you will be asked if you want to install demo content. If you agree, basic settings and routing for login/registration will be created. Most projects require this and you should agree.

Host Configuration

The domain should point to [PROJECT_NAME]/src/[dashboard|api|site|async], or be a symbolic link.

For example, if the virtual host points to /var/www/test_user/data/www/my-domain.dev.clients.in.ua, then the structure would be: /var/www/test_user/data/www/: - test_project - core - dumps - src - dashboard - api - ... - my-domain.dev.clients.in.ua -> test_project/src/dashboard

Possible Installation Errors

If there were errors during installation (for example, there was no database connection) then trying to reinstall may cause errors.

If the error is:

Installing [PLUGIN_NAME] Plugin... [ Info ]

'plugins/[PLUGIN_NAME]' already exists in the index [ ERROR ]

It means that the [PLUGIN_NAME] plugin has already been added to the repository as a submodule.

Solution: 1. Remove the corresponding section from the .gitmodules file. 2. Save changes to .gitmodules - git add .gitmodules 3. Remove the corresponding section from .git/config 4. Run git rm --cached path_to_submodule (without the slash). 5. Run rm -rf .git/modules/path_to_submodule (without the slash). 6. Delete the unprocessed submodule files rm -rf path_to_submodule

Now you can try installing again.

Configuration for IIS

For Microsoft IIS server, place the web.config file in the root folder of the project:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="Imported Rule 1" stopProcessing="true">
                    <match url="^(.*)$" ignoreCase="false" />
                        <conditions logicalGrouping="MatchAll">
                            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                        </conditions>
                        <action type="Rewrite" url="index.php?url={R:1}" appendQueryString="true" />
                </rule>
            </rules>
        </rewrite> 
    </system.webServer>
</configuration>

Configuration for Nginx

For nginx server, you need to specify in /etc/nginx/virtuals.conf:

server {

    listen   80;
    server_name YOUR_HOST.com;

    access_log YOUR_PATH/logs/access.log;
    error_log YOUR_PATH/logs/error.log;

    root   YOUR_PATH;
    index   index.php index.html index.htm;

    location ~*  \.(jpg|jpeg|png|gif|css|js|ico)$ {
                expires max;
                log_not_found off;
        }

    location = /index.php {
        root   YOUR_PATH;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }

    location / {
        rewrite ^ /index.php last;
    }

    location ~ /\.ht {
        deny  all;
    }
}