Ready for release: Includes Auto-cron, Installer, and Schema

This commit is contained in:
Timothy Allen
2026-01-10 16:00:06 -06:00
commit 7fc2f2bc1f
9 changed files with 608 additions and 0 deletions

24
docker-entrypoint.sh Normal file
View File

@@ -0,0 +1,24 @@
#!/bin/bash
set -e
# 1. Install SimplePie if vendor folder is missing
if [ ! -d "/var/www/html/vendor" ]; then
echo "Vendor folder not found. Installing SimplePie..."
composer require simplepie/simplepie
fi
# 2. Ensure Cache folder exists and is writable
if [ ! -d "/var/www/html/cache" ]; then
mkdir -p /var/www/html/cache
chmod -R 777 /var/www/html/cache
fi
# 3. Setup Cron Job (Runs every 15 minutes)
# We overwrite the file to ensure no duplicates
echo "*/15 * * * * /usr/local/bin/php /var/www/html/fetch.php >> /var/www/html/cron_output.log 2>&1" > /etc/cron.d/rss-cron
chmod 0644 /etc/cron.d/rss-cron
crontab /etc/cron.d/rss-cron
service cron start
# 4. Start Apache
exec "$@"