Spaces:
Running
Running
Deploy to Hugging Face Spaces (Docker)
This project uses Laravel as runtime and serves the built React app from public/fe.
What changed
- Dockerfile is now multi-stage:
- Build frontend with Vite
- Install PHP dependencies with Composer
- Run Laravel on port
7860
- Startup script auto-creates
.envfrom.env.exampleand generatesAPP_KEYif missing.
Required runtime variables (Space Settings -> Variables/Secrets)
API_URL(target backend API base URL for BFF proxy, example:https://your-backend/api/v1)- Optional:
APP_ENV=productionAPP_DEBUG=false
Optional build variables
You can override these during Docker build:
VITE_API_URLVITE_DUMMY_AUTH_MODEVITE_APP_BASENAME
If not set, Dockerfile defaults are used.
Health check
After deploy, test:
/(Laravel welcome page)/fe/login(React app)/api/bff/health(BFF health)