ddd-leaven-akka-v2
ddd-leaven-akka-v2 copied to clipboard
Allow running the run-* scripts from the project root directory.
Thanks for excellent content on this topic. I'm trying to run the application in the physical server in Ubuntu 14.04. I successfully completed till SBT Stage.
When I attempt to run the application using /common/run-scripts/run-all I'm getting the following error recorded in the log ./run-sales-write-back: line 3: ../../sales/write-back/target/universal/stage/bin/sales-write-back: No such file or directory
Similar errors in the other log files as well. What could be wrong from my end, Advice.
You need to run the script from the run-scripts directory (cd ./common/run-scripts && ./run-all).
I tried to run the scripts with ./run-all from ./commons/run-scripts directory it run but the ./target folder has 9 log files: invoicing-write-back.log, invoicing-write-front.log, sales-read-back.log, sales-read-front.log, sales-write-back.log,sales-write-front.log, shipping-read-back.log, shipping-read-front.log and shipping-write-back.log
For example it shows shipping-write-back.log file has the following content: ./run-shipping-write-back: line 3: ../../shipping/write-back/target/universal/stage/bin/shipping-write-back: No such file or directory
Let's discuss this on chat: https://gitter.im/pawelkaczor/akka-ddd
Declare a variable that represent the location of the current Bash
script:
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
Then use it in the script:
cp ${DIR}/file ${DIR}/../../../somewhere/else
${DIR}/../other-dir/another-script ${DIR}/../conf/my-conf.conf
This allow launching the script from anywhere.
Thanks @ronanM.