Perfect the entrypoint

Previously unexplored entrypoint technology has been explored. Now we
can run commands after the entrypoint completes with the magical "$@"
variable.
This commit is contained in:
ducoterra
2021-03-24 09:15:29 -06:00
parent 11dc31660d
commit b43927c384
9 changed files with 34 additions and 186 deletions

View File

@@ -1,4 +1,6 @@
FROM python:3.8.2
FROM python:3
USER root
WORKDIR /app
COPY config config
@@ -8,10 +10,13 @@ COPY manage.py manage.py
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
COPY scripts scripts
RUN chmod +x scripts/*
ENTRYPOINT ["scripts/entrypoint.sh"]
RUN useradd -ms /bin/bash django
RUN chown -R django .
USER django
RUN python manage.py collectstatic
RUN python manage.py collectstatic --no-input
CMD ["gunicorn","-b",":8000", "-w", "4", "config.wsgi"]
CMD ["scripts/cmd.sh"]