-
Notifications
You must be signed in to change notification settings - Fork 2
Docker Deployment
Assuming you have docker installed on your machine it's fairly simple to build and run the server within docker (no special setup needed on your machine besides having docker installed).
First you'll need to build the container (make sure docker is running on your machine):
cd docker/application
./buildApplicationContainer.sh
Then you'll need to build the fixture image that contains all of the graph data:
cd docker/fixtures
./buildFixturesContainer.sh
NOTE: If changes to the graph data or the application code need to be reloaded you'll have to rebuild the corresponding container first via the respective method listed above and then rerun the application (see below steps on starting the app and stopping it).
To run the server such that you can do local development on the files and have the changes rendered immediately in a terminal (making sure you are in the root directory of the project):
docker-compose -f local-docker-compose.yml up
To run the server enter the following command into a terminal (making sure you are in the root directory of the project):
docker-compose up -d
at this point the server will be running! To access it simply get the IP address of your docker machine, if you're on
non-native docker for Mac (docker-machine ip dev
or docker-machine ip default
), or use localhost on other platforms (and native docker on Mac)
and you can access the UI from the URL http://localhost:5000.
The nice thing about docker is that it performs some nice magic with respect to logging for us. To get a live feed of the output from the server on stdout and stderr simply use the following command:
docker logs -f layeredgraph_rest_1
and this will give you a live feed of the output from the server. To stop monitoring the logs simply just hit ctrl + c
.
To stop the server enter the following command into a terminal (making sure you are in the root directory of the project):
docker-compose down
at this point the server will be stopped, and the containers will be cleaned up!