Add Docker build and docker compose file

This commit is contained in:
Lars van Rhijn
2023-10-14 11:21:30 +02:00
parent 4f134ab62a
commit 3d78ca954f
6 changed files with 153 additions and 23 deletions

26
Dockerfile Normal file
View File

@ -0,0 +1,26 @@
FROM python:3.11
MAINTAINER Tartarus Technicie
ENV PYTHONUNBUFFERED 1
ENV DJANGO_SETTINGS_MODULE marietje.settings.production
ENV PATH /root/.poetry/bin:${PATH}
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
WORKDIR /marietje/src
COPY resources/entrypoint.sh /usr/local/bin/entrypoint.sh
COPY poetry.lock pyproject.toml /marietje/src/
RUN \
mkdir --parents /marietje/src/ && \
mkdir --parents /marietje/log/ && \
mkdir --parents /marietje/static/ && \
chmod +x /usr/local/bin/entrypoint.sh && \
\
curl -sSL https://install.python-poetry.org | python3 - && \
export PATH="/root/.local/bin:$PATH" && \
poetry config --no-interaction --no-ansi virtualenvs.create false && \
poetry install --no-interaction --no-ansi --no-dev
COPY marietje /marietje/src/website/