Last active
May 8, 2018 10:10
-
-
Save wawhal/7b873c12e26365ba4ee6ff92be29e963 to your computer and use it in GitHub Desktop.
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
# start with a base container with python installed | |
FROM python:3 | |
# install required debian packages | |
# add any package that is required after `python-dev`, end the line with \ | |
RUN apt-get update && apt-get install -y \ | |
build-essential \ | |
python-dev \ | |
&& rm -rf /var/lib/apt/lists/* | |
# install requirements | |
COPY src/requirements.txt /tmp/requirements.txt | |
RUN pip3 install -r /tmp/requirements.txt | |
# set /app as working directory | |
WORKDIR /app | |
# copy current directory to /app | |
COPY . /app | |
# run the flask app with gunicorn | |
# port is configured through the gunicorn config file | |
# reloading is set to tru in the gunicorn config file | |
CMD ["gunicorn", "--config", "./conf/gunicorn_config.py", "src:app"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment