Skip to content

Commit

Permalink
Added instructions to run docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
mooshu1x2 committed Sep 19, 2016
1 parent b6c98d1 commit e558167
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Expand Up @@ -26,6 +26,10 @@ setup_tools
# Flask instance folder
instance/

# Docker stuff
es/
userale/

# Scrapy stuff:
.scrapy

Expand Down
30 changes: 28 additions & 2 deletions docs/source/installation.rst
Expand Up @@ -96,8 +96,34 @@ Deactivate environment

$ deactivate

Deployment
----------
Running Apache Distill on Docker Compose
----------------------------------------

From the project directory, start up Apache Distill in the background.

::

$ docker-compose up -d
Starting elastic
Starting logstash
Starting kibana
Starting distill
$ docker-compose ps
Name Command State Ports
--------------------------------------------------------------------------------------------------
distill /bin/sh -c python distill/ ... Up 0.0.0.0:8090->8090/tcp
elastic elasticsearch Up 0.0.0.0:9200->9200/tcp, 0.0.0.0:9300->9300/tcp
kibana /tmp/entrypoint.sh Up 0.0.0.0:5601->5601/tcp
logstash logstash -f /etc/logstash/ ... Up

To stop services once you've finished with them:

::
$ docker-compose stop

Deployment with Nginx and Gunicorn
----------------------------------

I will describe a setup with nginx as a web server on Ubuntu. A web server cannot communicate directly with a Flask application such as Apache Distill. Thus gunicorn will be used to act as a medium between the web server and Apache Distill. Gunicorn is like an application web server that will be running behind nginx, and it is WSGI compatible. It can communicate with applications that support WSGI – Flask, Django, etc.

Expand Down

0 comments on commit e558167

Please sign in to comment.