diff --git a/Dockerrun.aws.json b/Dockerrun.aws.json new file mode 100644 index 0000000..eaea8cb --- /dev/null +++ b/Dockerrun.aws.json @@ -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 + } + ] +} diff --git a/README.md b/README.md index 21259b4..6ab2384 100644 --- a/README.md +++ b/README.md @@ -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: `""` + +Now your node should good to go! Server --- diff --git a/docker-compose.yml b/docker-compose.yml index 420d421..c8b9850 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,7 +14,7 @@ services: container_name: legalflow image: legalthings/legalflow environment: - - APPLICATION_ENV=dev.docker + - APPLICATION_ENV=lto networks: - lto depends_on: @@ -24,7 +24,7 @@ services: container_name: legalevents image: legalthings/legalevents environment: - - APPLICATION_ENV=dev.docker + - APPLICATION_ENV=lto networks: - lto depends_on: