forked from HumanBrainProject/hbp-validation-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
66 lines (48 loc) · 1.84 KB
/
Dockerfile
File metadata and controls
66 lines (48 loc) · 1.84 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#
# Build an image for deploying the Brain Simulation Platform Validation Service
#
# To build the image, from the parent directory:
# docker build -t hbp_validation_service -f validation_service/Dockerfile .
#
# To run the application:
# docker run -d -p 443 hbp_validation_service
#473
FROM debian:jessie-slim
#605
# FROM bitnami/minideb:stretch
#533
# FROM monsantoco/min-jessie:latest
#459
#FROM philcryer/min-wheezy:latest
#531
#FROM cgswong/min-jessie:latest
#530
#FROM philcryer/min-jessie:latest
MAINTAINER Andrew Davison <andrew.davison@unic.cnrs-gif.fr>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update --fix-missing; apt-get -y -q install python-dev python-pip sqlite3 python-psycopg2 supervisor build-essential nginx-extras python-yaml python-requests python-markdown
RUN unset DEBIAN_FRONTEND
RUN pip install --upgrade pip
RUN pip install uwsgi
RUN echo "" >> /var/log/django.log
ENV SITEDIR /home/docker/site
COPY validation_service $SITEDIR
COPY packages /home/docker/packages
COPY model_validation_api /home/docker/model_validation_api
# COPY build_info.json $SITEDIR
WORKDIR /home/docker
RUN pip install -r $SITEDIR/requirements.txt
ENV PYTHONPATH /home/docker:/home/docker/site:/usr/local/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages
WORKDIR $SITEDIR
RUN if [ -f $SITEDIR/db.sqlite3 ]; then rm $SITEDIR/db.sqlite3; fi
RUN python manage.py check
# RUN python manage.py collectstatic --noinput
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
RUN rm /etc/nginx/sites-enabled/default
RUN ln -s $SITEDIR/deployment/nginx-app.conf /etc/nginx/sites-enabled/
RUN ln -s $SITEDIR/deployment/supervisor-app.conf /etc/supervisor/conf.d/
RUN ln -sf /dev/stdout /var/log/nginx/access.log
RUN ln -sf /dev/stderr /var/log/nginx/error.log
EXPOSE 443
# EXPOSE 8000
CMD ["supervisord", "-n", "-c", "/etc/supervisor/conf.d/supervisor-app.conf"]