Phase 1: dev environment — MariaDB container, frankenphp dev server, TCP MySQL env

This commit is contained in:
PeterChrz 2026-09-16 22:29:49 -04:00
parent 6d3675113d
commit 6d5f9d1ac3
Signed by untrusted user who does not match committer: pch
GPG key ID: 8F0826ECF7302C63
4 changed files with 52 additions and 1 deletions

15
Caddyfile.dev Normal file
View file

@ -0,0 +1,15 @@
# Development server. Production Caddyfile lives at docker/Caddyfile.
{
frankenphp
}
:8080 {
root public/
encode zstd br gzip
php_server {
try_files {path} index.php
}
log {
output stdout
}
}

10
dev.sh Executable file
View file

@ -0,0 +1,10 @@
#!/bin/sh
# festbench-web dev: frankenphp (host binary) + vite HMR.
# MariaDB must be up: docker compose -f docker/develop.compose.yaml up -d
cd "$(dirname "$0")"
frankenphp run --config Caddyfile.dev &
FRANKEN=$!
npm run dev &
VITE=$!
trap 'kill $FRANKEN $VITE 2>/dev/null' INT TERM
wait

View file

@ -0,0 +1,26 @@
# Development-only stack: MariaDB in a container so the base OS stays clean and
# the app talks TCP to a network-attached DB, mirroring the production topology
# (DB on a nearby host). Production deploys via the Dockerfile only — Coolify
# never sees this file.
services:
mariadb:
image: mariadb:11
container_name: festbench-mariadb
restart: unless-stopped
environment:
MARIADB_DATABASE: festbench
MARIADB_USER: festbench
MARIADB_PASSWORD: festbench
MARIADB_ROOT_PASSWORD: festbench-root
ports:
- "127.0.0.1:3306:3306"
volumes:
- festbench-mariadb:/var/lib/mysql
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 5s
timeout: 3s
retries: 10
volumes:
festbench-mariadb:

2
package-lock.json generated
View file

@ -1,5 +1,5 @@
{
"name": "livewire-starter-kit",
"name": "festbench-web",
"lockfileVersion": 3,
"requires": true,
"packages": {