+ python projects nginx example config and postgis and additional python server docker examples
This commit is contained in:
22
bash/python-restart.sh
Executable file
22
bash/python-restart.sh
Executable file
@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
DIR="$(realpath $(dirname "$(readlink -f "$0")")/..)"
|
||||
|
||||
. $DIR/bash/_docker-cmd.sh || {
|
||||
echo "no docker cmd is presented" && exit 1
|
||||
}
|
||||
|
||||
PYTHON_SERVICE=$1
|
||||
|
||||
if [[ -z "${PYTHON_SERVICE}" ]]; then
|
||||
echo "Usage: $(basename $0) PYTHON_PROJECT_NAME"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CONTAINER=$(docker ps | grep "python-${PYTHON_SERVICE}" | awk '{print $1}')
|
||||
|
||||
if [[ -z "${CONTAINER}" ]]; then
|
||||
echo "Unable to find container: db"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
$DOCKER_CMD restart ${CONTAINER}
|
Reference in New Issue
Block a user