Containerize backend api and add erd generator via django-extensions

This commit is contained in:
Keannu Christian Bernasol 2024-11-24 12:25:57 +08:00
parent cf981c3c08
commit 9b78fdd9ae
7 changed files with 72 additions and 1 deletions

19
Dockerfile Normal file
View file

@ -0,0 +1,19 @@
FROM python:3.13.0-bullseye
ENV PYTHONBUFFERED=1
ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /app
COPY . /app/
ADD . /app/
COPY scripts/ /app/scripts/
RUN chmod +x /app/scripts/start.sh
# Install packages
RUN apt update && apt install -y graphviz libgraphviz-dev graphviz-dev
RUN pip3 install --upgrade pip && pip3 install --no-cache-dir -r requirements.txt
# Expose port 8000 for the web server
EXPOSE 8000
ENTRYPOINT [ "/app/scripts/start.sh" ]