35 lines
977 B
Docker
35 lines
977 B
Docker
### 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"]
|