From 06b45ca84be57dbcfed35d2fb1f3310aadb41b2f Mon Sep 17 00:00:00 2001 From: Henry Whitaker <36062479+henrywhitaker3@users.noreply.github.com> Date: Wed, 8 Apr 2020 16:50:45 +0000 Subject: [PATCH 1/2] Update README.md --- README.md | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6087d7a7..bfdfc57b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,37 @@ -# Speedtest Checker +# Speedtest Tracker -## Queue Setup +This program runs a speedtest check every hour and graphs the results. The back-end is written in [Laravel](https://laravel.com/) and the front-end uses [React](https://reactjs.org/). It uses the [speedtest-cli](https://github.com/sivel/speedtest-cli) package to get the data and uses [Chart.js](https://www.chartjs.org/) to plot the results. + +![speedtest](https://user-images.githubusercontent.com/36062479/78811223-0a7b8800-79b9-11ea-8259-4fb7890c8a14.gif) + +## Installation + +### Installing Dependencies + +This program has some dependencies, to install them you need to run the following: + +```bash +sudo apt update +sudo apt install software-properties-common +sudo add-apt [ONDREJ 7.4] +sudo apt install php7.4 composer python3 python3-pip +sudo pip install speedtest-cli +``` + +Then, download the code by running: + +```bash +git clone [URL] +``` + +Install the composer and npm dependencies: + +```bash +composer install +npm install && npm run production +``` + +### Queue Setup `sudo apt install supervisor` From c9c405735a9b8a70a4fcd2813c9e0c69a0f24859 Mon Sep 17 00:00:00 2001 From: Henry Whitaker <36062479+henrywhitaker3@users.noreply.github.com> Date: Wed, 8 Apr 2020 16:55:14 +0000 Subject: [PATCH 2/2] Update README.md --- README.md | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index bfdfc57b..074a53d6 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ sudo pip install speedtest-cli Then, download the code by running: ```bash -git clone [URL] +git clone https://github.com/henrywhitaker3/Speedtest-Tracker.git ``` Install the composer and npm dependencies: @@ -31,13 +31,25 @@ composer install npm install && npm run production ``` +### Scheduling Setup + +To get speed test results every hour, you need to add a cronjob, run `sudo crontab -e` and add an entry with the following: + +```bash +* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1 +``` + ### Queue Setup -`sudo apt install supervisor` +```bash +sudo apt install supervisor +``` -`sudo vim /etc/supervisor/conf.d/laravel-worker.conf` +```bash +sudo vim /etc/supervisor/conf.d/laravel-worker.conf +``` -Add the following: +Add the following, updating the `command` and user `values`: ```bash [program:laravel-worker]