2021-10-12 03:13:25 +02:00
|
|
|
# syntax=docker/dockerfile:1
|
2023-12-13 11:18:01 +01:00
|
|
|
FROM python:alpine3.19
|
2021-10-12 03:13:25 +02:00
|
|
|
COPY . /halfapi
|
|
|
|
WORKDIR /halfapi
|
2023-12-13 11:18:01 +01:00
|
|
|
ENV VENV_DIR=/opt/venv
|
|
|
|
RUN mkdir -p $VENV_DIR
|
|
|
|
RUN python -m venv $VENV_DIR
|
|
|
|
RUN $VENV_DIR/bin/pip install gunicorn uvicorn
|
|
|
|
RUN $VENV_DIR/bin/pip install .
|
|
|
|
RUN ln -s $VENV_DIR/bin/halfapi /usr/local/bin/
|
|
|
|
CMD $VENV_DIR/bin/gunicorn halfapi.app
|