Add deploy script
This commit is contained in:
parent
bfe5dc6ff8
commit
5e694b57e6
26
deploy.sh
Executable file
26
deploy.sh
Executable file
@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
check_installed() {
|
||||
if ! [ -x "$(command -v $1)" ]; then
|
||||
echo "Error: $1 is not installed." >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
check_installed docker-compose
|
||||
check_installed yarn
|
||||
check_installed mvn
|
||||
|
||||
docker-compose down
|
||||
|
||||
# Generate Nuxt.js static website
|
||||
pushd frontend || exit 1
|
||||
yarn run generate
|
||||
popd || exit 1
|
||||
|
||||
# Generate fat jar
|
||||
pushd api || exit 1
|
||||
mvn package
|
||||
popd || exit 1
|
||||
|
||||
docker-compose up -d --build
|
||||
Loading…
x
Reference in New Issue
Block a user