From 05e5fde37924ad338e5bc96f85da03bdc38c6c28 Mon Sep 17 00:00:00 2001 From: wandoubaba Date: Thu, 19 Oct 2023 15:26:45 +0800 Subject: [PATCH] build.sh --- build.sh | 16 ++++++++++++++++ build/.gitignore | 2 ++ config/plugin/webman/console/app.php | 4 +++- 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100755 build.sh create mode 100644 build/.gitignore diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..5fe3c92 --- /dev/null +++ b/build.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# 读取docker.conf文件 +source docker.conf + +# 设置系统环境变量 +export WORKERMAN_CONTAINER_NAME=$container_name +export WORKERMAN_IMAGE_VERSION=$image_version + +# 判断WORKERMAN_CONTAINER_NAME的docker容器是否存在,如果存在,删除它 +if docker ps -a --format '{{.Names}}' | grep -q "^$WORKERMAN_CONTAINER_NAME$"; then + docker rm -f $WORKERMAN_CONTAINER_NAME +fi + + +docker compose run --rm $WORKERMAN_CONTAINER_NAME php webman build:bin $image_version && cp .env build/ \ No newline at end of file diff --git a/build/.gitignore b/build/.gitignore new file mode 100644 index 0000000..c96a04f --- /dev/null +++ b/build/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore \ No newline at end of file diff --git a/config/plugin/webman/console/app.php b/config/plugin/webman/console/app.php index 074e986..a848b0f 100644 --- a/config/plugin/webman/console/app.php +++ b/config/plugin/webman/console/app.php @@ -8,7 +8,7 @@ return [ 'bin_filename' => 'webman.bin', - 'signature_algorithm'=> Phar::SHA256, //set the signature algorithm for a phar and apply it. The signature algorithm must be one of Phar::MD5, Phar::SHA1, Phar::SHA256, Phar::SHA512, or Phar::OPENSSL. + 'signature_algorithm' => Phar::SHA256, //set the signature algorithm for a phar and apply it. The signature algorithm must be one of Phar::MD5, Phar::SHA1, Phar::SHA256, Phar::SHA512, or Phar::OPENSSL. 'private_key_file' => '', // The file path for certificate or OpenSSL private key file. @@ -21,4 +21,6 @@ return [ 'custom_ini' => ' memory_limit = 256M ', + 'exclude_pattern' => '#^(?!.*(composer.json|/.github/|/.idea/|/.git/|/.setting/|/runtime/|/vendor-bin/|/build/|vendor/webman/admin))(.*)$#' + ];