Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
FredericHeem committed Apr 1, 2018
1 parent 1095d36 commit 14ab58e
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 27 deletions.
12 changes: 7 additions & 5 deletions deploy/ansible/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
Deployment - Ansible
==========

# Requirements
# Minimal Requirements

* [Ansible](http://www.ansible.com/)

Eventually install `vagrant` and `virtualbox` if you desire to install a prod like system on your local machine:

* [VirtualBox](https://www.virtualbox.org/)
* [Vagrant](https://www.vagrantup.com)
* [Ansible](http://www.ansible.com/)


> Ansible scripts are written for the Ubuntu 16.04 or higher
Expand All @@ -14,7 +18,6 @@ Deployment - Ansible
Ansible enables the automation of the installation and configuration of the various stack components:

* Nginx - used as reverse proxy, https, DDOS protection etc ...
* Rabbitmq - the message queue.
* Nodejs
* The node api backend
* The frontend
Expand All @@ -29,7 +32,6 @@ The file [site.yml](site.yml) controls which roles are being deployed:
- 'vars/nginx-vars.yml'
roles:
- nodesource.node
- mrlesmithjr.rabbitmq
- api
- nginx
```
Expand All @@ -49,7 +51,7 @@ api_dir: '{{home}}/{{app_name}}'
mail_signature: "The StarHackIt Team"
```

To edit the production configuration parameters, edit [prod/group_vars/server.yml](prod/group_vars/server.yml):
To set the production configuration parameters, create [prod/group_vars/server.yml](prod/group_vars/server.yml):

```
env_name: production
Expand Down
46 changes: 24 additions & 22 deletions server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,28 +200,6 @@ Here is a typical configuration:
},
```

## Docker containers

### For development
To install the docker containers for the various services such as Redis and Postgres on the local machine, the [Binci](https://github.com/binci/binci) project is being used to containerize the development workflow, see its configuration file: [binci.yml](server/binci.yml)

# cd server
# npm run setup &

To check that the containers are running:

```
# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
290fe4c70fea kiasaki/alpine-postgres "/docker-entrypoint.s" 8 days ago Up 8 days 0.0.0.0:5432->5432/tcp devlab_postgres_frederic_1471545611147
```

### For production

To build a production dockerized system, please use `docker-compose` to build, start and stop containers:

# docker-compose build
# docker-compose up

## Start

Expand Down Expand Up @@ -264,6 +242,7 @@ To open the documentation, simply run

# npm run opendoc


## Mock server

Given the RAML describing of an API, [raml-mocker-server](https://github.com/dmitrisweb/raml-mocker-server) will start responding the web client with data that comply with the API.
Expand All @@ -274,6 +253,29 @@ To start the mock server, run this npm script:

This script launches [mocker-server.js](scripts/mocker-server.js), modify it to eventually change the http port and the `raml` files to select.

## Docker containers

### For development
To install the docker containers for the various services such as Redis and Postgres on the local machine, the [Binci](https://github.com/binci/binci) project is being used to containerize the development workflow, see its configuration file: [binci.yml](server/binci.yml)

# cd server
# npm run setup &

To check that the containers are running:

```
# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
290fe4c70fea kiasaki/alpine-postgres "/docker-entrypoint.s" 8 days ago Up 8 days 0.0.0.0:5432->5432/tcp devlab_postgres_frederic_1471545611147
```

### For production

To build a production dockerized system, please use `docker-compose` to build, start and stop containers:

# docker-compose build
# docker-compose up

# Development

[sequelize-cli](https://github.com/sequelize/cli) helps to manage the database migration and rollback.
Expand Down

0 comments on commit 14ab58e

Please sign in to comment.