Skip to main content
This is the development environment — a checkout you can run and change. For installing FaPost on a server, see Self-hosting instead; the two have different goals and different trade-offs.
There are two ways to start. Docker gives you a runtime that matches production; a local install is faster if you already run PHP that way.

With Docker

Nothing to install but Docker itself.
That builds a development image from the same base as the production one, mounts your working tree, and starts PostgreSQL, Redis, Horizon, the scheduler and Vite. Edits take effect immediately — no rebuild.
The application is on http://localhost:8000, Vite on http://localhost:5173.

Why the dev image shares the production base

The development image is the dev target of docker/Dockerfile, built from the same base stage as the production one. That is deliberate: a separately assembled development image would have its own PHP build and extension set, and every difference between the two becomes a bug that only appears after deployment. What does differ is only what should:
  • dev Composer dependencies are installed
  • the source is mounted rather than copied, so edits are live
  • opcache.validate_timestamps=1, or nothing you type would take effect
  • the container runs as your user id, so files it writes stay yours
  • Xdebug is available, off unless the image is built with INSTALL_XDEBUG=1
vendor/ and node_modules/ are deliberately not mounted from the host. They are installed inside the container for its own platform, and sharing them would mix binaries built for a different OS.

Xdebug

Step debugging is trigger-based, so it costs nothing until you ask for it. The callback address defaults to host.docker.internal, which resolves on Linux too because compose maps it to the host gateway. If your IDE is elsewhere:

On your own machine

Requirements:
  • PHP 8.5.12 or newer
  • Composer 2
  • Node.js 20+ and npm
  • PostgreSQL 15+ or compatible
  • Redis
  • PHP extensions: pdo_pgsql, redis, intl, bcmath, gd, zip, plus pcntl and posix for Horizon
Check them all at once:
1

Install dependencies

2

Prepare the environment

.env.example ships the credentials the Docker stack creates for itself, so that path works unedited. Running against services you provisioned yourself means pointing these at them:
If your Redis runs without requirepass, set REDIS_PASSWORD=null rather than leaving it empty — Laravel reads the literal null as “no password”, and an empty string is a password of zero length.
3

Migrate and run

composer run dev starts the Laravel dev server, the queue listener, pail log tailing, and the Vite dev server together.

The Makefile

The repository root has a Makefile that wraps the everyday commands. It is a front-end, not a second source of truth: where Composer holds a sequence (setup, dev, test) the target delegates to it, so there is one definition of each.
make with no arguments prints each target with its description and, under it, the command that would actually run. Read that before running anything unfamiliar: it also shows whether the command goes through a container.

Running commands inside a container

By default every target runs against whatever PHP is on your PATH. If your PHP lives in a container — devilbox, a Compose stack, anything docker exec can reach — set CONTAINER and the PHP-side targets are prefixed with docker exec automatically:
To stop typing it, put the setting in .make.local at the repository root. The file is git-ignored: it describes your machine, not the project.
WORKDIR, where the checkout is inside the container, is worked out from the container’s mounts: the mount whose host folder holds the checkout. Under devilbox ~/Projects/php is /shared/httpd, so the checkout runs in /shared/httpd/fapost-core and a task worktree next to it in /shared/httpd/fapost-core.worktrees/<task> — in itself, not in the main checkout. Set WORKDIR only when the container reaches the checkout some other way than a mount; set in .make.local it applies to every worktree that file is carried into. The container name comes from Docker Compose: <project>-<service>-<index>, so devilbox’s PHP service is server-php-1 and its PostgreSQL is server-pgsql-1. Targets that run host tools stay on the host regardless of CONTAINER: make dev (Vite needs the host’s Node), make docs-dev (Mintlify), the tunnel targets. make shows which is which.

Task worktrees

An agent working through Jig may run a task in a worktree of its own (jig task start <id> --worktree). Jig copies .make.local into it and then runs make worktree-setup (worktree.setup in .ai/config.yaml), which prepares the worktree’s dependencies:
  • by default the worktree has no packages/, so the links composer dev:link and npm run dev:link made into it are removed and the dependencies are installed from composer.lock and package-lock.json — the task runs on the versions Core pins, as CI does;
  • a task that edits the packages is started with --share packages: the worktree sees your checkouts under packages/, and the setup installs your composer.overlay.json and links the checkouts Core accepts, as in your main checkout.
The command can be run again by hand, make worktree-setup, or through jig task bootstrap <id>.

Adding packages on top of Core

To work against a package Core does not require — a Solution, a Plugin or a private extension — without touching Core’s composer.json, use a composer overlay. See Development setup → Packages Core does not require.

Checks

Or, through the Makefile, make test, make test-arch, make fix. See Testing and architecture checks for what each covers.

Running it like production

To exercise the actual production images locally, follow Docker Compose. Same topology, different images — useful for reproducing something that only happens with a compiled config cache and no dev dependencies.