StoreMineStoreMine
Guide
Admin Panel
Storefront
Deployment
  • FAQ
  • Changelog
  • Credits
Guide
Admin Panel
Storefront
Deployment
  • FAQ
  • Changelog
  • Credits
  • Deployment

    • Production Deployment
    • Troubleshooting

Production Deployment

This condenses the operator's guide that ships in deploy/DEPLOYMENT.md. If you only remember one command, make it this one:

php artisan storemine:preflight

It checks roughly thirty things that are invisible until they cost you money — debug mode left on, a queue worker nobody started, a seeded admin password nobody changed, a frontend build that predates your live Stripe key. It exits non-zero on failure, so it can gate a deploy script. Run it after every deploy.

First deploy

The full step-by-step is in the Installation guide. Short version:

cd /var/www
git clone <your-repo> storemine && cd storemine   # or unzip the package
cp .env.example .env
php artisan key:generate
# edit .env — see the Configuration guide
./deploy/deploy.sh                                 # installs, builds, migrates, caches
php artisan db:seed --force                        # first admin + baseline data
php artisan storemine:preflight                    # verify

Routine deploys

One command, safe to run on every update:

./deploy/deploy.sh

It enters maintenance mode, installs PHP and JS dependencies, builds the frontend, runs migrations, relinks storage, rebuilds caches, restarts the queue worker and brings the site back up — with automatic recovery if a step fails.

Background processing

Two things must always be running:

Queue worker (Supervisor)

sudo cp deploy/supervisor-storemine.conf /etc/supervisor/conf.d/
# adjust paths and user inside, then:
sudo supervisorctl reread && sudo supervisorctl update
sudo supervisorctl status

Emails, campaign sends, AI jobs and abandoned-cart recovery all run through the queue. A stopped worker fails silently — orders still work, but nothing sends. Preflight catches this.

Scheduler (cron)

One entry (see deploy/crontab):

* * * * * cd /var/www/storemine && php artisan schedule:run >> /dev/null 2>&1

Drives scheduled campaign dispatch (marketing:dispatch-due) and currency refresh (currency:refresh).

Web server

  • nginx — start from deploy/nginx.conf; document root is public/
  • Apache — standard Laravel vhost plus deploy/apache-storage-hardening.conf, which blocks PHP execution inside uploaded-file directories

Behind Cloudflare or a load balancer? Set the trusted-proxy configuration as described in deploy/DEPLOYMENT.md § "Behind a proxy" so customer IPs and HTTPS detection stay correct.

File ownership

sudo chown -R www-data:www-data storage bootstrap/cache
sudo chmod -R 775 storage bootstrap/cache

Webhooks

Register each enabled gateway's webhook URL in the provider dashboard (Stripe, PayPal, bKash, SSLCommerz) — exact URLs are listed in deploy/DEPLOYMENT.md § "Webhooks to register with each provider". Without them, payments succeed at the gateway but orders stay pending.

Operations

TaskCommand
Rotate an admin passwordphp artisan storemine:admin-password <email>
Watch logsphp artisan pail or tail -f storage/logs/laravel.log
Inspect the queuephp artisan queue:monitor / check jobs table
Refresh FX rates nowphp artisan currency:refresh
Readiness checkphp artisan storemine:preflight

Backups

Back up two things: the database and storage/app/public (uploaded media). Everything else is reproducible from the codebase. A nightly mysqldump plus an rsync of the uploads directory is a solid baseline.

Next
Troubleshooting