File: Dockerfile

package info (click to toggle)
buku 4.5+ds-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,032 kB
  • sloc: python: 5,727; sh: 92; makefile: 11
file content (27 lines) | stat: -rw-r--r-- 568 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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}