Installation

This section presents general information of how to install the project. The Windows section has been built after one of the very few tests performed on the first stable releases. It's required to be kept in mind that all the information are mostly written from the perspective of Linux environment.

Environment preparation

Linux

tip

Keep in mind that by default copying hidden files in Linux is disabled. Files such like .env might not be copied on local system. It's recommended to copy/move the data using CLI and to enable copying hidden files call this command: shopt -s dotglob. This solution will work until restarting the system.

Windows

  • First You need the tools for managing packages
  • Then You need environment (Pick one)
  • Unzip/put entire project into Your base html folder which depends on application You use.
    • Check corresponding manuals where projects folders are for Xampp or Wampp, usually this is:
      • Xampp C:\xampp\htdocs
      • Wamp c:\wamp\www
  • Now open terminal (for example git bash)
  • Go to section general

General

Installing packages

  • Run composer install (around 100-150mb to download)
caution

In case You have this error An error occurred: Could not resolve host: security.sensiolabs.org. Run this command: composer require sensiolabs/security-checker

tip

In case of problems with installing composer packages, in worst case You can just install them as sudo

tip

This project has 2 built-in installers, which can be called directly after composer install, depending on the deployment:

  • For standard installation call: composer pms-installer
  • For installation from within docker usage call: composer pms-installer-docker

With this You can proceed directly to the Local Server section on the end of the installation guide.

Configuring environment

  • Create a database that You will use for this application
    • prepare login for this database
    • prepare password for this database
    • prepare host and port for this database

Env

  • If the file .env does not exist in the root folder - create it
  • Open .env file inside root of project
  • Add Your database connection as described in:
    • Doctrine (section: Configuring the Database)
      • example: DATABASE_URL=mysql://user:password@127.0.0.1:3306/pms
  • Set application environment to Production APP_ENV=prod
  • Disable debugging APP_DEBUG=0
tip

Check the default .env in main branch of the repository

Building cache

  • Now run this commands one after another
    • sudo bin/console cache:clear
    • sudo bin/console cache:warmup

Creating database tables

  • Run this command
    • sudo bin/console doctrine:schema:update --env=dev --force
warning

This is very important, due to symfony issues where normal update generates incorrect sql where some nullable fields are NOT NULL. This was most likely fixed in one of the Migrations (in this project - was also tested but so far schema update is adviced).

  • Run this command:
    • sudo bin/console doctrine:migrations:migrate
important

This is required to make the initial insertions into the tables. Sqls are specially handled so that no errors are being thrown if such table/column/constraint already exist.

Services

  • In terminal go to the project root folder
    • (example: cd/var/www/html/YourFolder)
  • Run this command: bin/console --env=dev encrypt:genkey
  • Edit the file: config/services.yaml
    • Change section parameters to this:
parameters:
locale: 'en' #Leave any other subsections like this one
encrypt_key: 'YourGeneratedKey goes here'
warning

Save somewhere the generated key. This key is used to encrypt and decrypt passwords stored in Passwords module Without this key it won't be able to decrypt Your passwords.

Local Server

  • Get the script from: https://symfony.com/download
  • In project root call: symfony server:start --port=8001
  • Open the localhost with given port, in this case: http://127.0.0.1:8001