buku/Dockerfile
Ameya Shenoy 4e13df9738 Docker compose (#417)
* feat(docker): add healthcheck to container

Signed-off-by: Ameya Shenoy <shenoy.ameya@gmail.com>

* feat(docker): add docker-compose files

Signed-off-by: Ameya Shenoy <shenoy.ameya@gmail.com>
2019-09-24 07:50:06 +05:30

28 lines
568 B
Docker

FROM python:alpine
MAINTAINER Ameya Shenoy "shenoy.ameya@gmail.com"
ENV BUKUSERVER_PORT=5001
COPY . /Buku
RUN set -ex \
&& apk add --no-cache --virtual .build-deps \
gcc \
openssl-dev \
musl-dev \
libffi-dev \
&& pip install -U --no-cache-dir \
pip \
gunicorn \
/Buku[server] \
&& apk del .build-deps \
&& rm -rf /Buku
HEALTHCHECK --interval=1m --timeout=10s \
CMD nc -z localhost ${BUKUSERVER_PORT} || exit 1
ENTRYPOINT gunicorn --bind 0.0.0.0:${BUKUSERVER_PORT} "bukuserver.server:create_app()"
EXPOSE ${BUKUSERVER_PORT}