This repository has been archived by the owner on Oct 21, 2022. It is now read-only.
forked from concentricsky/badgr-server
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
55 lines (44 loc) · 1.97 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
46
47
48
49
50
51
52
53
54
55
FROM centos:7
LABEL image="badgr-server"
LABEL versie="0.1"
LABEL datum="2018 03 02"
RUN yum -y install epel-release git git-core mlocate
RUN yum -y install cairo
RUN yum -y install python-virtualenv gcc python-pip python-devel mysql-devel libjpeg-turbo libjpeg-turbo-devel zlib-devel openldap-devel cyrus-sasl-devel swig libxslt-devel automake autoconf libtool libffi-devel libyaml-devel libxml2 openssl-devel sudo curl wget supervisor
RUN yum -y install gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison iconv-devel which
RUN pip install --upgrade pip
# Set correct timezone
RUN ln -sf /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime
# setup webserver
RUN pip install gunicorn
RUN mkdir /var/log/gunicorn
RUN touch /var/log/gunicorn/error.log && \
touch /var/log/gunicorn/access.log
# setup proxyserver
RUN yum -y update && \
yum -y install epel-release &&\
yum -y install nginx
ADD config/nginx/nginx.conf /etc/nginx/nginx.conf
ADD config/nginx/nginx_badgr.conf /etc/nginx/conf.d/nginx_badgr.conf
#RUN mkdir /var/log/nginx
RUN touch /var/log/nginx/error.log && \
touch /var/log/nginx/access.log
ADD badgr/badgr-server /var/badgr/code
ADD config/badgr/settings_local.py /var/badgr/code/apps/mainsite/settings_local.py
RUN mkdir /var/badgr/code/cert/
ADD config/nginx/certs/chained-pilot-san.edubadges.nl.pem /var/badgr/code/cert/chained-pilot-san.edubadges.nl.pem
ADD config/nginx/certs/pilot-san.edubadges.nl.key /var/badgr/code/cert/pilot-san.edubadges.nl.key
RUN cd /var/badgr/code && \
pip install -r requirements.txt && \
pip install -r apps/ims/requirements.txt
RUN cd /var/badgr/ && \
virtualenv env && \
source env/bin/activate
# for debugging
#RUN python -m pip install --upgrade pip setuptools wheel
#RUN pip install ptvsd
#COPY config/badgr/manage.py /var/badgr/code
ADD entrypoint/supervisord.conf /etc/supervisord.conf
EXPOSE 80 443 5678
CMD ["/usr/bin/supervisord"]
~