Skip to main content

The production stack

Production uses the same Docker Compose stack with an override, docker-compose.prod.yml, driven by the make prod-* targets:
  • The application code and its PHP dependencies are built into the PHP and worker images.
  • nginx serves the built front-end from the host’s public/ folder and is the only published port (APP_PORT, plain HTTP).
  • PostgreSQL and Redis stay inside the Docker network.
  • Data that must survive image rebuilds lives on the host: public/storage (uploads), plugins/ (with state.json), src/Logs and src/Temp/session.

Deploy

1

Clone and configure

In .env set at least: APP_DEBUG=false, your APP_URL, a strong DB_PASS, and real SMTP_* and MAIL_FROM_* values. See Configuration.
2

Build the front-end

Built assets aren’t stored in git, and nginx serves them from public/.
3

Build and start the stack

make prod-logs follows the logs; make prod-down stops the stack.
4

Create the database

5

Make the host folders writable

public/storage, plugins, src/Logs and src/Temp/session must be writable by the PHP containers’ user, www-data (uid 82).

First production install

Don’t run make seed on a live store: it loads demo staff accounts with a public password and wipes existing data. Start from an empty catalog instead:
1

Load roles and settings

This creates the standard roles and every settings key, filled with demo values you’ll replace.
2

Register your own account

Open the store, register with your email and a strong password.
3

Make it an administrator

Then, in the database shell:
Sign out and back in, and /admin opens.
4

Replace the demo settings

In Settings, update General, Contacts, Branding and Marketing — above all Branding → Store Website, which every link inside emails uses. Set up your delivery and payment methods in Settings → Delivery and Settings → Payments. Then edit the static texts in the templates (the /contacts page and the product page’s delivery lines).
Both seeders empty their tables first — run them only on a new database. Re-running RolesSeeder later would also remove accounts.

HTTPS

With APP_ENV=prod the session cookie is marked Secure, so browsers only send it over HTTPS — sign-in and every form fail over plain HTTP. nginx in the stack doesn’t terminate TLS: put a reverse proxy with a certificate (Caddy, nginx, Traefik…) in front of APP_PORT. Behind a proxy, the IP address saved with quick orders and other records is the proxy’s.

Production checklist

  • APP_DEBUG=false.
  • HTTPS in front of the stack.
  • Store Website set to your domain.
  • APP_URL set to your public HTTPS address, and your LiqPay keys added, if you take online payments.
  • Working SMTP — order confirmations, status updates, password resets, cart reminders, contact-form messages and newsletters depend on it.
  • No demo accounts on the live database.
  • Host folders writable by uid 82.
  • Backups scheduled (below).

Health checks

Upgrade

Rebuilding the images is required for code changes to take effect: in production PHP doesn’t re-check files for changes.

Back up and restore

There’s no built-in backup tool. Back up these four things: Use your own DB_USER and DB_NAME if you changed them. To restore, start the stack on an empty database — don’t run make migrate first, the dump already contains the schema — and load the dump:
The stack uses PostgreSQL 18, whose data volume is mounted at /var/lib/postgresql. A volume created by an older PostgreSQL version can’t be reused — dump the data with the old version and restore it into a new volume.