From cadce8d19d209f1e60c53b899a2017301908150d Mon Sep 17 00:00:00 2001 From: Bozhidar Slaveykov Date: Sat, 25 Nov 2023 23:41:07 +0200 Subject: [PATCH] update --- .github/workflows/compile-ngix-package.yml | 2 +- .github/workflows/compile-php-package.yml | 41 ++++++++++++++++++++++ compilators/debian/php/php-compile.sh | 28 +++++++++++++++ web/sudo/{alphaxweb => phyreweb} | 0 web/user.sh | 4 +-- 5 files changed, 72 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/compile-php-package.yml create mode 100644 compilators/debian/php/php-compile.sh rename web/sudo/{alphaxweb => phyreweb} (100%) diff --git a/.github/workflows/compile-ngix-package.yml b/.github/workflows/compile-ngix-package.yml index b7d7387..a0e830b 100644 --- a/.github/workflows/compile-ngix-package.yml +++ b/.github/workflows/compile-ngix-package.yml @@ -1,4 +1,4 @@ -name: Compile PhyrePanel Packages +name: Compile PhyrePanel NGINX Packages on: push: diff --git a/.github/workflows/compile-php-package.yml b/.github/workflows/compile-php-package.yml new file mode 100644 index 0000000..2b1c580 --- /dev/null +++ b/.github/workflows/compile-php-package.yml @@ -0,0 +1,41 @@ +name: Compile PhyrePanel PHP Packages + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + + permissions: + contents: write + + steps: + - uses: actions/checkout@v3 + + - name: Compile PHP + run: | + cd compilators/debian/php + chmod 775 ./php-compile.sh + ./php-compile.sh + ls + + - uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_user_name: Cloud Vision Bot + commit_user_email: bobicloudvision@gmail.com + commit_author: Cloud Vision Bot + commit_message: Upload compiled packages [BOT] + repository: ./compilators/debian/php/dist + #skip_checkout: true + #push_options: '--force' + #skip_fetch: true + #create_branch: true + # status_options: '--untracked-files=no' diff --git a/compilators/debian/php/php-compile.sh b/compilators/debian/php/php-compile.sh new file mode 100644 index 0000000..5beeb60 --- /dev/null +++ b/compilators/debian/php/php-compile.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +MAIN_DIR=$(pwd) + +# Install dependencies +sudo apt-get update -y +sudo apt-get install libzip-dev libonig-dev openssl zip unzip git ibgmp-dev gmp-dev libcurl4-openssl-dev libsqlite3-dev libxml2-dev pkg-config build-essential dpkg-dev debhelper autotools-dev libgeoip-dev libssl-dev libpcre3-dev zlib1g-dev -y + +# Download PHP source +wget http://de2.php.net/distributions/php-8.2.0.tar.gz +tar -zxvf php-8.2.0.tar.gz +cd php-8.2.0 + +# Configure PHP + +sudo ./configure --prefix=/usr/local/phyre/php \ + --with-libdir=lib/$(arch)-linux-gnu \ + --enable-fpm --with-fpm-user=admin --with-fpm-group=admin \ + --with-openssl \ + --with-mysqli \ + --with-gettext \ + --with-curl \ + --with-zip \ + --enable-mbstring + +# Compile PHP +sudo make +sudo make install diff --git a/web/sudo/alphaxweb b/web/sudo/phyreweb similarity index 100% rename from web/sudo/alphaxweb rename to web/sudo/phyreweb diff --git a/web/user.sh b/web/user.sh index 9382289..63ee56f 100644 --- a/web/user.sh +++ b/web/user.sh @@ -1,6 +1,6 @@ # Generate a random password -random_password="wfawfafwafwafaw" -email="wfafwafwa@abv.bg" +random_password="$(openssl rand -base64 32)" +email="email1@phyrepanel.com" # Create the new phyreweb user /usr/sbin/useradd "phyreweb" -c "$email" --no-create-home