Skip to content

Commit a9d5fc3

Browse files
update
1 parent bef4d98 commit a9d5fc3

File tree

1,134 files changed

+42316
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,134 files changed

+42316
-1
lines changed

.github/workflows/app-unit-test.yml

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: Phyre Panel - Unit Test & Build
2+
on: [push]
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
jobs:
8+
phyre-panel-unit-test:
9+
strategy:
10+
matrix:
11+
os: [ubuntu-22.04, ubuntu-20.04]
12+
13+
runs-on: ${{ matrix.os }}
14+
15+
steps:
16+
- name: Checkout Repository
17+
uses: actions/checkout@v2
18+
with:
19+
repository: ${{ github.repository }}
20+
ref: ${{ github.sha }}
21+
22+
- name: Install Base
23+
run: |
24+
ls -la
25+
sudo mkdir /phyre-panel
26+
27+
sudo cp installers/${{ matrix.os }}/install-partial/install_base.sh /phyre-panel/install_base.sh
28+
sudo chmod +x /phyre-panel/install_base.sh
29+
sudo /phyre-panel/install_base.sh
30+
31+
sudo cp installers/${{ matrix.os }}/install-partial/install_web.sh /phyre-panel/install_web.sh
32+
sudo chmod +x /phyre-panel/install_web.sh
33+
34+
- name: Run Unit Test
35+
run: |
36+
37+
sudo cp -r web /usr/local/phyre/web/
38+
cd /usr/local/phyre/web/
39+
ls -la
40+
41+
sudo wget https://getcomposer.org/download/latest-stable/composer.phar
42+
sudo COMPOSER_ALLOW_SUPERUSER=1 phyre-php composer.phar install
43+
44+
sudo /phyre-panel/install_web.sh
45+
sudo phyre-php artisan test
46+
47+
compile-phyre-web-panel:
48+
runs-on: ubuntu-22.04
49+
needs: phyre-panel-unit-test
50+
steps:
51+
- uses: actions/checkout@v2
52+
with:
53+
repository: ${{ github.repository }}
54+
- name: Npm install
55+
uses: actions/setup-node@v3
56+
with:
57+
node-version: 16
58+
59+
- name: Setup PHP
60+
uses: shivammathur/setup-php@v2
61+
with:
62+
php-version: 8.2
63+
64+
- name: Install Composer Dependencies
65+
working-directory: ./web
66+
run: |
67+
composer install
68+
composer dump-autoload
69+
70+
- name: Install NODE Dependencies
71+
working-directory: ./web
72+
run: |
73+
npm install
74+
npm run build
75+
76+
- name: Inject slug/short variables
77+
uses: rlespinasse/[email protected]
78+
79+
- name: Zip the files
80+
working-directory: ./web
81+
run: |
82+
rm -rf .git
83+
rm -rf .github
84+
rm -rf .nmp
85+
rm -rf node_modules
86+
rm -rf .phpunit.cache
87+
rm -rf vendor/composer/tmp-*.zip
88+
find . \( -name ".git" -o -name ".gitignore" -o -name ".gitmodules" -o -name ".gitattributes" \) -exec rm -rf -- {} +
89+
zip -r phyre-web-panel-build.zip `ls -A`
90+
mkdir -p ../dist
91+
mv ./phyre-web-panel-build.zip ../dist/phyre-web-panel.zip
92+
93+
- name: Pushes to Phyre Panel Dist Repo
94+
uses: cpina/github-action-push-to-another-repository@main
95+
env:
96+
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
97+
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
98+
with:
99+
source-directory: './dist'
100+
destination-github-username: 'CloudVisionApps'
101+
destination-repository-name: 'PhyrePanelWebDist'
102+
user-email: [email protected]
103+
target-branch: main
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Compile Phyre Web Panel
2+
3+
on:
4+
workflow_dispatch:
5+
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
cancel-in-progress: true
9+
10+
jobs:
11+
compile-phyre-web-panel:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
with:
16+
repository: ${{ github.repository }}
17+
- name: Npm install
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: 16
21+
22+
- name: Setup PHP
23+
uses: shivammathur/setup-php@v2
24+
with:
25+
php-version: 8.2
26+
27+
- name: Install Composer Dependencies
28+
working-directory: ./web
29+
run: |
30+
composer install
31+
composer dump-autoload
32+
33+
- name: Install NODE Dependencies
34+
working-directory: ./web
35+
run: |
36+
npm install
37+
npm run build
38+
39+
- name: Inject slug/short variables
40+
uses: rlespinasse/[email protected]
41+
42+
- name: Zip the files
43+
working-directory: ./web
44+
run: |
45+
rm -rf .git
46+
rm -rf .github
47+
rm -rf .nmp
48+
rm -rf node_modules
49+
rm -rf .phpunit.cache
50+
rm -rf vendor/composer/tmp-*.zip
51+
find . \( -name ".git" -o -name ".gitignore" -o -name ".gitmodules" -o -name ".gitattributes" \) -exec rm -rf -- {} +
52+
zip -r phyre-web-panel-build.zip `ls -A`
53+
mkdir -p ../dist
54+
mv ./phyre-web-panel-build.zip ../dist/phyre-web-panel.zip
55+
56+
- name: Pushes to Phyre Panel Dist Repo
57+
uses: cpina/github-action-push-to-another-repository@main
58+
env:
59+
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
60+
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
61+
with:
62+
source-directory: './dist'
63+
destination-github-username: 'CloudVisionApps'
64+
destination-repository-name: 'PhyrePanelWebDist'
65+
user-email: [email protected]
66+
target-branch: main
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Compile Phyre Web Terminal Package
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
# Pattern matched against refs/tags
7+
tags:
8+
- '**'
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
build:
15+
16+
runs-on: ubuntu-latest
17+
18+
permissions:
19+
contents: write
20+
21+
steps:
22+
- uses: actions/checkout@v3
23+
24+
- name: Compile WEB Terminal Package
25+
run: |
26+
cd compilators/debian/web-terminal
27+
chmod 775 ./web-terminal-compile.sh
28+
./web-terminal-compile.sh
29+
ls
30+
31+
- name: Pushes to Phyre Panel Dist Repo
32+
uses: cpina/github-action-push-to-another-repository@main
33+
env:
34+
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
35+
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
36+
with:
37+
source-directory: './compilators/debian/web-terminal/dist'
38+
target-directory: './debian/web-terminal/dist'
39+
destination-github-username: 'CloudVisionApps'
40+
destination-repository-name: 'PhyrePanelWebTerminalDist'
41+
user-email: [email protected]
42+
target-branch: main

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
web/storage/installed
2+
/docker/e2e-tests/node_modules/
3+
compilators/
4+
web/thirdparty/

