Skip to content

Latest commit

 

History

History
90 lines (72 loc) · 3.81 KB

INSTALLATION.md

File metadata and controls

90 lines (72 loc) · 3.81 KB

Installation

Packages used:

Requirements

  • PHP Version ≥ 7.0 (ext-mbstring and ext-exif enabled)
  • Composer package management (optional)
  • MySQL drivers

Setup Luminosity

Follow the given steps to setup Luminosity.

1. Setup Project

  • Clone the project in your htdocs directory using

    git clone git@github.com:cmd3BOT/Luminosity.git
    
    Rename application/Config/Config.example.php to Config.php

  • When using remote hosting, typically the URL does not contain the folder name but only the host name. Therefore, when deploying we can change the environment in Config.php from local to prod.

    define("ENVIRONMENT", "local");
    
    $basePath = ENVIRONMENT === "local" ? '/'.basename(dirname(__DIR__, 2)) : '';
    define('BASE_FOLDER', $basePath); 
    
    /**
     * Set URLROOT for application.
     * Note: Host name should not have trailing slashes.
     * Eg: https://luminosity-dev.herokuapp.com or http://localhost
     */
    define('URLROOT', "http://<hostname>".BASE_FOLDER); 

2. App Configurations

Setup the app configurations in the Config file carefully to avoid any unexpected errors

  • Add SMTP Mail details to the app.

    To setup using Gmail

    define("SMTP_HOST", 'smtp.gmail.com');
    define("SMTP_USERNAME", 'username@gmail.com');
    define("SMTP_MAIL", 'username@gmail.com');
    define("SMTP_PASSWORD", 'password');
    define("SMTP_PORT", 587); // default mail port

    Using Gmail requires access from less secure apps
    More options: Sendgrid, Mailjet

  • Create an IP Quality Score account and add your email validation API token. After signing up you will find your API key in the account settings.

    define('EMAIL_API_TOKEN', '...');

    Alternatively you can disable email authentication here

  • Cloudinary has been used as the image host for application. Cloudinary works in the default demo mode as given. Creating your own cloud will allow only validated images from your cloud on the application. Allowed Image Extensions can be set in the console at settings/uploads/<UPLOAD_PRESET>/Upload Control

    Reference Upload API

    // Default values for demo cloud
    define('IMG_CLOUD_NAME', 'demo');
    define('IMG_UPLOAD_URL', 'https://api.cloudinary.com/v1_1/'.IMG_CLOUD_NAME.'/image/upload');
    define('IMG_API_KEY', '');
    define('IMG_API_PRESET', 'docs_upload_example_us_preset');

    You can modify the allowed size and extensions for user uploaded images in WriteModel

3. Setup Database

Use MySQL database for the application.

  • Add database credentials to the Config file
    define("DB_HOST", "localhost");
    define("DB_USER", "root");
    define("DB_PASS", "");
    define("DB_NAME", "luminosity");
  • Create a database called luminosity and load dump.sql

Issues

In case of a problem you can open an issue