Skip to content

Commit e0be455

Browse files
author
Topi Paavilainen
committed
build succeeds and docker image can be run
1 parent 26e5202 commit e0be455

File tree

3 files changed

+25
-14
lines changed

3 files changed

+25
-14
lines changed

Dockerfile

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
FROM ubuntu:latest
1+
FROM ubuntu:16.04
2+
MAINTAINER Topi Paavilainen <topi.paavilainen@futurice.com>
23

3-
COPY . /
4-
5-
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
4+
WORKDIR /opt/app
65

76

87
### APT-GET ###
@@ -19,18 +18,21 @@ RUN apt-get install -y \
1918
postgresql libpq-dev \
2019
npm \
2120
memcached \
21+
openjdk-8-jdk \
2222
supervisor
2323

2424
RUN ln -s /usr/bin/nodejs /usr/bin/node
2525

2626

2727
### DEPENDENCIES ###
2828

29+
COPY requirements.txt /opt/app/
2930
RUN apt-get install -y libffi-dev && pip install -r requirements.txt
30-
RUN npm install
3131

32+
COPY . /opt/app/
33+
RUN npm install
3234

33-
### POSTGRES ####
35+
### POSTGRES ###
3436

3537
RUN mkdir -p media/portraits/full media/portraits/thumb media/portraits/badge
3638
USER postgres
@@ -46,13 +48,16 @@ RUN /etc/init.d/postgresql start &&\
4648

4749
### SOLR ###
4850

51+
RUN apt-get install -y wget unzip
52+
RUN wget -q http://archive.apache.org/dist/lucene/solr/3.6.2/apache-solr-3.6.2.zip
53+
RUN unzip apache-solr-3.6.2.zip
54+
RUN ./manage.py build_solr_schema > schema.xml
55+
RUN cp schema.xml apache-solr-3.6.2/example/solr/conf/
56+
RUN cp apache-solr-3.6.2/example/solr/conf/stopwords.txt apache-solr-3.6.2/example/solr/conf/stopwords_en.txt
57+
RUN export PATH=$PATH:/apache-solr-3.6.2/example/solr/conf/
4958

5059

51-
52-
###
53-
54-
55-
56-
EXPOSE 8000
60+
EXPOSE 8080
61+
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
5762

5863
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]

fum/settings/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393

9494
'django_extensions',
9595
'crispy_forms',
96-
#'haystack',
96+
'haystack',
9797
'djangohistory',
9898
'rest_framework',
9999
'rest_framework_docs',
@@ -203,7 +203,7 @@
203203

204204
# LDAP
205205
import ldap
206-
USE_TLS = True
206+
USE_TLS = False
207207
LDAP_CLASS = 'fum.ldap_helpers.PoolLDAPBridge'
208208
LDAP_RETRY_DELAY = 1
209209
LDAP_RETRY_MAX = 3

supervisord.conf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ nodaemon=true
33

44
[program:fum]
55
command: ./manage.py runserver --nostatic 0.0.0.0:8080
6+
environment=REMOTE_USER="emkos_test01"
67

78
[program:postgres]
89
command: service postgresql restart
10+
11+
[program:solr]
12+
command: java -jar start.jar
13+
directory: /opt/app/apache-solr-3.6.2/example/
14+
environment=PATH=$PATH:/opt/app/apache-solr-3.6.2/example/solr/conf/

0 commit comments

Comments
 (0)