-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bef4d98
commit a9d5fc3
Showing
1,134 changed files
with
42,316 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
name: Phyre Panel - Unit Test & Build | ||
on: [push] | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
phyre-panel-unit-test: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-22.04, ubuntu-20.04] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: ${{ github.repository }} | ||
ref: ${{ github.sha }} | ||
|
||
- name: Install Base | ||
run: | | ||
ls -la | ||
sudo mkdir /phyre-panel | ||
sudo cp installers/${{ matrix.os }}/install-partial/install_base.sh /phyre-panel/install_base.sh | ||
sudo chmod +x /phyre-panel/install_base.sh | ||
sudo /phyre-panel/install_base.sh | ||
sudo cp installers/${{ matrix.os }}/install-partial/install_web.sh /phyre-panel/install_web.sh | ||
sudo chmod +x /phyre-panel/install_web.sh | ||
- name: Run Unit Test | ||
run: | | ||
sudo cp -r web /usr/local/phyre/web/ | ||
cd /usr/local/phyre/web/ | ||
ls -la | ||
sudo wget https://getcomposer.org/download/latest-stable/composer.phar | ||
sudo COMPOSER_ALLOW_SUPERUSER=1 phyre-php composer.phar install | ||
sudo /phyre-panel/install_web.sh | ||
sudo phyre-php artisan test | ||
compile-phyre-web-panel: | ||
runs-on: ubuntu-22.04 | ||
needs: phyre-panel-unit-test | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
repository: ${{ github.repository }} | ||
- name: Npm install | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.2 | ||
|
||
- name: Install Composer Dependencies | ||
working-directory: ./web | ||
run: | | ||
composer install | ||
composer dump-autoload | ||
- name: Install NODE Dependencies | ||
working-directory: ./web | ||
run: | | ||
npm install | ||
npm run build | ||
- name: Inject slug/short variables | ||
uses: rlespinasse/[email protected] | ||
|
||
- name: Zip the files | ||
working-directory: ./web | ||
run: | | ||
rm -rf .git | ||
rm -rf .github | ||
rm -rf .nmp | ||
rm -rf node_modules | ||
rm -rf .phpunit.cache | ||
rm -rf vendor/composer/tmp-*.zip | ||
find . \( -name ".git" -o -name ".gitignore" -o -name ".gitmodules" -o -name ".gitattributes" \) -exec rm -rf -- {} + | ||
zip -r phyre-web-panel-build.zip `ls -A` | ||
mkdir -p ../dist | ||
mv ./phyre-web-panel-build.zip ../dist/phyre-web-panel.zip | ||
- name: Pushes to Phyre Panel Dist Repo | ||
uses: cpina/github-action-push-to-another-repository@main | ||
env: | ||
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }} | ||
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} | ||
with: | ||
source-directory: './dist' | ||
destination-github-username: 'CloudVisionApps' | ||
destination-repository-name: 'PhyrePanelWebDist' | ||
user-email: [email protected] | ||
target-branch: main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Compile Phyre Web Panel | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
compile-phyre-web-panel: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
repository: ${{ github.repository }} | ||
- name: Npm install | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.2 | ||
|
||
- name: Install Composer Dependencies | ||
working-directory: ./web | ||
run: | | ||
composer install | ||
composer dump-autoload | ||
|
||
- name: Install NODE Dependencies | ||
working-directory: ./web | ||
run: | | ||
npm install | ||
npm run build | ||
|
||
- name: Inject slug/short variables | ||
uses: rlespinasse/[email protected] | ||
|
||
- name: Zip the files | ||
working-directory: ./web | ||
run: | | ||
rm -rf .git | ||
rm -rf .github | ||
rm -rf .nmp | ||
rm -rf node_modules | ||
rm -rf .phpunit.cache | ||
rm -rf vendor/composer/tmp-*.zip | ||
find . \( -name ".git" -o -name ".gitignore" -o -name ".gitmodules" -o -name ".gitattributes" \) -exec rm -rf -- {} + | ||
zip -r phyre-web-panel-build.zip `ls -A` | ||
mkdir -p ../dist | ||
mv ./phyre-web-panel-build.zip ../dist/phyre-web-panel.zip | ||
|
||
- name: Pushes to Phyre Panel Dist Repo | ||
uses: cpina/github-action-push-to-another-repository@main | ||
env: | ||
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }} | ||
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} | ||
with: | ||
source-directory: './dist' | ||
destination-github-username: 'CloudVisionApps' | ||
destination-repository-name: 'PhyrePanelWebDist' | ||
user-email: [email protected] | ||
target-branch: main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Compile Phyre Web Terminal Package | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
# Pattern matched against refs/tags | ||
tags: | ||
- '**' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Compile WEB Terminal Package | ||
run: | | ||
cd compilators/debian/web-terminal | ||
chmod 775 ./web-terminal-compile.sh | ||
./web-terminal-compile.sh | ||
ls | ||
- name: Pushes to Phyre Panel Dist Repo | ||
uses: cpina/github-action-push-to-another-repository@main | ||
env: | ||
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }} | ||
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} | ||
with: | ||
source-directory: './compilators/debian/web-terminal/dist' | ||
target-directory: './debian/web-terminal/dist' | ||
destination-github-username: 'CloudVisionApps' | ||
destination-repository-name: 'PhyrePanelWebTerminalDist' | ||
user-email: [email protected] | ||
target-branch: main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
web/storage/installed | ||
/docker/e2e-tests/node_modules/ | ||
compilators/ | ||
web/thirdparty/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,43 @@ | ||
# PhyrePanel | ||
# PHYRE - WEB HOSTING PANEL | ||
|
||
![InstallScreen](screenshots/install-screen.png) | ||
![Dashboard](screenshots/dashboard.png) | ||
|
||
## Introduction | ||
PhyrePanel is a web-based panel for linux. It is written in PHP and uses the Laravel framework. | ||
|
||
## Installation | ||
To install PhyrePanel, you need to run this commands: | ||
``` | ||
wget https://raw.githubusercontent.com/CloudVisionApps/PhyrePanel/main/installers/install.sh && chmod +x install.sh && ./install.sh | ||
``` | ||
The admin panel can be opened on port: yourserver.com:8443 | ||
|
||
## Features | ||
|
||
### Server Applications | ||
Apache + PHP 7.4, 8.0, 8.1, 8.3, 8.4 | ||
|
||
Apache + NGINX | ||
|
||
Apache + Python | ||
|
||
Apache + Ruby | ||
|
||
### Databases | ||
MySQL | ||
|
||
SQLITE | ||
|
||
Remote Database Connections | ||
|
||
### UI/UX / Developing | ||
Clean Admin Panel | ||
|
||
Server Clustering | ||
|
||
Easy Module Developing | ||
|
||
## Join to our discord group | ||
https://discord.gg/yfFWfrfwTZ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
username=$1 | ||
schedule=$2 | ||
command=$3 | ||
|
||
# Create a temporary file to hold the existing user's crontab | ||
crontab -u $username -l > /tmp/temp_crontab | ||
|
||
# Add a new cron job to the temporary file | ||
echo "$schedule $command" >> /tmp/temp_crontab | ||
|
||
# Install the modified crontab from the temporary file | ||
crontab -u $username /tmp/temp_crontab | ||
|
||
# Remove the temporary file | ||
rm /tmp/temp_crontab | ||
|
||
echo "done!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
username=$1 | ||
schedule=$2 | ||
command=$3 | ||
|
||
# Get the user's crontab, filter out the specific command and schedule, and install the updated crontab | ||
crontab -u $username -l | grep -v -F "$schedule $command" | crontab -u $username - | ||
|
||
echo "done!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
# Replace 'username' with the actual username you want to retrieve cron jobs for | ||
username=$1 | ||
|
||
# Get the user's crontab entries and convert them to JSON | ||
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 . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
echo "Creating MySQL user and database" | ||
|
||
PASS=$3 | ||
if [ -z "$3" ]; then | ||
PASS=`openssl rand -base64 8` | ||
fi | ||
|
||
mysql -u root <<MYSQL_SCRIPT | ||
CREATE DATABASE $1; | ||
CREATE USER '$2'@'localhost' IDENTIFIED BY '$PASS'; | ||
GRANT ALL PRIVILEGES ON $1.* TO '$2'@'localhost'; | ||
FLUSH PRIVILEGES; | ||
MYSQL_SCRIPT | ||
|
||
echo "MySQL user and database created." | ||
echo "Database: $1" | ||
echo "Username: $2" | ||
echo "Password: $PASS" | ||
echo "Success!" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
|
||
DOMAIN=$1 | ||
USER=$2 | ||
|
||
# Path to NGINX sites-available directory | ||
SITES_AVAILABLE_DIR="/etc/nginx/sites-available" | ||
SITES_ENABLED_DIR="/etc/nginx/sites-enabled" | ||
|
||
# Create the site | ||
SERVER_ROOT="/var/www/$DOMAIN/public_html" | ||
|
||
cp -f /usr/local/phyre/samples/ubuntu/nginx.conf.sample $SITES_AVAILABLE_DIR/$DOMAIN.conf | ||
ln -s $SITES_AVAILABLE_DIR/$DOMAIN.conf $SITES_ENABLED_DIR/$DOMAIN.conf | ||
|
||
mkdir -p $SERVER_ROOT | ||
chown -R www-data:www-data $SERVER_ROOT | ||
|
||
# Replace the domain name in the NGINX config | ||
sed -i "s/%SERVER_NAME%/${DOMAIN}/g" $SITES_AVAILABLE_DIR/$DOMAIN.conf | ||
sed -i "s/%USER%/${USER}/g" $SITES_AVAILABLE_DIR/$DOMAIN.conf | ||
|
||
SERVER_ROOT_ESCAPED=$(printf '%s\n' "$SERVER_ROOT" | sed -e 's/[\/&]/\\&/g') | ||
sed -i "s#%SERVER_ROOT%#${SERVER_ROOT_ESCAPED}#g" $SITES_AVAILABLE_DIR/$DOMAIN.conf | ||
|
||
cp -f /usr/local/phyre/samples/sample-website-index.html $SERVER_ROOT/index.html | ||
sed -i "s/%DOMAIN%/${DOMAIN}/g" $SERVER_ROOT/index.html | ||
|
||
|
||
# Reload NGINX | ||
service nginx reload | ||
|
||
echo "Created site $DOMAIN" | ||
echo "done!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
# Path to NGINX sites-available directory | ||
SITES_AVAILABLE_DIR="/etc/nginx/sites-available" | ||
SITES_ENABLED_DIR="/etc/nginx/sites-enabled" | ||
|
||
# Delete the site | ||
rm -rf $SITES_AVAILABLE_DIR/$1.conf | ||
rm -rf $SITES_ENABLED_DIR/$1.conf | ||
rm -rf /var/www/$1 | ||
|
||
# Reload NGINX | ||
service nginx reload | ||
|
||
echo "Deleted site $1" | ||
echo "done!" |
Oops, something went wrong.