diff --git a/README.md b/README.md index 3b788894f4c83f3907ee72f9be1bca0582d586ca..8cb2a7cdc386aafc979a777299de5ffc8553d79c 100644 --- a/README.md +++ b/README.md @@ -28,23 +28,45 @@ Run Play - https://localhost + Head to https://localhost + + +Logs + + $ esap/logs Clean $ esap/clean +### Development mode + +To get live code changes in the ESAP API gateway, uncomment the "volumes" section fot the `api-gateway` service in the `docker-compose.yml` file. + +To get live code changes in the ESAP GUI, uncomment the "volumes" section fot the `gui` service in the `docker-compose.yml` file. NOTE: still to be tested and requires recompiling heh frinted. ### Extras +Build a specific service + + # esap/build service_name + +Run a specific service + + # esap/run service_name + +View logs of a specific service + + # esap/logs service_name + List all running services # esap/ps Open a shell in a service - # esap/shell api-gateway + # esap/shell service_name diff --git a/docker-compose-dev.yml b/docker-compose-default.yml similarity index 100% rename from docker-compose-dev.yml rename to docker-compose-default.yml diff --git a/esap/logs b/esap/logs new file mode 100755 index 0000000000000000000000000000000000000000..f57fa14b696399b0bb14160a49c1447e8243cedf --- /dev/null +++ b/esap/logs @@ -0,0 +1,16 @@ +#!/bin/bash + +# Check if we are in the right place +if [ ! -d ./services ]; then + echo "You must run this command from the project's root folder." + exit 1 +fi + + +if [[ "x$1" != "x" ]] ; then + docker-compose logs -f $1 +else + docker-compose logs -f +fi + + diff --git a/esap/run b/esap/run index e2cf4043dfadb5ffea78fdf2be0da9f0e0a0f8cf..fc2a370ea2bc11185b127c2df987339fbb6372da 100755 --- a/esap/run +++ b/esap/run @@ -6,8 +6,9 @@ if [ ! -d ./services ]; then exit 1 fi -if [[ $# -eq 0 ]] ; then - docker-compose up + +if [[ "x$1" != "x" ]] ; then + docker-compose up -d $1 else - docker-compose up $@ + docker-compose up -d fi diff --git a/esap/setup b/esap/setup index 066ed994c5813622c05bd6a2841e7948461ed559..4025cc633718b88d7356d469a561b3dc17cb0780 100755 --- a/esap/setup +++ b/esap/setup @@ -12,8 +12,8 @@ fi # Use dev docker-compose.yml if not already set up if [ ! -f docker-compose.yml ]; then - echo "Using dev docker-compose.yml" - cp docker-compose-dev.yml docker-compose.yml + echo "Using default docker-compose.yml" + cp docker-compose-default.yml docker-compose.yml else - echo "Not using dev docker-compose.yml as already present." + echo "Not using default docker-compose.yml as already present." fi