Skip to content

Commit

Permalink
Merge pull request #3241 from jeff1evesque/feature-3240
Browse files Browse the repository at this point in the history
#3240: Document docker-compose alternate
  • Loading branch information
jeff1evesque committed Jun 10, 2018
2 parents fbb00b5 + d56fdb8 commit 7bca100
Show file tree
Hide file tree
Showing 7 changed files with 115 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
!factory.py
!license.md
!contributing.md
!{docker-compose,rancher-template}.development.yml
!docker-compose{.rancher}.yml
!rancher-template.yml
!/install_rancher
!/puppet/
!/test
Expand Down
19 changes: 19 additions & 0 deletions doc/installation/docker-compose.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
==============
Docker Compose
==============

The development ecosystem for this application, can be run via |docker-compose|_.
This allows various respective docker containers, to be managed consistently.
However, before proceeding, it is important to follow the |docker|_ , and
|docker-compose|_ installation guide.

Once docker-compose has installed, simply run ``docker-compose up``, in the
root directory of this cloned project. This will allow the web-application to
be accessible on the host machine, via https://localhost:8080. Similarly, the
programmatic-api will be accessible at https://localhost:9090.

.. |docker-compose| replace:: docker-compose
.. _docker-compose: https://docs.docker.com/compose/install/#install-compose

.. |docker| replace:: docker
.. _docker: https://docs.docker.com/install/
2 changes: 1 addition & 1 deletion doc/installation/rancher.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Rancher
=======

The development ecosystem for this application, implements the |rancher|_ orchestration.
The development ecosystem for this application, can be run via the |rancher|_ orchestration.
This allows various respective docker containers, to be managed in a consistent platform,
where users can properly manage respective services of this application. However, before
proceeding, it is important to follow the docker |installation|_ guide, for the corresponding
Expand Down
File renamed without changes.
90 changes: 90 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
version: '3'
services:
mariadb:
hostname: mariadb
image: jeff1evesque/ml-mariadb:0.7
volumes:
- mariadb:/var/lib/mysql

mongodb:
hostname: mongodb
image: jeff1evesque/ml-mongodb:0.7
volumes:
- mongodb:/data/db

redis:
hostname: redis
image: jeff1evesque/ml-redis:0.7
volumes:
- redis:/data

browserify:
hostname: browserify
image: jeff1evesque/ml-browserify:0.7
volumes:
- ./src/jsx:/var/machine-learning/src/jsx
- ./interface/static/js:/var/machine-learning/interface/static/js
- ./test/jest:/var/machine-learning/test/jest

sass:
hostname: sass
image: jeff1evesque/ml-sass:0.7
volumes:
- ./src/scss:/var/machine-learning/src/scss
- ./interface/static/css:/var/machine-learning/interface/static/css

webserver-api:
hostname: webserver-api
image: jeff1evesque/ml-webserver:0.7
command: ['api', '0.0.0.0', '6001', '6']
start_on_create: true
volumes:
- ./log:/var/machine-learning/log
- ./interface/__init__.py:/var/machine-learning/interface/__init__.py
- ./interface/views_api.py:/var/machine-learning/interface/views_api.py
- ./hiera:/var/machine-learning/hiera
- ./brain:/var/machine-learning/brain
- ./test:/var/machine-learning/test
- ./test/backend:/var/machine-learning/test/backend
- ./test/live_server:/var/machine-learning/test/live_server
- ./app.py:/var/machine-learning/app.py
- ./factory.py:/var/machine-learning/factory.py
- ./__init__.py:/var/machine-learning/__init__.py

webserver-web:
hostname: webserver-web
image: jeff1evesque/ml-webserver:0.7
command: ['web', '0.0.0.0', '5001', '6']
volumes:
- ./log:/var/machine-learning/log
- ./interface/__init__.py:/var/machine-learning/interface/__init__.py
- ./interface/views_web.py:/var/machine-learning/interface/views_web.py
- ./interface/templates:/var/machine-learning/interface/templates
- ./interface/static/js:/var/machine-learning/interface/static/js
- ./interface/static/css:/var/machine-learning/interface/static/css
- ./hiera:/var/machine-learning/hiera
- ./brain:/var/machine-learning/brain
- ./test/linter:/var/machine-learning/test/linter
- ./test/lint:/var/machine-learning/test/lint
- ./app.py:/var/machine-learning/app.py
- ./factory.py:/var/machine-learning/factory.py

nginx-api:
hostname: nginx-api
image: jeff1evesque/ml-nginx-api:0.7
ports:
- 9090:6000/tcp

nginx-web:
hostname: nginx-web
image: jeff1evesque/ml-nginx-web:0.7
ports:
- 8080:5000/tcp

volumes:
mariadb:
driver: local
mongodb:
driver: local
redis:
driver: local
6 changes: 3 additions & 3 deletions install_rancher
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ WINDOWS_VERSION='10'

## stack configurations
RANCHER_STACK='MLStack'
DOCKER_COMPOSE='docker-compose.development.yml'
RANCHER_COMPOSE='rancher-compose.development.yml'
RANCHER_COMPOSE_TEMPLATE='rancher-template.development.yml'
DOCKER_COMPOSE='docker-compose.rancher.yml'
RANCHER_COMPOSE='rancher-compose.yml'
RANCHER_COMPOSE_TEMPLATE='rancher-template.yml'

## cleanup docker volumes
rm -rf data
Expand Down
File renamed without changes.

0 comments on commit 7bca100

Please sign in to comment.