diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..72e294c --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +.git +__pycache__ +*.pyc +*.pyo +*.pyd \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8a31a4c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM python:3.6 + +COPY requirements.txt . + +RUN pip install -r requirements.txt + +COPY gunicorn_config.py . + +COPY source /source + +EXPOSE 5000 + +CMD ["gunicorn", "--chdir", "source", "--config", "./gunicorn_config.py", "flask_app:app"] diff --git a/gunicorn_config.py b/gunicorn_config.py new file mode 100644 index 0000000..8e5b57e --- /dev/null +++ b/gunicorn_config.py @@ -0,0 +1,6 @@ +bind = '0.0.0.0:5000' +workers = 1 +accesslog = '-' +loglevel = 'debug' +capture_output = True +enable_stdio_inheritance = True