+ python projects nginx example config and postgis and additional python server docker examples

This commit is contained in:
WP Studio
2025-06-24 13:53:08 +03:00
parent 92cefd6fcd
commit 4c410fa89f
4 changed files with 56 additions and 0 deletions

22
bash/python-restart.sh Executable file
View 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}