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.
This project is using
- PHP
- MySQL (pdo conections)
- Composer, to use:
- phpdotenv (credentials management)
- phpmailer (SMTP email library)
- phpunit (unit testing in php)
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.
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
-
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 theprivate
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 thesrc/private/utils.php
file (line 15). -
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
-
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: [email protected] 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. -
Run server and enjoy!
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.