Skip to content

Commit ca3d1a5

Browse files
author
Topi Paavilainen
committed
works now on docker for mac beta
1 parent 03d41ea commit ca3d1a5

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

Dockerfile

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ RUN apt-get install -y \
2323

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

26+
RUN apt-get install -y wget unzip
27+
RUN wget -q http://archive.apache.org/dist/lucene/solr/3.6.2/apache-solr-3.6.2.zip
28+
RUN unzip apache-solr-3.6.2.zip
2629

2730
### DEPENDENCIES ###
2831

@@ -40,24 +43,17 @@ RUN /etc/init.d/postgresql start &&\
4043
psql --command 'CREATE USER root;' &&\
4144
createdb -O root fum
4245
USER root
43-
RUN /etc/init.d/postgresql start &&\
44-
./manage.py migrate --noinput &&\
45-
./manage.py datamigrate &&\
46-
./manage.py collectstatic --noinput
4746

4847

4948
### SOLR ###
5049

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
5450
RUN ./manage.py build_solr_schema > schema.xml
5551
RUN cp schema.xml apache-solr-3.6.2/example/solr/conf/
5652
RUN cp apache-solr-3.6.2/example/solr/conf/stopwords.txt apache-solr-3.6.2/example/solr/conf/stopwords_en.txt
5753
RUN export PATH=$PATH:/apache-solr-3.6.2/example/solr/conf/
5854

5955

60-
EXPOSE 8080
56+
EXPOSE 8000
6157
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
6258

63-
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
59+
CMD ["bash", "start.sh"]

start.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
/etc/init.d/postgresql start &&\
4+
./manage.py migrate --noinput &&\
5+
./manage.py datamigrate &&\
6+
./manage.py collectstatic --noinput
7+
8+
/etc/init.d/postgresql stop
9+
10+
/usr/bin/supervisord -c /etc/supervisor/supervisord.conf

supervisord.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
nodaemon=true
33

44
[program:fum]
5-
command: ./manage.py runserver --nostatic 0.0.0.0:8080
5+
command: ./manage.py runserver --nostatic 0.0.0.0:8000
66
environment=REMOTE_USER="emkos_test01"
77

88
[program:postgres]
9-
command: service postgresql restart
9+
command: /etc/init.d/postgresql start
1010

1111
[program:solr]
1212
command: java -jar start.jar

0 commit comments

Comments
 (0)