docker-compose.dev.yml extends docker-compose.yml, so development runs the scheduler too, and takes its settings from .env, which selects the file through COMPOSE_FILE. The dev image is a stage of the Dockerfile and shares the production image's PHP extensions; the app listens on port 80 as in production. A vite service runs the dev server with hot reload. No ports are published: OrbStack serves https://app.sealshare.orb.local and https://vite.sealshare.orb.local, with the ports pinned by label. Without OrbStack, docker-compose.ports.yml publishes APP_PORT and VITE_PORT on 127.0.0.1. vite.config.js takes the dev server's address from VITE_DEV_SERVER_URL and listens on IPv4 and IPv6, as OrbStack's proxy connects over either. Each start installs Composer packages, clears caches, migrates and links storage. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
33 lines
1.1 KiB
Bash
Executable File
33 lines
1.1 KiB
Bash
Executable File
#!/bin/sh
|
|
set -e
|
|
|
|
cd /app
|
|
|
|
# Generate PHP ini from environment variables (with defaults)
|
|
echo "[dev] Configuring PHP settings..."
|
|
cat > /usr/local/etc/php/conf.d/99-uploads.ini <<EOF
|
|
upload_max_filesize = ${PHP_UPLOAD_MAX_FILESIZE:-64M}
|
|
post_max_size = ${PHP_POST_MAX_SIZE:-64M}
|
|
max_execution_time = ${PHP_MAX_EXECUTION_TIME:-300}
|
|
max_input_time = ${PHP_MAX_INPUT_TIME:-300}
|
|
memory_limit = ${PHP_MEMORY_LIMIT:-512M}
|
|
EOF
|
|
|
|
# Every start, so a pull with new packages needs no extra step; with nothing new it takes a second
|
|
echo "[dev] Installing PHP dependencies..."
|
|
composer install --no-interaction 2>&1
|
|
|
|
# A config or route cache left by `php artisan optimize` would hide changes to the checkout
|
|
echo "[dev] Clearing caches..."
|
|
php artisan optimize:clear
|
|
|
|
echo "[dev] Running database migrations..."
|
|
php artisan migrate --force
|
|
|
|
echo "[dev] Creating storage link..."
|
|
php artisan storage:link --force
|
|
|
|
# Port 80 as in production, so the same healthcheck applies. The vite service serves the assets.
|
|
echo "[dev] Starting Octane (FrankenPHP) with --watch..."
|
|
exec php artisan octane:frankenphp --host=0.0.0.0 --port=80 --watch --workers=1 --max-requests=1
|