Serve the built SPA from the PHP image; drop the web container
The Dockerfile is now multi-stage: a Node stage runs `npm run build`, and the PHP/Apache stage copies the result into public/. Apache + public/.htaccess route /api* to the Slim front controller, serve real files, and fall back to index.html for client-side routes. docker-compose.yml loses the `web` service, its volume, and the source bind-mount -- the image is the artifact now (rebuild to pick up changes). Frontend dev moves to `npm run dev` on the host; APP_URL defaults to :8080 since the one container serves both halves. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,3 +8,8 @@ storage
|
||||
.phpunit.result.cache
|
||||
docs
|
||||
README.md
|
||||
|
||||
# Frontend: the build runs `npm ci` in its own stage, and dist/ is emitted there.
|
||||
web/node_modules
|
||||
web/dist
|
||||
web/dev-dist
|
||||
|
||||
Reference in New Issue
Block a user