Spaces:
Build error
Build error
Youngger9765
更新 .gitignore 以排除 .env.example 和新增上傳及儲存相關的檔案類型;擴充 requirements.txt,新增多個依賴項以支援 PDF 處理、資料庫連接及測試工具;修改 main.py,更新 FastAPI 應用程式的標題、版本及描述,並加入資料庫初始化的生命週期管理。
5db257a
| version: '3.8' | |
| services: | |
| postgres: | |
| image: ankane/pgvector:latest | |
| environment: | |
| POSTGRES_USER: user | |
| POSTGRES_PASSWORD: password | |
| POSTGRES_DB: career_app | |
| ports: | |
| - "5432:5432" | |
| volumes: | |
| - postgres_data:/var/lib/postgresql/data | |
| - ./backend/migrations:/docker-entrypoint-initdb.d | |
| healthcheck: | |
| test: ["CMD-SHELL", "pg_isready -U user"] | |
| interval: 5s | |
| timeout: 5s | |
| retries: 5 | |
| backend: | |
| build: | |
| context: . | |
| dockerfile: Dockerfile.dev.backend | |
| ports: | |
| - "8000:8000" | |
| volumes: | |
| - ./backend:/app/backend | |
| - ./uploads:/app/uploads | |
| environment: | |
| - DATABASE_URL=postgresql://user:password@postgres:5432/career_app | |
| - PYTHONUNBUFFERED=1 | |
| depends_on: | |
| postgres: | |
| condition: service_healthy | |
| env_file: | |
| - .env | |
| frontend: | |
| build: | |
| context: . | |
| dockerfile: Dockerfile.dev.frontend | |
| ports: | |
| - "3000:3000" | |
| volumes: | |
| - ./frontend:/app | |
| - /app/node_modules | |
| environment: | |
| - NEXT_PUBLIC_API_URL=http://localhost:8000 | |
| volumes: | |
| postgres_data: |