-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (27 loc) · 718 Bytes
/
Dockerfile
File metadata and controls
35 lines (27 loc) · 718 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
26
27
28
29
30
31
32
33
34
35
FROM python:3.11-alpine
WORKDIR /app
# Ставим runtime-библиотеки и build-зависимости
RUN apk add --no-cache \
postgresql-libs \
libffi \
openssl \
&& apk add --no-cache --virtual .build-deps \
gcc \
musl-dev \
python3-dev \
libffi-dev \
openssl-dev \
cargo \
postgresql-dev \
build-base
COPY src/requirements.txt ./requirements.txt
RUN python -m pip install --upgrade pip setuptools wheel \
&& pip install --no-cache-dir -r requirements.txt
RUN apk del .build-deps
COPY src/ ./src/
COPY alembic/ ./alembic/
COPY alembic.ini .
COPY entrypoint.sh .
COPY create_superuser_cli.py .
ENV PYTHONUNBUFFERED=1
ENTRYPOINT ["sh", "entrypoint.sh"]