Reporting work on dockerization

This commit is contained in:
2023-03-31 17:18:16 +02:00
parent 2e771aa18c
commit f217b9d273
100 changed files with 70 additions and 0 deletions

34
Dockerfile Normal file
View File

@@ -0,0 +1,34 @@
### DEV ENV ###
FROM python:3.9.16-slim-bullseye AS app_dev
ARG APP_UID=1000
ARG APP_GID=1000
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
COPY ./docker/scripts/entrypoint.sh /usr/local/bin/entrypoint
RUN chmod +x /usr/local/bin/entrypoint
WORKDIR /app/
RUN addgroup --system gunicorn --gid ${APP_GID} && adduser --uid ${APP_UID} --system --disabled-login --group gunicorn
RUN apt update && apt install -y netcat libmariadb-dev-compat libmariadb-dev mariadb-client gcc
RUN pip install --upgrade pip
COPY ./app/requirements.txt .
RUN pip install -r requirements.txt
COPY ./app/ .
COPY ./app/updatesdashboard/.env.dev ./updatesdashboard/.env
#ENTRYPOINT tail -f /dev/null
RUN python /app/manage.py makemigrations
RUN python /app/manage.py makemigrations dashboard
RUN python /app/manage.py collectstatic
RUN rm -f ./updatesdashboard/.env
ENTRYPOINT tail -f /dev/null
#ENTRYPOINT ["/usr/local/bin/gunicorn","/app/manage.py","updatesdashboard.wsgi:application"]