Repository navigation
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.
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 --buildOpen 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.
| 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 |
-
.env.dockeris git-ignored; never commit it. -
SESSION_SECURE_COOKIE=falseis only for plain-HTTP localhost. Behind HTTPS set it totrue, setAPP_URLto the publichttps://URL andTRUSTED_PROXIESto 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, whichcompose.yamlsets. Do the same on a managed MySQL. - CI builds the image, boots the stack and smoke-tests SSR, the main pages, the sitemap,
robots.txtand thellmsfiles on every push.
GleanGrid · MIT licence · Project page · Case study · The Last Mango Problem · Report a security issue · Built in Hyderabad, Sindh
Get going
Guides
Under the hood
- Architecture
- URL Map
- Order Lifecycle
- Database Design
- Security Model
- Payments
- Race Conditions
- SEO and Performance
- Internationalisation
Ship it
Read more