forked from scieloorg/opac_proc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
45 lines (36 loc) · 1.49 KB
/
Dockerfile
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
42
43
44
45
FROM python:2.7
ENV PYTHONUNBUFFERED 1
ENV DEBIAN_FRONTEND noninteractive
# Build-time metadata as defined at http://label-schema.org
ARG OPAC_PROC_BUILD_DATE
ARG OPAC_PROC_VCS_REF
ARG OPAC_PROC_WEBAPP_VERSION
ENV OPAC_PROC_BUILD_DATE ${OPAC_PROC_BUILD_DATE}
ENV OPAC_PROC_VCS_REF ${OPAC_PROC_VCS_REF}
ENV OPAC_PROC_WEBAPP_VERSION ${OPAC_PROC_WEBAPP_VERSION}
LABEL org.label-schema.build-date=$OPAC_PROC_BUILD_DATE \
org.label-schema.name="OPAC Proc - development build" \
org.label-schema.description="OPAC Proc main app" \
org.label-schema.url="https://github.com/scieloorg/opac_proc/" \
org.label-schema.vcs-ref=$OPAC_PROC_VCS_REF \
org.label-schema.vcs-url="https://github.com/scieloorg/opac_proc/" \
org.label-schema.vendor="SciELO" \
org.label-schema.version=$OPAC_PROC_WEBAPP_VERSION \
org.label-schema.schema-version="1.0"
RUN apt-get update \
&& apt-get install -qqy --no-install-recommends apt-utils libxml2-utils \
&& rm -rf /var/lib/apt/lists/*
# COPY ./requirements.txt /app/requirements.txt
COPY . /app
RUN pip --no-cache-dir install -r /app/requirements.txt
COPY ./start_worker.sh /start_worker.sh
RUN sed -i 's/\r//' /start_worker.sh \
&& chmod +x /start_worker.sh \
&& chmod -R +x /src/ \
&& chown nobody /start_worker.sh \
&& chown -R nobody /src/
RUN chown -R nobody:nogroup /app
USER nobody
EXPOSE 8000
WORKDIR /app
CMD gunicorn -k gevent --workers 3 --bind 0.0.0.0:8000 webapp:app --chdir=opac_proc/web/ --log-level INFO