Spaces:
Runtime error
Runtime error
version: "3.8" | |
services: | |
backend: | |
build: | |
context: ./backend # <β your backend folder on host | |
dockerfile: Dockerfile | |
ports: | |
- "8000:8000" | |
# ββ Environment the code expects βββββββββββββββββββββββββββββ | |
environment: | |
# βΌ SQLite file lives in the same folder as your code | |
- DATABASE_URL=sqlite:///./pdf_chatbot.db | |
# βΌ Chroma + uploads are relative to the WORKDIR (/app/backend) | |
- CHROMA_PERSIST_DIRECTORY=./chroma_db | |
- UPLOAD_DIR=./uploads | |
# other settings | |
- MAX_FILE_SIZE=10485760 | |
- ALLOWED_EXTENSIONS=[".pdf"] | |
- BACKEND_CORS_ORIGINS=["http://localhost:3000","http://localhost:3001", | |
"http://127.0.0.1:3000","http://127.0.0.1:3001"] | |
env_file: | |
- ./backend/.env # optional extra secrets | |
# ββ Persist data on host in the same structure you already have ββ | |
volumes: | |
- ./backend/uploads:/app/backend/uploads | |
- ./backend/chroma_db:/app/backend/chroma_db | |
- ./backend/pdf_chatbot.db:/app/backend/pdf_chatbot.db | |
restart: unless-stopped | |
frontend: | |
build: | |
context: ./frontend | |
dockerfile: Dockerfile | |
ports: | |
- "3000:3000" | |
environment: | |
- NEXT_PUBLIC_API_URL=http://localhost:8000 | |
env_file: | |
- ./frontend/.env | |
depends_on: | |
- backend | |
restart: unless-stopped | |