Packages used:
- PHP Version ≥ 7.0 (ext-mbstring and ext-exif enabled)
- Composer package management (optional)
- MySQL drivers
Follow the given steps to setup Luminosity.
- Clone the project in your htdocs directory using
Renamegit clone git@github.com:cmd3BOT/Luminosity.git
application/Config/Config.example.php
toConfig.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
toprod
.
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);
Setup the app configurations in the Config file carefully to avoid any unexpected errors
-
Add SMTP Mail details to the app.
To setup using Gmaildefine("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 atsettings/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
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 loaddump.sql
In case of a problem you can open an issue