Commit e602030e authored by Stefano Alberto Russo's avatar Stefano Alberto Russo
Browse files

Moved to docker-compose-defaulkt.yml. Default behaviour of the run script is...

Moved to docker-compose-defaulkt.yml. Default behaviour of the run script is now to daemonize. Added view logs scrips.
parent 44d9689b
Loading
Loading
Loading
Loading
+24 −2
Original line number Diff line number Diff line
@@ -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



+0 −0

File moved.

esap/logs

0 → 100755
+16 −0
Original line number Diff line number Diff line
#!/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

+4 −3
Original line number Diff line number Diff line
@@ -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
+3 −3
Original line number Diff line number Diff line
@@ -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