Skip to content

Commit

Permalink
Add description for installment
Browse files Browse the repository at this point in the history
  • Loading branch information
svenstm committed May 25, 2018
1 parent a79e9df commit 7d9b227
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 3 deletions.
33 changes: 33 additions & 0 deletions Dockerrun.aws.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"AWSEBDockerrunVersion": 2,
"containerDefinitions": [
{
"name": "webserver",
"image": "legalthings/webserver",
"essential": true,
"memory": 128,
"portMappings": [
{
"hostPort": 80,
"containerPort": 3000
}
],
"links": [
"legalevents",
"legalflow"
]
},
{
"name": "legalflow",
"image": "legalthings/legalflow",
"essential": true,
"memory": 128
},
{
"name": "legalevents",
"image": "legalthings/legalevents",
"essential": true,
"memory": 128
}
]
}
35 changes: 34 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,43 @@ Requirements

_You can optain the latest version of `docker-compose` using pip._

Start
Run on a (virtual) machine
---

Running the node using docker compose it will initiate all service including a mongodb database. Beware that if you
destory the mongodb container all your data will be lost.

docker-compose up

Docker compose is configured to run the node on a local machine. If you are running the node a hosted machine and it needs
to be accessible over to internet you will have to change the port mapping in the `docker-compose.yml` to

ports:
- "80:3000"

This way the node will be accessible via port 80.

Or you can use a reverse proxy like NGINX to make the node publicly available. This is highly recommended.

Run in AWS Elastic Beanstalk
---
Running the node using AWS Elastic Beanstalk (EB) it will only install the services on a machine. You will have to provide
a Mongo Database your self.

Take to following steps to install the node on EB:

1. Zip the Dockerrun.aws.json file
2. Create an application
3. Inside the created application, create an environment: `webserver environment`
4. Select following settings:
- Platform: Multi-container Docker
- Upload the zipped file
5. Configure more options
6. Software -> Environment properties:
- Name: `APPLICATION_ENV`, Value: `lto`
- Name: `MONGO_DB`, Value: `"<Your mongodb connection string>"`

Now your node should good to go!

Server
---
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ services:
container_name: legalflow
image: legalthings/legalflow
environment:
- APPLICATION_ENV=dev.docker
- APPLICATION_ENV=lto
networks:
- lto
depends_on:
Expand All @@ -24,7 +24,7 @@ services:
container_name: legalevents
image: legalthings/legalevents
environment:
- APPLICATION_ENV=dev.docker
- APPLICATION_ENV=lto
networks:
- lto
depends_on:
Expand Down

0 comments on commit 7d9b227

Please sign in to comment.