Skip to content
This repository was archived by the owner on Oct 25, 2026. It is now read-only.
Syed Ahmer Shah edited this page Oct 25, 2026 · 1 revision

Docker

The repository ships a production-style stack in Dockerfile + compose.yaml:

Service Image Role
db mysql:8.0 Database (volume db-data)
app gleangrid:latest PHP 8.3 + Apache, OPcache, public/ as document root, port 8080
ssr gleangrid:latest node bootstrap/ssr/ssr.js, the Inertia SSR renderer (internal only)

The image is a three-stage build: Composer (no dev packages, optimised class map) → Node 22 (client + SSR bundles) → PHP/Apache runtime with Node copied in for SSR. Apache hides its version (ServerTokens Prod, TRACE off) and PHP hides X-Powered-By.

Run it

cp .env.docker.example .env.docker
# 1. APP_KEY:  docker run --rm php:8.3-cli php -r "echo 'base64:'.base64_encode(random_bytes(32)).PHP_EOL;"
# 2. put the same strong password in DB_PASSWORD and MYSQL_PASSWORD
docker compose up -d --build

Open http://localhost:8080 and use the one-tap demo buttons on /login.

On boot the app container links storage, runs migrations (retries while MySQL starts, gives up after 20 tries), seeds the demo data once if SEED_DEMO_DATA=true and the database is empty, then caches config, routes, views and events. The SSR container skips all of that.

Everyday commands

Task Command
Logs docker compose logs -f app
Artisan docker compose exec app php artisan <command>
Rebuild after code changes docker compose up -d --build
Browser tests against the stack E2E_BASE_URL=http://localhost:8080 npx playwright test --project=desktop
Wipe database and uploads docker compose down -v

Notes

  • .env.docker is git-ignored; never commit it.
  • SESSION_SECURE_COOKIE=false is only for plain-HTTP localhost. Behind HTTPS set it to true, set APP_URL to the public https:// URL and TRUSTED_PROXIES to your proxy.
  • The migrations create triggers and a stored procedure. MySQL 8 with binary logging refuses that for a non-root user unless log_bin_trust_function_creators=1, which compose.yaml sets. Do the same on a managed MySQL.
  • CI builds the image, boots the stack and smoke-tests SSR, the main pages, the sitemap, robots.txt and the llms files on every push.

Clone this wiki locally