dockerizing CrucialNET

This commit is contained in:
Rushil Umaretiya 2021-01-26 22:01:55 -05:00
parent 8e3a337a99
commit 61a87e2b88
No known key found for this signature in database
GPG Key ID: 4E8FAF9C926AF959

28
Dockerfile Normal file
View File

@ -0,0 +1,28 @@
FROM python:3.8-alpine
RUN mkdir -p /home/app
RUN addgroup -S app && adduser -S app -G app
ENV HOME=/home/app
ENV APP_HOME=/home/app/site
RUN mkdir $APP_HOME
WORKDIR $APP_HOME
RUN apk update && apk add libpq postgresql-dev \
gcc python3-dev musl-dev libffi-dev
COPY ./docker-entrypoint.sh $APP_HOME
COPY . $APP_HOME
RUN pip install -r requirements.txt
RUN pip install gunicorn
RUN chown -R app:app $APP_HOME
USER app
EXPOSE 8000
CMD ["gunicorn", "-b", "0.0.0.0:8000", "config.wsgi"]