-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (18 loc) · 754 Bytes
/
Copy pathDockerfile
File metadata and controls
25 lines (18 loc) · 754 Bytes
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
FROM python:3.11-slim
WORKDIR /app
# Build deps for psycopg[binary] are bundled, but a few transitive packages
# still want a compiler around for sdist fallback.
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
# Phase A: SQLite is gone. Strip any stray .db files that might have made
# it into the build context so we never accidentally ship one again.
RUN find /app -maxdepth 2 -name "*.db" -delete \
&& find /app -maxdepth 2 -name "*.db-shm" -delete \
&& find /app -maxdepth 2 -name "*.db-wal" -delete
ENV PORT=8000
EXPOSE 8000
ENTRYPOINT ["/app/scripts/docker-entrypoint.sh"]