File size: 811 Bytes
7378c28
b20ae17
7378c28
b20ae17
862de76
 
 
 
d5f9c51
862de76
 
 
7378c28
b20ae17
862de76
 
 
 
4655f6a
862de76
7378c28
4655f6a
862de76
 
 
 
d5f9c51
 
862de76
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM python:3.10-slim

WORKDIR /app

# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
    build-essential \
    sqlite3 \
    libffi-dev \
    && rm -rf /var/lib/apt/lists/*

# Copy requirements first for better caching
COPY requirements.txt .

# Install Python dependencies
RUN pip install --no-cache-dir --upgrade pip && \
    pip install --no-cache-dir -r requirements.txt && \
    pip install --no-cache-dir libsql-experimental==0.0.49 libsql-client==0.2.0

# Copy the rest of the application
COPY . .

# Set environment variables
ENV PORT=7860

# Print installed packages for debugging
RUN pip list | grep libsql && \
    pip list | grep argon2

# Use the PORT environment variable in the CMD
CMD ["sh", "-c", "uvicorn main:app --host 0.0.0.0 --port $PORT"]