Skip to content

A minimalistic platform which triggerers an action (emails by default) when a specific url is requested with an optional data sent. Useful when doing crontab/cronjob monitoring.

Notifications You must be signed in to change notification settings

EncryptEx/alerty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alerty

Alerty

Fast and reliable reply notifications after tasks.

A minimalistic platform which triggerers an action (emails by default) when a specific url is requested with an optional data sent. Useful when doing crontab/cronjob monitoring.

By default, it sends an email to the previously saved email.


Architecture

This project is using

  • PHP
  • MySQL (pdo conections)
  • Composer, to use:
    • phpdotenv (credentials management)
    • phpmailer (SMTP email library)
    • phpunit (unit testing in php)

Story

I was messing arround with my linux, until I discovered that I wanted to recieve some feedback whenever a crontab (the update & upgrade) was finished.

That's basically the main reason of why I have chosen to build this triggerer website.


Philosophy

I would like to bring this little service open and free to anyone, so feel free to fork it or use it at my hosted version


Installation

  1. First, clone the repository and install all the dependencies:

    composer install

    Depending of your hosting provider you will need to move the vendor folder inside the private folder because of permission conflicts with the user www-data (happened in my case). If this happens to you, you'll need to change the path of the vendor's autoload at the src/private/utils.php file (line 15).

  2. Then, with the PHP installed and its dependencies, let's import the databse structure, for this, create a database and drag and drop (in phpMyAdmin) the file located in:

    db/database.sql

    or simply go to the import section after clicking on the database's name. A tutorial can be found here or if you prefer the in-line method this may help you.

    If you want the terminal option just do:

    mysql -u <db_user> -p <db_name> ./db/database.sql
    
  3. Create the .env file by changing the name or copying the src/private/.env.example file To change the name:

    mv .env.template .env
    

    To copy the file

    cp .env.template .env
    

    And then, place all the credentials needed. Here's a table explaining what do they mean:

    Enviroment variable Description
    DB_HOST The databse host, most times is localhost
    DB_NAME The name of the Database you have just created
    DB_USER The MySQL database username, needs access to CRUD (Create, Read, Update, Delete)
    DB_PASS The MySQL database password
    MAIL_SENDER The email, example: name@example.com
    MAIL_PWD The email account password, highly recommended to generate one with this method if is a google account
    MAIL_HOST The SMTP host, gmail uses smtp.gmail.com
    MAIL_PORT The SMTP port, gmail uses 587 (with TLS, that is required in this application)
    HASH_SALT A secret string that is crucial to encrypt the account verification link. Do not leave in blank or make it easy to guess, you'll never have to type it anywhere.
  4. Run server and enjoy!


Suggestions or questions

If you feel that something is wrong in this README file or you need help while setting up this project, feel free to contact or open a GitHub Issue.


Animated footer bars

About

A minimalistic platform which triggerers an action (emails by default) when a specific url is requested with an optional data sent. Useful when doing crontab/cronjob monitoring.

Topics

Resources

Stars

Watchers

Forks