-
-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathDockerfile.prod
More file actions
47 lines (32 loc) · 1.24 KB
/
Copy pathDockerfile.prod
File metadata and controls
47 lines (32 loc) · 1.24 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
# vim: set syntax=dockerfile :
FROM node:20.19.5-alpine3.22 AS webpack
WORKDIR /src
COPY ./package.json ./package-lock.json .
RUN npm install
COPY ./webpack.config.js .
COPY ./assets/ ./assets/
RUN npm run build:prod
# =============================
FROM python:3.13-slim-bookworm
WORKDIR /app
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
build-essential curl libpcsclite-dev clang llvm pkg-config nettle-dev \
&& rm -rf /var/lib/apt/lists/*
RUN python -m pip install --no-cache-dir --upgrade "pip>=26,<27" && \
python -m pip install --no-cache-dir poetry
# Install Rust (for SequoiaPGP)
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
COPY poetry.lock pyproject.toml .
RUN poetry install --no-root --without dev
COPY scripts/ scripts/
COPY migrations/ migrations/
COPY hushline/ hushline/
COPY --from=webpack /src/hushline/static/img/ ./hushline/static/img/
COPY --from=webpack /src/hushline/static/fonts/ ./hushline/static/fonts/
COPY --from=webpack /src/hushline/static/js/ ./hushline/static/js/
COPY --from=webpack /src/hushline/static/css/ ./hushline/static/css/
ENV FLASK_APP="hushline"
CMD ["./scripts/prod_start.sh"]