README.md

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,43 @@
1-
# PhyrePanel
1+
# PHYRE - WEB HOSTING PANEL
2+
3+
![InstallScreen](screenshots/install-screen.png)
4+
![Dashboard](screenshots/dashboard.png)
5+
6+
## Introduction
7+
PhyrePanel is a web-based panel for linux. It is written in PHP and uses the Laravel framework.
8+
9+
## Installation
10+
To install PhyrePanel, you need to run this commands:
11+
```
12+
wget https://raw.githubusercontent.com/CloudVisionApps/PhyrePanel/main/installers/install.sh && chmod +x install.sh && ./install.sh
13+
```
14+
The admin panel can be opened on port: yourserver.com:8443
15+
16+
## Features
17+
18+
### Server Applications
19+
Apache + PHP 7.4, 8.0, 8.1, 8.3, 8.4
20+
21+
Apache + NGINX
22+
23+
Apache + Python
24+
25+
Apache + Ruby
26+
27+
### Databases
28+
MySQL
29+
30+
SQLITE
31+
32+
Remote Database Connections
33+
34+
### UI/UX / Developing
35+
Clean Admin Panel
36+
37+
Server Clustering
38+
39+
Easy Module Developing
40+
41+
## Join to our discord group
42+
https://discord.gg/yfFWfrfwTZ
43+

bin/apache-website-create.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ls

bin/cron-job-add.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
username=$1
4+
schedule=$2
5+
command=$3
6+
7+
# Create a temporary file to hold the existing user's crontab
8+
crontab -u $username -l > /tmp/temp_crontab
9+
10+
# Add a new cron job to the temporary file
11+
echo "$schedule $command" >> /tmp/temp_crontab
12+
13+
# Install the modified crontab from the temporary file
14+
crontab -u $username /tmp/temp_crontab
15+
16+
# Remove the temporary file
17+
rm /tmp/temp_crontab
18+
19+
echo "done!"

