Spaces:
Sleeping
Sleeping
sqlite and docker issues
Browse filesFiles changed (2)
- Dockerfile+14-5
- docker-compose.yml+9-11
12345678910FROM python:3.12-slimCOPY ./ ./# Install dependenciesRUN pip install --no-cache --upgrade -r /requirements.txt# Start the applicationCMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "2"]12345678910111213141516171819FROM python:3.12-slim# Set working directoryWORKDIR /app# Copy requirements and install dependenciesCOPY requirements.txt .RUN pip install --no-cache-dir -r requirements.txt# Copy schema, backend files, and environment configCOPY backend/schema.sql .COPY backend/ backend/COPY .env* ./# Expose portEXPOSE 7860# Start the applicationCMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "2"]
12345678910111213141516171819services:api: # Changed from 'web' to 'api'build: .ports:- "${API_PORT:-8000}:8000"volumes:- ./output:/code/outputenvironment:- API_KEY=${API_KEY}- OLLAMA_API_KEY=${OLLAMA_API_KEY}- API_PORT=${API_PORT}env_file:- .envrestart: unless-stoppeddevelop:watch:- action: syncpath: .target: /code1234567891011121314151617services:backend:build: .ports:- "8000:8000"volumes:- ./backend:/app/backend- ./backend/schema.sql:/app/schema.sql- ./ai_tutor.db:/app/ai_tutor.dbenvironment:- API_KEY=${API_KEY}- BASE_URL=${BASE_URL}- MODEL=${MODEL:-gemini-2.0-flash}- DATABASE_PATH=./ai_tutor.dbenv_file:- .envrestart: unless-stopped
Dockerfile+14-5
docker-compose.yml+9-11