Phase 1: dev environment — MariaDB container, frankenphp dev server, TCP MySQL env
This commit is contained in:
parent
6d3675113d
commit
6d5f9d1ac3
4 changed files with 52 additions and 1 deletions
15
Caddyfile.dev
Normal file
15
Caddyfile.dev
Normal 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
10
dev.sh
Executable 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
|
||||||
26
docker/develop.compose.yaml
Normal file
26
docker/develop.compose.yaml
Normal 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
2
package-lock.json
generated
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "livewire-starter-kit",
|
"name": "festbench-web",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue