mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 12:30:49 +08:00
finish oauth provider + docker service wait for MySQL
This commit is contained in:
@@ -53,7 +53,17 @@ fi
|
||||
echo_info "USE_HTTPS: $USE_HTTPS"
|
||||
|
||||
# 组合子域名变量
|
||||
export PHPMYADMIN_SERVER_NAME="phpmyadmin.${NP_DOMAIN}"
|
||||
dot_count_tmp="${NP_DOMAIN//[^.]/}"
|
||||
dot_count="${#dot_count_tmp}"
|
||||
PHPMYADMIN="phpmyadmin"
|
||||
if [ "$dot_count" -eq 1 ]; then
|
||||
PHPMYADMIN="${PHPMYADMIN}."
|
||||
else
|
||||
PHPMYADMIN="${PHPMYADMIN}-"
|
||||
fi
|
||||
export PHPMYADMIN_SERVER_NAME="${PHPMYADMIN}${NP_DOMAIN}"
|
||||
|
||||
echo_info "PHPMYADMIN_SERVER_NAME: ${PHPMYADMIN_SERVER_NAME}"
|
||||
|
||||
# 生成配置
|
||||
APP_CONF="/etc/nginx/conf.d/app.conf"
|
||||
|
||||
@@ -36,6 +36,18 @@ VENDOR_DIR="${ROOT_PATH}/vendor"
|
||||
|
||||
chown -R www-data:www-data $ROOT_PATH
|
||||
|
||||
until nc -z mysql 3306; do
|
||||
echo_info "Waiting for MySQL to be ready..."
|
||||
sleep 2
|
||||
done
|
||||
echo_success "MySQL is ready."
|
||||
|
||||
until nc -z redis 6379; do
|
||||
echo_info "Waiting for Redis to be ready..."
|
||||
sleep 2
|
||||
done
|
||||
echo_success "Redis is ready."
|
||||
|
||||
if [ "$SERVICE_NAME" = "php" ]; then
|
||||
if [ ! -f "$ENV_FILE" ]; then
|
||||
echo_info ".env file: $ENV_FILE not exists, copy $SOURCE_DIR to $TARGET_DIR ..."
|
||||
|
||||
Reference in New Issue
Block a user