mirror of
https://github.com/tubearchivist/tubearchivist-metrics.git
synced 2024-12-22 09:50:15 +00:00
add sync_test to build for testing environment
This commit is contained in:
parent
6f9ca5391b
commit
f615aeacd5
28
deploy.sh
28
deploy.sh
@ -23,10 +23,32 @@ function validate {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function sync_test {
|
||||||
|
|
||||||
|
host="tubearchivist.local"
|
||||||
|
# make base folder
|
||||||
|
ssh "$host" "mkdir -p docker"
|
||||||
|
|
||||||
|
# copy project files to build image
|
||||||
|
rsync -a --progress --delete-after \
|
||||||
|
--exclude ".git" \
|
||||||
|
--exclude ".gitignore" \
|
||||||
|
--exclude "**/cache" \
|
||||||
|
--exclude "**/__pycache__/" \
|
||||||
|
. -e ssh "$host":tubearchivist-metrics
|
||||||
|
|
||||||
|
ssh "$host" "docker buildx build -t bbilly1/tubearchivist-metrics:latest tubearchivist-metrics --load"
|
||||||
|
|
||||||
|
ssh "$host" 'docker compose -f docker/docker-compose.yml up -d'
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if [[ $1 == "validate" ]]; then
|
if [[ $1 == "validate" ]]; then
|
||||||
validate
|
validate "$2"
|
||||||
|
elif [[ $1 == "test" ]]; then
|
||||||
|
sync_test
|
||||||
else
|
else
|
||||||
echo "valid options are: validate"
|
echo "valid options are: validate | test"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
Reference in New Issue
Block a user