Use alpine python and gunicorn

Adding docker_settings.py which reads environment variables
to allows for environment variable to be passed to the
container
This commit is contained in:
Mike Terzo
2016-10-25 22:24:42 -04:00
parent 72a194c82e
commit b96e76ff10
4 changed files with 181 additions and 2 deletions

View File

@@ -1,3 +1,12 @@
FROM grahamdumpleton/mod-wsgi-docker:python-2.7-onbuild
CMD [ "wsgi.py" ]
FROM python:2.7-alpine
ENV PUPPETBOARD_PORT 80
ENV PUPPETBOARD_SETTINGS docker_settings.py
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY requirements-docker.txt /usr/src/app/
RUN pip install --no-cache-dir -r requirements-docker.txt
COPY . /usr/src/app
CMD gunicorn -b 0.0.0.0:${PUPPETBOARD_PORT} --access-logfile=/dev/stdout puppetboard.app:app