Bind-mount the project into the container for live edits
docker-compose.yml now mounts the working directory at /var/www/html so PHP changes take effect without an image rebuild. To avoid a mount nested inside that bind mount, the storage directory moves out to /var/www/storage (still a named volume). Config gains a STORAGE_PATH env var driving both the SQLite database and the JWT signing-key location; the entrypoint chowns that directory. The Dockerfile is unchanged and still builds a self-contained image (STORAGE_PATH defaults back to ./storage when unset). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -24,7 +24,7 @@ final class Config
|
||||
\Dotenv\Dotenv::createImmutable($basePath)->safeLoad();
|
||||
}
|
||||
|
||||
$storagePath = $basePath . '/storage';
|
||||
$storagePath = self::env('STORAGE_PATH', $basePath . '/storage');
|
||||
if (!is_dir($storagePath)) {
|
||||
mkdir($storagePath, 0775, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user