Skip to content

EitanJoseph/DFL-cPanel-Auto-Deployment

Repository files navigation

DFL-cPanel-Auto-Deployment

This repository houses the the cPanel auto-deployment framework for the DFL Website

Framework Structure

The auto-deployment structure is defined by the bash script update.sh, which does the following tasks:

  1. Run the python scripts to download and populate JSON objects from the DFL master spreadsheet managed by all captains. Objects are found in players.json and schedule.json.
  2. Pretty-print JSON objects using python -m json.tool
  3. Deploy to cPanel by pushing changes made in (1) by this execution of update.sh

On the server-side, a chrontab process updates the website according to this repository every 24 hours, by running its own version of deploy.sh. The contents of players.json and schedule.json are directly pushed to the server every 24 hours. As such, care must be taken when editing this repository, as well as when updating the google hosted captain's spreadsheet.

Using This Repository

This repository allows the DFL captains to input match report data without having to report to the website host. In order to utilize this auto-deployment structure, it is possible to do either of:

  • Manually run ./update.sh at fixed intervals
  • Use crontab to periodically run ./update.sh by taking the following steps
  1. Create a new script, deploy.sh with the following:
    #!/bin/bash
    /Users/user/folder/DFL-cPanel-Auto-Deployment/update.sh
    ./update.sh
  1. crontab -e
  2. Find the absolute path to deploy.sh, such as /Users/user/folder/DFL-cPanel-Auto-Deployment/deploy.sh, and paste it into the opened crontab file according to how often the process should run, for example:
    1 22 * * * /Users/user/folder/DFL-cPanel-Auto-Deployment/deploy.sh
  1. Periodically check /var/mail/ to ensure that the script is running properly.

References

About

Auto-deployment framework for DFL's cPanel file manager

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published