Created
May 12, 2021 05:51
-
-
Save rririanto/b93424668728bb9d288bf8ca7f0bb606 to your computer and use it in GitHub Desktop.
dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pull official python alpine image | |
FROM python:3.7 | |
# Set Environment Variable | |
ENV PYTHONUNBUFFERED 1 | |
ENV C_FORCE_ROOT true | |
RUN mkdir -p /opt/django/dev | |
# Creating Work Directory | |
WORKDIR /opt/django/dev | |
# Adding mandatory packages to docker | |
RUN apt-get -q update && apt-get install -y --no-install-recommends \ | |
libpq-dev && rm -rf /var/lib/apt/lists/* | |
# Update pip | |
RUN pip install --upgrade pip | |
# Installing requirements.pip from project | |
ADD fweb/requirements/production.txt /opt/django/dev/ | |
RUN pip install --no-cache-dir -r production.txt | |
ADD fweb/ /opt/django/dev/ | |
# CMD will run when this dockerfile is running | |
CMD ["sh", "-c", "gunicorn -b :80 --workers=3 config.wsgi:application"] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment