A fully isolated, zero-impact Docker production stack for Sarkari.online that runs safely alongside other client websites on an Ubuntu/Nginx server.
sarkari_app: PHP 8.3-FPM + Alpine Nginx + 24/7 Crond Daemon (Bound to127.0.0.1:8085).sarkari_db: Isolated MariaDB 10.11 on private bridge networksarkari_network.- Host Nginx: Serves as a lightweight Reverse Proxy (
sarkari.online➡️127.0.0.1:8085) with Certbot SSL. - Client Projects: 100% untouched and isolated on the host system.
sudo apt update
sudo apt install -y docker.io docker-compose-plugin
sudo systemctl enable --now dockersudo git clone https://sarkari-online:YOUR_TOKEN@github.com/sarkari-online/sarkari-online.git /var/www/sarkari.online
cd /var/www/sarkari.onlinecp .env.example .env
nano .env(Add your Gemini API Key, then press Ctrl+O, Enter, Ctrl+X)
sudo docker compose up -d --build(The container will automatically wait for the database, import production_dump.sql with 14 live articles, and start the 24/7 AI publishing cron!)
sudo cp host-nginx-reverse-proxy.conf.example /etc/nginx/sites-available/sarkari.online
sudo ln -s /etc/nginx/sites-available/sarkari.online /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginxsudo certbot --nginx -d sarkari.online -d www.sarkari.online# Check running containers
docker compose ps
# View live application & cron logs
docker compose logs -f app
# Restart stack
docker compose restart
# Pull & Rebuild on updates
docker compose up -d --build