9b
This commit is contained in:
1 parent
c4cead9e27
commit
0a871fea22
12 files changed
+1834
-1512
No files matched your search
+16
-1
@@ -1,7 +1,22 @@
|
||||
FROM python:3.12-slim
|
||||
|
||||
# Install PostgreSQL client for psql (needed for startup.sh)
|
||||
RUN apt-get update && apt-get install -y postgresql-client && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install Python dependencies
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copy application code
|
||||
COPY . .
|
||||
|
||||
# Create directories
|
||||
RUN mkdir -p /app/data /app/photos
|
||||
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
|
||||
# Make startup script executable
|
||||
RUN chmod +x /app/startup.sh
|
||||
|
||||
# Use startup script instead of direct uvicorn
|
||||
CMD ["/app/startup.sh"]
|
||||
Reference in new issue
Block a user