forked from samldd/mu-python-template
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
34 lines (25 loc) · 863 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
FROM tiangolo/meinheld-gunicorn:python3.8
MAINTAINER Michaël Dierick "[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 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 . /app/
ONBUILD RUN touch /app/__init__.py
ONBUILD RUN cd /app/ \
&& if [ -f requirements.txt ]; then pip install -r requirements.txt; fi