script updates
This commit is contained in:
parent
5366c6ba6d
commit
70706da7fd
3
build.sh
3
build.sh
@ -35,5 +35,6 @@ echo "config file goes in <docker folder/config/selfsurveybe.db"
|
|||||||
echo " Format for the config file is"
|
echo " Format for the config file is"
|
||||||
echo " {"
|
echo " {"
|
||||||
echo " \"username\": \"<username here>\","
|
echo " \"username\": \"<username here>\","
|
||||||
echo " \"password\": \"<password here>\""
|
echo " \"password\": \"<password here>\"",
|
||||||
|
echo " \"domain\": \"<public domain here>\"",
|
||||||
echo " }"
|
echo " }"
|
||||||
33
test.sh
33
test.sh
@ -1,16 +1,31 @@
|
|||||||
|
#local dev folder location of the server source files
|
||||||
|
SERVER_DIR=~/p/SelfSurvey-server
|
||||||
|
#local dev folder loation of the front end source files
|
||||||
|
FE_DIR=~/p/SelfSurvey-FE
|
||||||
|
#local folder location of this repo
|
||||||
|
CONFIG_DIR=~/p/selfsurvey-config
|
||||||
|
#local apache dir
|
||||||
|
APACHE_DIR=~/Documents/apache-tomcat-9.0.89
|
||||||
|
#the public http address of the build
|
||||||
|
SERVER_PUBLIC_ADDR=localhost:8080
|
||||||
|
|
||||||
|
# setup BE repo stuff
|
||||||
|
rm -rf $SERVER_DIR/src/main/resources/static
|
||||||
|
mkdir $SERVER_DIR/src/main/resources/static
|
||||||
# assemble FE
|
# assemble FE
|
||||||
cd ~/p/SelfSurvey-FE
|
cd $FE_DIR
|
||||||
npm run build
|
npx webpack --env apiurl=http://$SERVER_PUBLIC_ADDR
|
||||||
cd ~/p/SelfSurvey-server/src/main/resources/static
|
cd $SERVER_DIR/src/main/resources/static
|
||||||
rm -rf ./*
|
rm -rf ./*
|
||||||
cp -r ~/p/SelfSurvey-FE/dist/* ~/p/SelfSurvey-server/src/main/resources/static/
|
cp -r $FE_DIR/dist/* $SERVER_DIR/src/main/resources/static/
|
||||||
# assemble BE
|
# assemble BE
|
||||||
cd ~/p/SelfSurvey-server/
|
cd $SERVER_DIR
|
||||||
mvn clean package
|
mvn clean package
|
||||||
cd ~/Documents/apache-tomcat-9.0.89/webapps/
|
# assemble package
|
||||||
|
cp $SERVER_DIR/target/self-survey.war $CONFIG_DIR/build/ROOT.war
|
||||||
|
cp $CONFIG_DIR/docker-compose.yml $CONFIG_DIR/build/docker-compose.yml
|
||||||
|
cd $APACHE_DIR/webapps/
|
||||||
rm -rf ./ROOT.war ./ROOT
|
rm -rf ./ROOT.war ./ROOT
|
||||||
cp ~/p/SelfSurvey-server/target/self-survey.war ~/Documents/apache-tomcat-9.0.89/webapps/ROOT.war
|
cp $SERVER_DIR/target/self-survey.war $APACHE_DIR/webapps/ROOT.war
|
||||||
cd ~/Documents/apache-tomcat-9.0.89/bin/
|
cd $APACHE_DIR/bin/
|
||||||
./catalina.sh run
|
./catalina.sh run
|
||||||
Loading…
Reference in New Issue
Block a user