-
-
Notifications
You must be signed in to change notification settings - Fork 321
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (22 loc) · 680 Bytes
/
Copy pathDockerfile
File metadata and controls
29 lines (22 loc) · 680 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
FROM python:3.14.0-alpine
LABEL org.opencontainers.image.authors="shenoy.ameya@gmail.com"
ENV BUKUSERVER_PORT=5001
COPY . /buku
ARG CRYPTOGRAPHY_DONT_BUILD_RUST=1
RUN set -ex \
&& apk add --no-cache --virtual .build-deps \
gcc \
openssl-dev \
musl-dev \
libffi-dev \
&& pip install -U --no-cache-dir \
pip \
gunicorn \
/buku[server] \
&& apk del .build-deps \
&& echo "import sys; bind = '0.0.0.0:${BUKUSERVER_PORT}'" > 'gunicorn.conf.py' \
&& rm -rf /buku
HEALTHCHECK --interval=1m --timeout=10s \
CMD nc -z 127.0.0.1 ${BUKUSERVER_PORT} || exit 1
ENTRYPOINT ["gunicorn", "bukuserver.server:create_app()"]
EXPOSE ${BUKUSERVER_PORT}