This repository has been archived by the owner on Jan 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Dockerfile
58 lines (50 loc) · 1.63 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
56
57
58
FROM debian:jessie
RUN apt-get update && apt-get install -y nano debconf-utils mysql-client libmysqlclient-dev gnupg wget git gcc g++ make python-dev libxml2-dev libxslt1-dev zlib1g-dev gettext curl wget openssl ruby ruby-dev gem
RUN git clone https://github.com/sass/sass.git
WORKDIR /sass
RUN gem build sass.gemspec
RUN gem install sass-*.gem
WORKDIR /
RUN wget -q --no-check-certificate -O- https://bootstrap.pypa.io/get-pip.py | python
RUN wget -O- https://deb.nodesource.com/setup_4.x | bash -
RUN apt-get install -y nodejs
RUN npm install -g pleeease-cli
RUN git clone https://github.com/DMOJ/site.git
WORKDIR /site
RUN git submodule init
RUN git submodule update
RUN pip install -r requirements.txt
RUN pip install mysqlclient
RUN pip install django_select2
RUN npm install qu ws simplesets
RUN pip install websocket-client
WORKDIR /site/dmoj
COPY local_settings.py /site/dmoj
WORKDIR /site
RUN sh make_style.sh
RUN echo yes | python manage.py collectstatic
RUN python manage.py compilemessages
RUN python manage.py compilejsi18n
RUN mkdir /uwsgi
WORKDIR /uwsgi
COPY uwsgi.ini /uwsgi
RUN curl http://uwsgi.it/install | bash -s default $PWD/uwsgi
RUN apt-get install -y supervisor
COPY site.conf /etc/supervisor/conf.d/site.conf
COPY bridged.conf /etc/supervisor/conf.d/bridged.conf
COPY wsevent.conf /etc/supervisor/conf.d/wsevent.conf
COPY config.js /site/websocket
RUN apt-get install -y nginx
RUN rm /etc/nginx/sites-enabled/*
ADD nginx.conf /etc/nginx/sites-enabled
RUN service nginx reload
COPY loaddata.sh /site
RUN service supervisor start
RUN service nginx start
WORKDIR /site
EXPOSE 80
EXPOSE 9999
EXPOSE 9998
EXPOSE 15100
EXPOSE 15101
EXPOSE 15102