1
0
mirror of https://github.com/sasjs/server.git synced 2026-01-03 13:10:04 +00:00

chore: copy sas exe script extracted common

This commit is contained in:
Saad Jutt
2021-11-16 06:12:22 +05:00
parent 44fe149ed8
commit b20d6ec59c
6 changed files with 36 additions and 55 deletions

View File

@@ -1,29 +1,6 @@
sasjsPath=$(grep sasPath ./api/package.json | sed 's/.*"sasPath": "\(.*\)".*/\1/')
if [ -z "$sasjsPath" ]
then
echo "Please enter path to SAS executable:"
read sasjsPath
# Copy SAS executable from source to current folder to make it available to docker
./dockerSASexe.sh
fi
if [ -e $sasjsPath ]
then
echo "Using sas executable:" \"$sasjsPath\"
else
echo "No file present at:" \"$sasjsPath\"
exit 1
fi
# copy sas executable to current directory, because docker cannot copy files outside of context.
cp $sasjsPath ./
# name of the sas executable file, placed at root of repository
sasjs=$(basename $sasjsPath)
echo "SAS Executable name:" $sasjs
# build and run docker-compose
SAS_EXEC=$sasjs docker-compose -f docker-compose.prod.yml up --build -d
# remove copied sas executable
rm $sasjs
# Build & Run docker-compose with docker compose file i.e. docker-compose.prod.yml
# SAS_EXEC=sas_exe/sas docker-compose -f docker-compose.prod.yml up --build -d