File tree Expand file tree Collapse file tree 3 files changed +68
-1
lines changed
Expand file tree Collapse file tree 3 files changed +68
-1
lines changed Original file line number Diff line number Diff line change 1+ FROM ubuntu:latest
2+
3+ COPY . /
4+
5+ COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
6+
7+
8+ # ## APT-GET ###
9+
10+ RUN apt-get update
11+ RUN apt-get install -y \
12+ build-essential htop \
13+ python-dev python-pip python-virtualenv \
14+ libxml2-dev libxslt1-dev \
15+ libcurl4-openssl-dev libssl-dev zlib1g-dev libpcre3-dev \
16+ libldap2-dev libsasl2-dev \
17+ libjpeg-dev \
18+ libfreetype6-dev \
19+ postgresql libpq-dev \
20+ npm \
21+ memcached \
22+ supervisor
23+
24+ RUN ln -s /usr/bin/nodejs /usr/bin/node
25+
26+
27+ # ## DEPENDENCIES ###
28+
29+ RUN apt-get install -y libffi-dev && pip install -r requirements.txt
30+ RUN npm install
31+
32+
33+ # ## POSTGRES ####
34+
35+ RUN mkdir -p media/portraits/full media/portraits/thumb media/portraits/badge
36+ USER postgres
37+ RUN /etc/init.d/postgresql start &&\
38+ psql --command 'CREATE USER root;' &&\
39+ createdb -O root fum
40+ USER root
41+ RUN /etc/init.d/postgresql start &&\
42+ ./manage.py migrate --noinput &&\
43+ ./manage.py datamigrate &&\
44+ ./manage.py collectstatic --noinput
45+
46+
47+ # ## SOLR ###
48+
49+
50+
51+
52+ # ##
53+
54+
55+
56+ EXPOSE 8000
57+
58+ CMD ["/usr/bin/supervisord" , "-c" , "/etc/supervisor/supervisord.conf" ]
Original file line number Diff line number Diff line change @@ -106,7 +106,8 @@ def val(v, member):
106106 ldap .set_option (ldap .OPT_X_TLS_REQUIRE_CERT , 0 )
107107
108108 con = ldap .initialize (ldap_server )
109- con .start_tls_s ()
109+ if settings .USE_TLS :
110+ con .start_tls_s ()
110111 con .simple_bind_s (dn ,pw )
111112
112113 # get users from ldap
Original file line number Diff line number Diff line change 1+ [supervisord]
2+ nodaemon=true
3+
4+ [program:fum]
5+ command: ./manage.py runserver --nostatic 0.0.0.0:8080
6+
7+ [program:postgres]
8+ command: service postgresql restart
You can’t perform that action at this time.
0 commit comments