forked from MikiDi/mu-python-template
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Dockerfile
35 lines (27 loc) · 924 Bytes
/
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
FROM tiangolo/meinheld-gunicorn:python3.8
LABEL maintainer="[email protected]"
# Gunicorn Docker config
ENV MODULE_NAME web
ENV PYTHONPATH "/usr/src/app:/app"
ENV WEB_CONCURRENCY "1"
# Overrides the start.sh used in `tiangolo/meinheld-gunicorn`
COPY ./start.sh /start.sh
RUN chmod +x /start.sh
# Template config
ENV APP_ENTRYPOINT web
ENV LOG_LEVEL info
ENV LOG_SPARQL_ALL True
ENV MU_SPARQL_ENDPOINT 'http://database:8890/sparql'
ENV MU_SPARQL_UPDATEPOINT 'http://database:8890/sparql'
ENV MU_APPLICATION_GRAPH 'http://mu.semte.ch/application'
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
ADD . /usr/src/app
RUN ln -s /app /usr/src/app/ext \
&& cd /usr/src/app \
&& pip3 install -r requirements.txt
ONBUILD ADD Dockerfile requirement[s].txt /app/
ONBUILD RUN cd /app/ \
&& if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
ONBUILD ADD . /app/
ONBUILD RUN touch /app/__init__.py