wiki/deploy.sh
yangzuhao 5e319f768f
Some checks failed
continuous-integration/drone/push Build is failing
修改部署文件
2023-02-12 14:35:22 +08:00

26 lines
416 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
EXEC_USER=work
su - ${EXEC_USER}
DEPLOY_PATH="/home/work/apps/wiki"
LOG_PATH="${DEPLOY_PATH}/log"
folder_exists() {
if [ -d "$1" ]; then
echo "folder is exists${1}"
return 0
fi
echo "create folder ${1}"
mkdir -p ${1}
chown -R work:work ${1}
}
pack_docker() {
cp -rv docker-compose.yml ${1}
}
folder_exists ${DEPLOY_PATH}
folder_exists ${LOG_PATH}
pack_docker ${DEPLOY_PATH}