- Add nginx to Dockerfile as reverse proxy - Route /api/* to FastAPI, / to Next.js on single port 80 - Update all frontend components to use /api prefix in production - Simplify docker-compose to single port 80 - Fixes CORS errors when deployed to remote servers
11 lines
312 B
YAML
11 lines
312 B
YAML
services:
|
|
kv-pix:
|
|
image: git.khoavo.myds.me/vndangkhoa/apix:latest
|
|
container_name: kv-pix
|
|
restart: unless-stopped
|
|
ports:
|
|
- "80:80" # nginx serves both frontend and API
|
|
environment:
|
|
- NODE_ENV=production
|
|
volumes:
|
|
- ./data:/app/data # Persist prompt library and history
|