| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This Lumen app is currently hosted on a shared web hosting service by Hetzner. My current web space has 10 GB of HDD, 192 MB RAM, an execution limit of up to 120 seconds, a PostgreSQL 9 database, and allows no cron jobs.
I wanted to find out whether a Lumen app runs smoothly on a shared web hosting service, and how the app can easily be deployed via FTP (because that's the only option I have) and GitHub.
My Linux VPS (currently hosting a Rails, Grails and Phoenix app) executes the script public/stats.sh every minute via a cron job. This script sends the following data to the shared web hosting service (POST /logs):
At the same time, a Google Apps Script runs every 5 minutes and calls POST /curl_calls. This action pings all the sites in public/sites.php, via curl, and writes the data into the table curl.
A dashboard displays all the relevant data in the logs and curl tables.
<?php
return (object) array(
'UPLOAD_SECRET' => '...',
'DB_NAME' => '...',
'DB_USER' => '...',
'DB_PASSWORD' => '...',
'DB_HOST' => '...'
);To install the defined dependencies for your project, run the install command.
php composer.phar installCREATE TABLE public.alias (
id serial NOT NULL,
created_at timestamp NULL DEFAULT now(),
url varchar NOT NULL,
alias varchar NOT NULL,
CONSTRAINT alias_pkey PRIMARY KEY (id)
);
CREATE TABLE public.logs (
id serial NOT NULL,
created_at timestamp NULL DEFAULT now(),
cpu_us float4 NOT NULL,
current_ram int4 NOT NULL,
total_ram int4 NOT NULL,
hdd float4 NOT NULL,
cpu_sy float4 NULL,
CONSTRAINT logs_pkey PRIMARY KEY (id)
);
CREATE TABLE public.curl (
id serial NOT NULL,
created_at timestamp NULL DEFAULT now(),
url_effective varchar NULL,
http_code int4 NULL,
time_total float4 NULL,
CONSTRAINT curl_pkey PRIMARY KEY (id)
);docker-compose up
In case you want to install lumen-installer:
docker-compose run --rm web bash
# In Container:
composer global require "laravel/lumen-installer"This repo has a GitHub Actions workflow for continuous deployment. It uses FTP-Deploy-Action, which uses git-ftp behind the scenes. For each new commit, the changed files are calculated and then uploaded via FTP.
The app is open-sourced software licensed under the MIT license.
| Back | FazBrowse Home | New Git URL |