bin/cron-job-delete.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
username=$1
4+
schedule=$2
5+
command=$3
6+
7+
# Get the user's crontab, filter out the specific command and schedule, and install the updated crontab
8+
crontab -u $username -l | grep -v -F "$schedule $command" | crontab -u $username -
9+
10+
echo "done!"

bin/cron-jobs-list.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
# Replace 'username' with the actual username you want to retrieve cron jobs for
4+
username=$1
5+
6+
# Get the user's crontab entries and convert them to JSON
7+
crontab -u $username -l | grep -v -e '^#' -e '^\s*$' | awk '{print "{\"schedule\":\"" $1 " " $2 " " $3 " " $4 " " $5 "\", \"command\":\"" substr($0, index($0,$6)) "\"}"}' | jq -s .

bin/mysql-create-db-and-user.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
echo "Creating MySQL user and database"
4+
5+
PASS=$3
6+
if [ -z "$3" ]; then
7+
PASS=`openssl rand -base64 8`
8+
fi
9+
10+
mysql -u root <<MYSQL_SCRIPT
11+
CREATE DATABASE $1;
12+
CREATE USER '$2'@'localhost' IDENTIFIED BY '$PASS';
13+
GRANT ALL PRIVILEGES ON $1.* TO '$2'@'localhost';
14+
FLUSH PRIVILEGES;
15+
MYSQL_SCRIPT
16+
17+
echo "MySQL user and database created."
18+
echo "Database: $1"
19+
echo "Username: $2"
20+
echo "Password: $PASS"
21+
echo "Success!"
22+

bin/nginx-website-create.sh

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash
2+
3+
DOMAIN=$1
4+
USER=$2
5+
6+
# Path to NGINX sites-available directory
7+
SITES_AVAILABLE_DIR="/etc/nginx/sites-available"
8+
SITES_ENABLED_DIR="/etc/nginx/sites-enabled"
9+
10+
# Create the site
11+
SERVER_ROOT="/var/www/$DOMAIN/public_html"
12+
13+
cp -f /usr/local/phyre/samples/ubuntu/nginx.conf.sample $SITES_AVAILABLE_DIR/$DOMAIN.conf
14+
ln -s $SITES_AVAILABLE_DIR/$DOMAIN.conf $SITES_ENABLED_DIR/$DOMAIN.conf
15+
16+
mkdir -p $SERVER_ROOT
17+
chown -R www-data:www-data $SERVER_ROOT
18+
19+
# Replace the domain name in the NGINX config
20+
sed -i "s/%SERVER_NAME%/${DOMAIN}/g" $SITES_AVAILABLE_DIR/$DOMAIN.conf
21+
sed -i "s/%USER%/${USER}/g" $SITES_AVAILABLE_DIR/$DOMAIN.conf
22+
23+
SERVER_ROOT_ESCAPED=$(printf '%s\n' "$SERVER_ROOT" | sed -e 's/[\/&]/\\&/g')
24+
sed -i "s#%SERVER_ROOT%#${SERVER_ROOT_ESCAPED}#g" $SITES_AVAILABLE_DIR/$DOMAIN.conf
25+
26+
cp -f /usr/local/phyre/samples/sample-website-index.html $SERVER_ROOT/index.html
27+
sed -i "s/%DOMAIN%/${DOMAIN}/g" $SERVER_ROOT/index.html
28+
29+
30+
# Reload NGINX
31+
service nginx reload
32+
33+
echo "Created site $DOMAIN"
34+
echo "done!"

bin/nginx-website-delete.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
# Path to NGINX sites-available directory
4+
SITES_AVAILABLE_DIR="/etc/nginx/sites-available"
5+
SITES_ENABLED_DIR="/etc/nginx/sites-enabled"
6+
7+
# Delete the site
8+
rm -rf $SITES_AVAILABLE_DIR/$1.conf
9+
rm -rf $SITES_ENABLED_DIR/$1.conf
10+
rm -rf /var/www/$1
11+
12+
# Reload NGINX
13+
service nginx reload
14+
15+
echo "Deleted site $1"
16+
echo "done!"

0 commit comments

Comments
 (0)