Custom Backend OSPRO Surveyor Indonesia
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
652 B

3 years ago
#!/bin/bash
# args
action=${1:build}
# ensure newest
git pull
if [ $1 == "rebuild" ]; then
echo 'Rebuild OSPRO KIT-API Container'
docker stop ospro_kit_api-container
docker rm ospro_kit_api-container
else
echo 'Build New OSPOR KIT-API Container'
fi
# check volume
docker volume inspect ospro
if [ $? != 0 ]; then
echo 'Create volume'
docker volume create ospro
fi
docker build -t ospro/kit_api -f ./docker/Dockerfile-bullseye .
docker run -d -v ospro:/ospro \
-p 127.0.0.1:8333:80 \
-p 127.0.0.1:8090:8090 \
--restart always \
--name ospro_kit_api-container ospro/kit_api