Commit ·
fb30b3d
1
Parent(s): cfa82c7
??
Browse files- Dockerfile +3 -1
- app.py +1 -0
Dockerfile
CHANGED
|
@@ -27,12 +27,14 @@
|
|
| 27 |
# # Run FastAPI with Uvicorn
|
| 28 |
# CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
| 29 |
|
|
|
|
| 30 |
FROM python:3.10-slim
|
| 31 |
|
| 32 |
-
#
|
| 33 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 34 |
libgl1 \
|
| 35 |
libglib2.0-0 \
|
|
|
|
| 36 |
&& rm -rf /var/lib/apt/lists/*
|
| 37 |
|
| 38 |
# Non-root user
|
|
|
|
| 27 |
# # Run FastAPI with Uvicorn
|
| 28 |
# CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
| 29 |
|
| 30 |
+
# Dockerfile
|
| 31 |
FROM python:3.10-slim
|
| 32 |
|
| 33 |
+
# + ca-certificates (needed for Postgres TLS)
|
| 34 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 35 |
libgl1 \
|
| 36 |
libglib2.0-0 \
|
| 37 |
+
ca-certificates \
|
| 38 |
&& rm -rf /var/lib/apt/lists/*
|
| 39 |
|
| 40 |
# Non-root user
|
app.py
CHANGED
|
@@ -658,6 +658,7 @@ import json
|
|
| 658 |
import base64
|
| 659 |
import ssl as _ssl # ✅ proper SSL context for asyncpg
|
| 660 |
|
|
|
|
| 661 |
# Async + performance
|
| 662 |
import asyncio
|
| 663 |
import asyncpg
|
|
|
|
| 658 |
import base64
|
| 659 |
import ssl as _ssl # ✅ proper SSL context for asyncpg
|
| 660 |
|
| 661 |
+
|
| 662 |
# Async + performance
|
| 663 |
import asyncio
|
| 664 |
import asyncpg
|