Skip to content
OpenHR PH

Self-hosting OpenHR PH with Docker: what to expect

The shortest path from a checkout to a production-like installation is the Docker Compose stack. Here is what it runs, what it seeds, and what to check before the first payroll.

OpenHR PH team 3 min read
Cover image for Self-hosting OpenHR PH with Docker: what to expect

OpenHR PH is a Laravel application with a queue worker, a scheduler and a payroll engine. The repository ships a Docker Compose stack that runs all of it together, so you can evaluate a realistic installation without assembling the pieces by hand.

This is not a replacement for the deployment guide. It is the short version: what the stack does, what it seeds, and what to verify before you trust a payroll run.

What the stack runs

Service Job
web Nginx, serving the application and built assets
app PHP-FPM runtime
init One-shot bootstrap: migrations, sector setup, catalogues and statutory imports
queue Queue worker
scheduler Laravel scheduler
db MySQL 8.4 with a persistent volume
reverb Optional WebSocket server
caddy Optional TLS termination

Application data lives in named volumes for the database and storage. Uploads, logs, framework cache and compiled views stay on the storage volume.

What the first boot seeds

The init service is where a lot of the setup happens. On a fresh database it applies migrations, configures the sector when OPENHR_SECTOR is set, seeds the default catalogues, imports the statutory tables, the wage orders for private-sector installations, and the holiday calendar.

That last part deserves emphasis: the statutory tables are data, not code. They are effective-dated and configurable. A new installation is not automatically correct for every date; the values still need to be validated against current issuances.

Before the first payroll

Work through this list before processing a real run:

  • set APP_URL and the portal URL correctly;
  • generate a unique APP_KEY and keep it out of source control;
  • replace the example database passwords;
  • configure SMTP for invitations, password resets and payroll mail;
  • set the sector and country deliberately;
  • confirm the statutory tables and holiday calendar for the period;
  • build the Go payroll engine on the server;
  • run the queue worker and scheduler under a supervisor;
  • create the first administrator account;
  • test a payroll run with sample employees before using real data.

The Go payroll binary must exist on the server. The Docker image builds it automatically. Other deployment paths need to add the build step to their release process.

Upgrades and backups

Migrations are guarded with Schema::hasTable and Schema::hasColumn, so the same migration set upgrades an existing installation in place. That is convenient, and it is not a substitute for a backup. Take one before every release that changes the schema or payroll logic.

The operational baseline is unglamorous: database backups, storage backups, a tested restore, logs with retention, and a health check on /up. The operations guide covers those.

Where to go next

If you would rather not operate servers, the hosted demo is enough to explore the workflows, and Laravel Cloud is the managed path for a real installation.

Want to see the workflow behind the article?

Open the demo workspace or ask for a walkthrough that follows your sector.