forked from scieloorg/opac
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-dev
41 lines (31 loc) · 1.31 KB
/
Dockerfile-dev
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM python:3.5-alpine
ENV PYTHONUNBUFFERED 1
# Build-time metadata as defined at http://label-schema.org
ARG OPAC_BUILD_DATE
ARG OPAC_VCS_REF
ARG OPAC_WEBAPP_VERSION
ENV OPAC_BUILD_DATE ${OPAC_BUILD_DATE}
ENV OPAC_VCS_REF ${OPAC_VCS_REF}
ENV OPAC_WEBAPP_VERSION ${OPAC_WEBAPP_VERSION}
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name="OPAC WebApp - development build" \
org.label-schema.description="OPAC WebApp main app" \
org.label-schema.url="https://github.com/scieloorg/opac/" \
org.label-schema.vcs-ref=$OPAC_VCS_REF \
org.label-schema.vcs-url="https://github.com/scieloorg/opac/" \
org.label-schema.vendor="SciELO" \
org.label-schema.version=$OPAC_WEBAPP_VERSION \
org.label-schema.schema-version="1.0"
RUN apk --update add --no-cache \
git gcc build-base zlib-dev jpeg-dev curl
COPY ./requirements.txt /app/requirements.txt
COPY ./requirements.dev.txt /app/requirements.dev.txt
RUN pip --no-cache-dir install -r /app/requirements.txt && \
pip --no-cache-dir install -r /app/requirements.dev.txt
RUN chown -R nobody:nogroup /app
USER nobody
EXPOSE 8000
WORKDIR /app
HEALTHCHECK --interval=5m --timeout=3s \
CMD curl -f http://localhost:8000/ || exit 1
CMD gunicorn --workers 3 --bind 0.0.0.0:8000 manager:app --chdir=/app/opac --log-level DEBUG