Fixed config loading, added Dockerfile

This commit is contained in:
Merijntje Tak
2022-07-10 16:34:53 +02:00
parent 6e8bf94005
commit 5909c88c08
9 changed files with 128 additions and 42 deletions

24
Dockerfile Normal file
View File

@@ -0,0 +1,24 @@
FROM python:alpine AS base
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONFAULTHANDLER 1
FROM base AS python-build
RUN pip install pipenv
COPY Pipfile .
RUN PIPENV_VENV_IN_PROJECT=1 pipenv install --deploy --python /usr/local/bin/python
FROM base AS runtime
# Copy virtual env from python-deps stage
COPY --from=python-build /.venv /.venv
ENV PATH="/.venv/bin:$PATH"
RUN mkdir /app
WORKDIR /app
COPY . /app/
ENTRYPOINT ["/app/main.py"]