mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 22:46:16 +00:00
refactoring (#116)
- refactoring architecture - fix incomplete ssh logs - code editor for scripts in the app - remove Jobs and SSHCommands
This commit is contained in:
@ -1,12 +0,0 @@
|
||||
wget https://downloads.mariadb.com/MariaDB/mariadb_repo_setup
|
||||
|
||||
chmod +x mariadb_repo_setup
|
||||
|
||||
sudo DEBIAN_FRONTEND=noninteractive ./mariadb_repo_setup \
|
||||
--mariadb-server-version="mariadb-10.3"
|
||||
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt update
|
||||
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt install mariadb-server mariadb-backup -y
|
||||
|
||||
sudo service mysql start
|
@ -1,19 +0,0 @@
|
||||
wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.22-1_all.deb
|
||||
|
||||
sudo DEBIAN_FRONTEND=noninteractive dpkg -i mysql-apt-config_0.8.22-1_all.deb
|
||||
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt update
|
||||
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt install mysql-server -y
|
||||
|
||||
sudo service mysql enable
|
||||
|
||||
sudo service mysql start
|
||||
|
||||
if ! sudo mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH auth_socket;"; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo mysql -e "FLUSH PRIVILEGES"; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
@ -1,13 +0,0 @@
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt install mysql-server -y
|
||||
|
||||
sudo service mysql enable
|
||||
|
||||
sudo service mysql start
|
||||
|
||||
if ! sudo mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH auth_socket;"; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo mysql -e "FLUSH PRIVILEGES"; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
@ -1,11 +0,0 @@
|
||||
if ! sudo DEBIAN_FRONTEND=noninteractive mysqldump -u root __database__ > __file__.sql; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! DEBIAN_FRONTEND=noninteractive zip __file__.zip __file__.sql; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! rm __file__.sql; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
@ -1,9 +0,0 @@
|
||||
if ! sudo mysql -e "CREATE USER IF NOT EXISTS '__username__'@'__host__' IDENTIFIED BY '__password__'"; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo mysql -e "FLUSH PRIVILEGES"; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
echo "Command executed"
|
@ -1,5 +0,0 @@
|
||||
if ! sudo mysql -e "CREATE DATABASE IF NOT EXISTS __name__ CHARACTER SET utf8 COLLATE utf8_general_ci"; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
echo "Command executed"
|
@ -1,9 +0,0 @@
|
||||
if ! sudo mysql -e "DROP USER IF EXISTS '__username__'@'__host__'"; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo mysql -e "FLUSH PRIVILEGES"; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
echo "Command executed"
|
@ -1,5 +0,0 @@
|
||||
if ! sudo mysql -e "DROP DATABASE IF EXISTS __name__"; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
echo "Command executed"
|
@ -1,9 +0,0 @@
|
||||
if ! sudo mysql -e "GRANT ALL PRIVILEGES ON __database__.* TO '__username__'@'__host__'"; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo mysql -e "FLUSH PRIVILEGES"; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
echo "Linking to __database__ finished"
|
@ -1,11 +0,0 @@
|
||||
if ! DEBIAN_FRONTEND=noninteractive unzip __file__.zip; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo DEBIAN_FRONTEND=noninteractive mysql -u root __database__ < __file__.sql; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! rm __file__.sql __file__.zip; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
@ -1,5 +0,0 @@
|
||||
if ! sudo mysql -e "REVOKE ALL PRIVILEGES, GRANT OPTION FROM '__username__'@'__host__'"; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
echo "Command executed"
|
@ -1,11 +0,0 @@
|
||||
if ! sudo ufw __type__ from __source____mask__ to any proto __protocol__ port __port__; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo ufw reload; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo service ufw restart; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
@ -1,27 +0,0 @@
|
||||
if ! sudo ufw default deny incoming; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo ufw default allow outgoing; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo ufw allow from 0.0.0.0/0 to any proto tcp port 22; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo ufw allow from 0.0.0.0/0 to any proto tcp port 80; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo ufw allow from 0.0.0.0/0 to any proto tcp port 443; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo ufw --force enable; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo ufw reload; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
@ -1,11 +0,0 @@
|
||||
if ! sudo ufw delete __type__ from __source____mask__ to any proto __protocol__ port __port__; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo ufw reload; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo service ufw restart; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
@ -1,7 +0,0 @@
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt install redis-server -y
|
||||
|
||||
sudo sed -i 's/bind 127.0.0.1 ::1/bind 0.0.0.0/g' /etc/redis/redis.conf
|
||||
|
||||
sudo service redis enable
|
||||
|
||||
sudo service redis start
|
@ -1,3 +0,0 @@
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt install -y software-properties-common curl zip unzip git gcc
|
||||
git config --global user.email "__email__"
|
||||
git config --global user.name "__name__"
|
@ -1,11 +0,0 @@
|
||||
if ! sudo rm /usr/bin/php; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo ln -s /usr/bin/php__version__ /usr/bin/php; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
echo "Default php is: "
|
||||
|
||||
php -v
|
@ -1,3 +0,0 @@
|
||||
if ! cat /etc/php/__version__/cli/php.ini; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
@ -1,7 +0,0 @@
|
||||
cd ~
|
||||
|
||||
curl -sS https://getcomposer.org/installer -o composer-setup.php
|
||||
|
||||
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
|
||||
|
||||
composer
|
@ -1,5 +0,0 @@
|
||||
sudo apt install -y php__version__-__name__
|
||||
|
||||
sudo service php__version__-fpm restart
|
||||
|
||||
php__version__ -m
|
@ -1,13 +0,0 @@
|
||||
sudo add-apt-repository ppa:ondrej/php -y
|
||||
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt update
|
||||
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt install -y php__version__ php__version__-fpm php__version__-mbstring php__version__-mysql php__version__-mcrypt php__version__-gd php__version__-xml php__version__-curl php__version__-gettext php__version__-zip php__version__-bcmath php__version__-soap php__version__-redis
|
||||
|
||||
if ! sudo sed -i 's/www-data/__user__/g' /etc/php/__version__/fpm/pool.d/www.conf; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
sudo service php__version__-fpm enable
|
||||
|
||||
sudo service php__version__-fpm start
|
@ -1,5 +0,0 @@
|
||||
sudo service php__version__-fpm stop
|
||||
|
||||
if ! sudo DEBIAN_FRONTEND=noninteractive apt remove -y php__version__ php__version__-fpm php__version__-mbstring php__version__-mysql php__version__-mcrypt php__version__-gd php__version__-xml php__version__-curl php__version__-gettext php__version__-zip php__version__-bcmath php__version__-soap php__version__-redis; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
@ -1,11 +0,0 @@
|
||||
if ! sudo sed -i 's,^__variable__ =.*$,__variable__ = __value__,' /etc/php/__version__/cli/php.ini; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo sed -i 's,^__variable__ =.*$,__variable__ = __value__,' /etc/php/__version__/fpm/php.ini; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo service php__version__-fpm restart; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
@ -1,13 +0,0 @@
|
||||
if ! sudo mkdir __path__; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! echo __certificate__ | sudo tee __certificate_path__; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! echo __pk__ | sudo tee __pk_path__; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
echo "Successfully received certificate."
|
@ -1,3 +0,0 @@
|
||||
if ! sudo certbot certonly --force-renewal --nginx --noninteractive --agree-tos --cert-name __domain__ -m __email__ -d __domain__ --verbose; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
@ -1,4 +0,0 @@
|
||||
curl -o __dest__ --location --request POST 'https://content.dropboxapi.com/2/files/download' \
|
||||
--header 'Accept: application/json' \
|
||||
--header 'Dropbox-API-Arg: {"path":"__src__"}' \
|
||||
--header 'Authorization: Bearer __token__'
|
@ -1 +0,0 @@
|
||||
curl __passive__ -u "__username__:__password__" ftp__ssl__://__host__:__port__/__src__ -o "__dest__"
|
@ -1,6 +0,0 @@
|
||||
curl -sb --location --request POST 'https://content.dropboxapi.com/2/files/upload' \
|
||||
--header 'Accept: application/json' \
|
||||
--header 'Dropbox-API-Arg: {"path":"__dest__"}' \
|
||||
--header 'Content-Type: text/plain; charset=dropbox-cors-hack' \
|
||||
--header 'Authorization: Bearer __token__' \
|
||||
--data-binary '@__src__'
|
@ -1 +0,0 @@
|
||||
curl __passive__ -T "__src__" -u "__username__:__password__" ftp__ssl__://__host__:__port__/__dest__
|
@ -1,21 +0,0 @@
|
||||
mkdir -p ~/.logs
|
||||
|
||||
mkdir -p ~/.logs/workers
|
||||
|
||||
touch ~/.logs/workers/__id__.log
|
||||
|
||||
if ! echo '__config__' | sudo tee /etc/supervisor/conf.d/__id__.conf; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo supervisorctl reread; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo supervisorctl update; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo supervisorctl start __id__:*; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
@ -1,20 +0,0 @@
|
||||
if ! sudo supervisorctl stop __id__:*; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo rm -rf ~/.logs/workers/__id__.log; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo rm -rf /etc/supervisor/conf.d/__id__.conf; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo supervisorctl reread; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo supervisorctl update; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
@ -1,5 +0,0 @@
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get install supervisor -y
|
||||
|
||||
sudo service supervisor enable
|
||||
|
||||
sudo service supervisor start
|
@ -1,3 +0,0 @@
|
||||
if ! sudo supervisorctl restart __id__:*; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
@ -1,3 +0,0 @@
|
||||
if ! sudo supervisorctl start __id__:*; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
@ -1,3 +0,0 @@
|
||||
if ! sudo supervisorctl stop __id__:*; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
@ -1,10 +0,0 @@
|
||||
[program:__name__]
|
||||
process_name=%(program_name)s_%(process_num)02d
|
||||
command=__command__
|
||||
autostart=__auto_start__
|
||||
autorestart=__auto_restart__
|
||||
user=__user__
|
||||
numprocs=__numprocs__
|
||||
redirect_stderr=true
|
||||
stdout_logfile=__log_file__
|
||||
stopwaitsecs=3600
|
@ -1,11 +0,0 @@
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
echo "__key__" | sudo tee -a /home/root/.ssh/authorized_keys
|
||||
sudo useradd -p $(openssl passwd -1 __password__) __user__
|
||||
sudo usermod -aG sudo __user__
|
||||
echo "__user__ ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers
|
||||
sudo mkdir /home/__user__
|
||||
sudo mkdir /home/__user__/.ssh
|
||||
echo "__key__" | sudo tee -a /home/__user__/.ssh/authorized_keys
|
||||
sudo chown -R __user__:__user__ /home/__user__
|
||||
sudo chsh -s /bin/bash __user__
|
||||
sudo su - __user__ -c "ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa" <<< y
|
@ -1,3 +0,0 @@
|
||||
if ! echo '__key__' | sudo tee -a ~/.ssh/authorized_keys; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
@ -1,3 +0,0 @@
|
||||
if ! echo "__content__" | tee __path__; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
@ -1 +0,0 @@
|
||||
ssh-keygen -t rsa -b 4096 -N "" -f ~/.ssh/__name__
|
@ -1 +0,0 @@
|
||||
cat ~/.ssh/id_rsa.pub
|
@ -1 +0,0 @@
|
||||
cat __path__;
|
@ -1 +0,0 @@
|
||||
cat ~/.ssh/__name__.pub
|
@ -1,3 +0,0 @@
|
||||
echo "Rebooting..."
|
||||
|
||||
sudo reboot
|
@ -1,5 +0,0 @@
|
||||
if ! cd __path__; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
__script__
|
@ -1,7 +0,0 @@
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt clean
|
||||
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt update
|
||||
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt upgrade -y
|
||||
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt autoremove -y
|
@ -1,9 +0,0 @@
|
||||
if ! sudo sed -i 's/php__old_version__/php__new_version__/g' /etc/nginx/sites-available/__domain__; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo service nginx restart; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
echo "PHP Version Changed to __new_version__"
|
@ -1,27 +0,0 @@
|
||||
if ! rm -rf __path__; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! mkdir __path__; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo chown -R 755 __path__; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! echo '' | sudo tee /etc/nginx/conf.d/__domain___redirects; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! echo '__vhost__' | sudo tee /etc/nginx/sites-available/__domain__; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo ln -s /etc/nginx/sites-available/__domain__ /etc/nginx/sites-enabled/; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo service nginx restart; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
@ -1,7 +0,0 @@
|
||||
rm -rf __path__
|
||||
|
||||
sudo rm /etc/nginx/sites-available/__domain__
|
||||
|
||||
sudo rm /etc/nginx/sites-enabled/__domain__
|
||||
|
||||
echo "Site deleted"
|
@ -1 +0,0 @@
|
||||
cat /etc/nginx/sites-available/__domain__
|
@ -1,8 +0,0 @@
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt install nginx -y
|
||||
|
||||
if ! echo '__config__' | sudo tee /etc/nginx/nginx.conf; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
sudo service nginx start
|
||||
|
@ -1,85 +0,0 @@
|
||||
user __user__;
|
||||
worker_processes auto;
|
||||
pid /run/nginx.pid;
|
||||
include /etc/nginx/modules-enabled/*.conf;
|
||||
|
||||
events {
|
||||
worker_connections 768;
|
||||
# multi_accept on;
|
||||
}
|
||||
|
||||
http {
|
||||
|
||||
##
|
||||
# Basic Settings
|
||||
##
|
||||
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
keepalive_timeout 65;
|
||||
types_hash_max_size 2048;
|
||||
# server_tokens off;
|
||||
|
||||
# server_names_hash_bucket_size 64;
|
||||
# server_name_in_redirect off;
|
||||
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
##
|
||||
# SSL Settings
|
||||
##
|
||||
|
||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
##
|
||||
# Logging Settings
|
||||
##
|
||||
|
||||
access_log /var/log/nginx/access.log;
|
||||
error_log /var/log/nginx/error.log;
|
||||
|
||||
##
|
||||
# Gzip Settings
|
||||
##
|
||||
|
||||
gzip on;
|
||||
|
||||
# gzip_vary on;
|
||||
# gzip_proxied any;
|
||||
# gzip_comp_level 6;
|
||||
# gzip_buffers 16 8k;
|
||||
# gzip_http_version 1.1;
|
||||
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
##
|
||||
# Virtual Host Configs
|
||||
##
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
include /etc/nginx/sites-enabled/*;
|
||||
}
|
||||
|
||||
|
||||
#mail {
|
||||
# # See sample authentication script at:
|
||||
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
|
||||
#
|
||||
# # auth_http localhost/auth.php;
|
||||
# # pop3_capabilities "TOP" "USER";
|
||||
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
|
||||
#
|
||||
# server {
|
||||
# listen localhost:110;
|
||||
# protocol pop3;
|
||||
# proxy on;
|
||||
# }
|
||||
#
|
||||
# server {
|
||||
# listen localhost:143;
|
||||
# protocol imap;
|
||||
# proxy on;
|
||||
# }
|
||||
#}
|
@ -1,38 +0,0 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen 443 ssl;
|
||||
server_name __domain__ www.__domain__;
|
||||
root __path__/__web_directory__;
|
||||
|
||||
ssl on;
|
||||
ssl_certificate __certificate__;
|
||||
ssl_certificate_key __private_key__;
|
||||
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
add_header X-Content-Type-Options "nosniff";
|
||||
|
||||
index index.php;
|
||||
|
||||
charset utf-8;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
location = /robots.txt { access_log off; log_not_found off; }
|
||||
|
||||
error_page 404 /index.php;
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass unix:/var/run/php/php__php_version__-fpm.sock;
|
||||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known).* {
|
||||
deny all;
|
||||
}
|
||||
|
||||
include conf.d/__domain___redirects;
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name __domain__ www.__domain__;
|
||||
root __path__/__web_directory__;
|
||||
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
add_header X-Content-Type-Options "nosniff";
|
||||
|
||||
index index.php;
|
||||
|
||||
charset utf-8;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
location = /robots.txt { access_log off; log_not_found off; }
|
||||
|
||||
error_page 404 /index.php;
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass unix:/var/run/php/php__php_version__-fpm.sock;
|
||||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known).* {
|
||||
deny all;
|
||||
}
|
||||
|
||||
include conf.d/__domain___redirects;
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
server {
|
||||
listen __port__;
|
||||
server_name _;
|
||||
root /home/vito/phpmyadmin;
|
||||
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
add_header X-Content-Type-Options "nosniff";
|
||||
|
||||
index index.php;
|
||||
|
||||
charset utf-8;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
location = /robots.txt { access_log off; log_not_found off; }
|
||||
|
||||
error_page 404 /index.php;
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass unix:/var/run/php/php__php_version__-fpm.sock;
|
||||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known).* {
|
||||
deny all;
|
||||
}
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
location __from__ {
|
||||
return __mode__ __to__;
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen 443 ssl;
|
||||
server_name __domain__ __aliases__;
|
||||
root __path__;
|
||||
|
||||
ssl on;
|
||||
ssl_certificate __certificate__;
|
||||
ssl_certificate_key __private_key__;
|
||||
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
add_header X-Content-Type-Options "nosniff";
|
||||
|
||||
index index.php;
|
||||
|
||||
charset utf-8;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:__port__/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
}
|
||||
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
location = /robots.txt { access_log off; log_not_found off; }
|
||||
|
||||
error_page 404 /index.php;
|
||||
|
||||
location ~ /\.(?!well-known).* {
|
||||
deny all;
|
||||
}
|
||||
|
||||
include conf.d/__domain___redirects;
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name __domain__ __aliases__;
|
||||
root __path__;
|
||||
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
add_header X-Content-Type-Options "nosniff";
|
||||
|
||||
index index.php;
|
||||
|
||||
charset utf-8;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:__port__/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
}
|
||||
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
location = /robots.txt { access_log off; log_not_found off; }
|
||||
|
||||
error_page 404 /index.php;
|
||||
|
||||
location ~ /\.(?!well-known).* {
|
||||
deny all;
|
||||
}
|
||||
|
||||
include conf.d/__domain___redirects;
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
if ! echo '__redirects__' | sudo tee /etc/nginx/conf.d/__domain___redirects; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo service nginx restart; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
@ -1,7 +0,0 @@
|
||||
if ! echo '__vhost__' | sudo tee /etc/nginx/sites-available/__domain__; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo service nginx restart; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
@ -1,32 +0,0 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen 443 ssl;
|
||||
server_name __domain__ __aliases__;
|
||||
root __path__/__web_directory__;
|
||||
|
||||
ssl on;
|
||||
ssl_certificate __certificate__;
|
||||
ssl_certificate_key __private_key__;
|
||||
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
add_header X-Content-Type-Options "nosniff";
|
||||
|
||||
index index.html;
|
||||
|
||||
charset utf-8;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
location = /robots.txt { access_log off; log_not_found off; }
|
||||
|
||||
error_page 404 /index.html;
|
||||
|
||||
location ~ /\.(?!well-known).* {
|
||||
deny all;
|
||||
}
|
||||
|
||||
include conf.d/__domain___redirects;
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name __domain__ __aliases__;
|
||||
root __path__/__web_directory__;
|
||||
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
add_header X-Content-Type-Options "nosniff";
|
||||
|
||||
index index.html;
|
||||
|
||||
charset utf-8;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
location = /robots.txt { access_log off; log_not_found off; }
|
||||
|
||||
error_page 404 /index.html;
|
||||
|
||||
location ~ /\.(?!well-known).* {
|
||||
deny all;
|
||||
}
|
||||
|
||||
include conf.d/__domain___redirects;
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
echo "Host __host__-__key__
|
||||
Hostname __host__
|
||||
IdentityFile=~/.ssh/__key__" >> ~/.ssh/config
|
||||
|
||||
ssh-keyscan -H __host__ >> ~/.ssh/known_hosts
|
||||
|
||||
rm -rf __path__
|
||||
|
||||
if ! git config --global core.fileMode false; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! git clone -b __branch__ __repo__ __path__; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! find __path__ -type d -exec chmod 755 {} \;; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! find __path__ -type f -exec chmod 644 {} \;; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! cd __path__ && git config core.fileMode false; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
@ -1,7 +0,0 @@
|
||||
if ! cd __path__; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! composer install --no-interaction --prefer-dist --optimize-autoloader --no-dev; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
@ -1 +0,0 @@
|
||||
[ -f /home/vito/__domain__/.env ] && cat /home/vito/__domain__/.env
|
@ -1,7 +0,0 @@
|
||||
if ! cd __path__; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! git checkout -f __branch__; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
@ -1,5 +1,5 @@
|
||||
<div>
|
||||
@if ($site->deploymentScript?->content)
|
||||
@if ($site->deploymentScript)
|
||||
<x-dropdown>
|
||||
<x-slot name="trigger">
|
||||
<x-secondary-button>
|
||||
@ -13,9 +13,10 @@ class="cursor-pointer"
|
||||
hx-post="{{ route('servers.sites.application.auto-deployment', ['server' => $server, 'site' => $site]) }}"
|
||||
hx-swap="outerHTML"
|
||||
hx-target="#auto-deployment"
|
||||
hx-select="#auto-deployment"
|
||||
>
|
||||
{{ __("Enable") }}
|
||||
@if ($site->auto_deployment)
|
||||
@if ($site->isAutoDeployment())
|
||||
<x-heroicon-o-check class="ml-1 h-5 w-5 text-green-600" />
|
||||
@endif
|
||||
</x-dropdown-link>
|
||||
@ -26,7 +27,7 @@ class="cursor-pointer"
|
||||
hx-target="#auto-deployment"
|
||||
>
|
||||
{{ __("Disable") }}
|
||||
@if (! $site->auto_deployment)
|
||||
@if (! $site->isAutoDeployment())
|
||||
<x-heroicon-o-check class="ml-1 h-5 w-5 text-green-600" />
|
||||
@endif
|
||||
</x-dropdown-link>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<div>
|
||||
@if ($site->deploymentScript?->content)
|
||||
@if ($site->deploymentScript)
|
||||
<form
|
||||
id="deploy"
|
||||
hx-post="{{ route("servers.sites.application.deploy", ["server" => $server, "site" => $site]) }}"
|
||||
|
@ -1,9 +1,10 @@
|
||||
<div x-data="">
|
||||
<x-modal name="deployment-script">
|
||||
<x-modal name="deployment-script" max-width="3xl">
|
||||
<form
|
||||
id="deployment-script-form"
|
||||
hx-post="{{ route("servers.sites.application.deployment-script", ["server" => $server, "site" => $site]) }}"
|
||||
hx-select="#deployment-script-form"
|
||||
hx-target="#deployment-script-form"
|
||||
hx-swap="outerHTML"
|
||||
class="p-6"
|
||||
>
|
||||
@ -13,9 +14,9 @@ class="p-6"
|
||||
|
||||
<div class="mt-6">
|
||||
<x-input-label for="script" :value="__('Script')" />
|
||||
<x-textarea rows="10" id="script" name="script" class="mt-1 w-full">
|
||||
{{ old("script", $site->deployment_script_text) }}
|
||||
</x-textarea>
|
||||
<x-code-editor id="script" name="script" lang="sh" class="mt-1 w-full">
|
||||
{{ old("script", $site->deploymentScript?->content) }}
|
||||
</x-code-editor>
|
||||
@error("script")
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
|
@ -19,11 +19,11 @@
|
||||
</tr>
|
||||
@foreach ($deployments as $deployment)
|
||||
<tr>
|
||||
<x-td>
|
||||
<x-td class="truncate">
|
||||
<a
|
||||
href="{{ $deployment->commit_data["url"] }}"
|
||||
target="_blank"
|
||||
class="font-semibold text-primary-600"
|
||||
class="block max-w-[500px] truncate font-semibold text-primary-600"
|
||||
>
|
||||
{{ $deployment->commit_data["message"] }}
|
||||
</a>
|
||||
@ -38,10 +38,12 @@ class="font-semibold text-primary-600"
|
||||
</x-td>
|
||||
<x-td>
|
||||
<x-icon-button
|
||||
x-on:click="$dispatch('open-modal', 'show-log')"
|
||||
id="show-log-{{ $deployment->id }}"
|
||||
hx-get="{{ route('servers.sites.application.deployment.log', ['server' => $server, 'site' => $site, 'deployment' => $deployment]) }}"
|
||||
hx-target="#show-log-content"
|
||||
hx-select="#show-log-content"
|
||||
hx-swap="outerHTML"
|
||||
hx-disable
|
||||
>
|
||||
<x-heroicon-o-eye class="h-5 w-5" />
|
||||
</x-icon-button>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<div x-data="">
|
||||
<x-modal name="update-env">
|
||||
<x-modal name="update-env" max-width="3xl">
|
||||
<form
|
||||
id="update-env-form"
|
||||
hx-post="{{ route("servers.sites.application.env", [$server, $site]) }}"
|
||||
@ -13,17 +13,18 @@ class="p-6"
|
||||
|
||||
<div
|
||||
class="mt-6"
|
||||
id="env-content"
|
||||
hx-get="{{ route("servers.sites.application.env", [$server, $site]) }}"
|
||||
hx-trigger="load"
|
||||
hx-target="#env"
|
||||
hx-select="#env"
|
||||
hx-target="#env-content"
|
||||
hx-select="#env-content"
|
||||
hx-swap="outerHTML"
|
||||
>
|
||||
<x-input-label for="env" :value="__('.env')" />
|
||||
<x-textarea id="env" name="env" rows="10" class="mt-1 block w-full">
|
||||
{{ old("env", session()->get("env") ?? "Loading...") }}
|
||||
</x-textarea>
|
||||
<div id="env-content">
|
||||
<x-code-editor id="env" name="env" rows="10" class="mt-1 block w-full">
|
||||
{{ old("env", session()->get("env") ?? "Loading...") }}
|
||||
</x-code-editor>
|
||||
</div>
|
||||
@error("env")
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
|
5
resources/views/components/alert-danger.blade.php
Normal file
5
resources/views/components/alert-danger.blade.php
Normal file
@ -0,0 +1,5 @@
|
||||
<div
|
||||
class="rounded-lg border-2 border-red-500 border-opacity-50 bg-red-50 p-4 text-red-500 dark:bg-red-500 dark:bg-opacity-10 dark:text-white"
|
||||
>
|
||||
{{ $slot }}
|
||||
</div>
|
5
resources/views/components/alert-success.blade.php
Normal file
5
resources/views/components/alert-success.blade.php
Normal file
@ -0,0 +1,5 @@
|
||||
<div
|
||||
class="rounded-lg border-2 border-green-500 border-opacity-50 bg-green-50 p-4 text-green-500 dark:bg-green-500 dark:bg-opacity-10 dark:text-white"
|
||||
>
|
||||
{{ $slot }}
|
||||
</div>
|
5
resources/views/components/alert-warning.blade.php
Normal file
5
resources/views/components/alert-warning.blade.php
Normal file
@ -0,0 +1,5 @@
|
||||
<div
|
||||
class="rounded-lg border-2 border-yellow-500 border-opacity-50 bg-yellow-50 p-4 text-yellow-500 dark:bg-yellow-500 dark:bg-opacity-10 dark:text-white"
|
||||
>
|
||||
{{ $slot }}
|
||||
</div>
|
5
resources/views/components/alert.blade.php
Normal file
5
resources/views/components/alert.blade.php
Normal file
@ -0,0 +1,5 @@
|
||||
<div
|
||||
class="rounded-lg border-2 border-gray-500 border-opacity-50 bg-gray-50 p-4 text-gray-500 dark:bg-gray-500 dark:bg-opacity-10 dark:text-white"
|
||||
>
|
||||
{{ $slot }}
|
||||
</div>
|
45
resources/views/components/code-editor.blade.php
Normal file
45
resources/views/components/code-editor.blade.php
Normal file
@ -0,0 +1,45 @@
|
||||
@props([
|
||||
"id",
|
||||
"name",
|
||||
"disabled" => false,
|
||||
"lang" => "text",
|
||||
])
|
||||
|
||||
<div
|
||||
x-data="{
|
||||
editorId: @js($id),
|
||||
disabled: @js($disabled),
|
||||
lang: @js($lang),
|
||||
init() {
|
||||
document.body.addEventListener('htmx:afterSettle', (event) => {
|
||||
let editor = null
|
||||
let theme =
|
||||
document.documentElement.className === 'dark'
|
||||
? 'one-dark'
|
||||
: 'github'
|
||||
editor = window.ace.edit(this.editorId)
|
||||
let contentElement = document.getElementById(
|
||||
`text-${this.editorId}`,
|
||||
)
|
||||
editor.setValue(contentElement.innerText, 1)
|
||||
if (this.disabled) {
|
||||
editor.setReadOnly(true)
|
||||
}
|
||||
editor.getSession().setMode(`ace/mode/${this.lang}`)
|
||||
editor.setTheme(`ace/theme/${theme}`)
|
||||
editor.setFontSize('15px')
|
||||
editor.setShowPrintMargin(false)
|
||||
editor.on('change', () => {
|
||||
contentElement.innerHTML = editor.getValue()
|
||||
})
|
||||
document.body.addEventListener('color-scheme-changed', (event) => {
|
||||
theme = event.detail.theme === 'dark' ? 'one-dark' : 'github'
|
||||
editor.setTheme(`ace/theme/${theme}`)
|
||||
})
|
||||
})
|
||||
},
|
||||
}"
|
||||
>
|
||||
<div id="{{ $id }}" class="min-h-[400px] w-full rounded-md border border-gray-200 dark:border-gray-700"></div>
|
||||
<textarea id="text-{{ $id }}" name="{{ $name }}" class="hidden">{{ $slot }}</textarea>
|
||||
</div>
|
@ -1,5 +1,5 @@
|
||||
<div
|
||||
class="h-96 w-full overflow-auto whitespace-pre-line rounded-md border border-gray-200 bg-gray-900 p-5 text-gray-50 dark:border-gray-800"
|
||||
class="h-[500px] w-full overflow-auto whitespace-pre-line rounded-md border border-gray-200 bg-gray-900 p-5 text-gray-50 dark:border-gray-700"
|
||||
>
|
||||
{{ $slot }}
|
||||
</div>
|
||||
|
@ -1,13 +1,19 @@
|
||||
@props([
|
||||
"interval" => "30s",
|
||||
"id",
|
||||
"target" => null,
|
||||
])
|
||||
|
||||
<div
|
||||
id="{{ $id }}"
|
||||
hx-get="{{ request()->getUri() }}"
|
||||
hx-trigger="every {{ $interval }}"
|
||||
hx-select="#{{ $id }}"
|
||||
@if ($target)
|
||||
hx-target="{{ $target }}"
|
||||
hx-select="{{ $target }}"
|
||||
@else
|
||||
hx-select="#{{ $id }}"
|
||||
@endif
|
||||
hx-swap="outerHTML"
|
||||
>
|
||||
{{ $slot }}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<x-server-layout :server="$server">
|
||||
<x-slot name="pageTitle">{{ __("Cronjobs") }}</x-slot>
|
||||
|
||||
@include("cronjobs.partrials.cronjobs-list")
|
||||
@include("cronjobs.partials.cronjobs-list")
|
||||
</x-server-layout>
|
||||
|
@ -46,8 +46,8 @@ class="mt-1 w-full"
|
||||
{{ __("Select") }}
|
||||
</option>
|
||||
<option value="root" @if($user === 'root') selected @endif>root</option>
|
||||
<option value="{{ $server->ssh_user }}" @if($user === $server->ssh_user) selected @endif>
|
||||
{{ $server->ssh_user }}
|
||||
<option value="{{ $server->getSshUser() }}" @if($user === $server->getSshUser()) selected @endif>
|
||||
{{ $server->getSshUser() }}
|
||||
</option>
|
||||
</x-select-input>
|
||||
@error("user")
|
@ -5,7 +5,7 @@
|
||||
{{ __("Your server's Cronjobs are here. You can manage them") }}
|
||||
</x-slot>
|
||||
<x-slot name="aside">
|
||||
@include("cronjobs.partrials.create-cronjob")
|
||||
@include("cronjobs.partials.create-cronjob")
|
||||
</x-slot>
|
||||
</x-card-header>
|
||||
<x-live id="live-cronjobs">
|
||||
@ -18,11 +18,11 @@
|
||||
{{ $cronjob->command }}
|
||||
</span>
|
||||
<span class="text-sm text-gray-400">
|
||||
{{ $cronjob->frequency_label }}
|
||||
{{ $cronjob->frequencyLabel() }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
@include("cronjobs.partrials.status", ["status" => $cronjob->status])
|
||||
@include("cronjobs.partials.status", ["status" => $cronjob->status])
|
||||
<div class="inline">
|
||||
<x-icon-button
|
||||
x-on:click="deleteAction = '{{ route('servers.cronjobs.destroy', ['server' => $server, 'cronJob' => $cronjob]) }}'; $dispatch('open-modal', 'delete-cronjob')"
|
@ -1,3 +0,0 @@
|
||||
<x-server-layout :server="$server">
|
||||
<x-slot name="pageTitle">{{ __("Daemons") }}</x-slot>
|
||||
</x-server-layout>
|
@ -1,3 +1,7 @@
|
||||
@php
|
||||
use App\Enums\ServerStatus;
|
||||
@endphp
|
||||
|
||||
@props([
|
||||
"server",
|
||||
])
|
||||
@ -18,9 +22,6 @@
|
||||
<link href="https://fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet" />
|
||||
|
||||
<script src="{{ asset("static/libs/ace/ace.js") }}"></script>
|
||||
<script src="{{ asset("static/libs/ace/theme-github.js") }}"></script>
|
||||
<script src="{{ asset("static/libs/ace/theme-one-dark.js") }}"></script>
|
||||
<script src="{{ asset("static/libs/ace/mode-sh.js") }}"></script>
|
||||
|
||||
@include("layouts.partials.favicon")
|
||||
|
||||
@ -32,7 +33,6 @@
|
||||
class="min-h-screen min-w-max bg-gray-100 font-sans antialiased dark:bg-gray-900 dark:text-gray-300"
|
||||
x-data=""
|
||||
x-cloak
|
||||
hx-ext="source"
|
||||
>
|
||||
<div class="flex min-h-screen">
|
||||
<div
|
||||
@ -57,7 +57,7 @@ class="left-0 top-0 min-h-screen w-64 flex-none bg-gray-800 p-3 dark:border-r-2
|
||||
{{ __("Servers") }}
|
||||
</div>
|
||||
<div class="mt-2">
|
||||
@include("layouts.partials.server-select", ["server" => isset($server) ? $server : null])
|
||||
@include("layouts.partials.server-select", ["server" => $server ?? null])
|
||||
</div>
|
||||
|
||||
@if (isset($server))
|
||||
@ -66,222 +66,93 @@ class="left-0 top-0 min-h-screen w-64 flex-none bg-gray-800 p-3 dark:border-r-2
|
||||
:href="route('servers.show', ['server' => $server])"
|
||||
:active="request()->routeIs('servers.show')"
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="1.5"
|
||||
stroke="currentColor"
|
||||
class="h-6 w-6"
|
||||
>
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
d="M2.25 12l8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"
|
||||
/>
|
||||
</svg>
|
||||
<x-heroicon-o-home class="h-6 w-6" />
|
||||
<span class="ml-2 text-gray-50">
|
||||
{{ __("Overview") }}
|
||||
</span>
|
||||
</x-sidebar-link>
|
||||
@if ($server->isReady())
|
||||
@if ($server->webserver())
|
||||
<x-sidebar-link
|
||||
:href="route('servers.sites', ['server' => $server])"
|
||||
:active="request()->routeIs('servers.sites') || request()->is('servers/*/sites/*')"
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="1.5"
|
||||
stroke="currentColor"
|
||||
class="h-6 w-6"
|
||||
>
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
d="M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418"
|
||||
/>
|
||||
</svg>
|
||||
<span class="ml-2 text-gray-50">
|
||||
{{ __("Sites") }}
|
||||
</span>
|
||||
</x-sidebar-link>
|
||||
@endif
|
||||
|
||||
@if ($server->database())
|
||||
<x-sidebar-link
|
||||
:href="route('servers.databases', ['server' => $server])"
|
||||
:active="request()->routeIs('servers.databases') ||
|
||||
request()->routeIs('servers.databases.backups')"
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="1.5"
|
||||
stroke="currentColor"
|
||||
class="h-6 w-6"
|
||||
>
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
d="M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125"
|
||||
/>
|
||||
</svg>
|
||||
<span class="ml-2 text-gray-50">
|
||||
{{ __("Databases") }}
|
||||
</span>
|
||||
</x-sidebar-link>
|
||||
@endif
|
||||
|
||||
@if ($server->php())
|
||||
<x-sidebar-link
|
||||
:href="route('servers.php', ['server' => $server])"
|
||||
:active="request()->routeIs('servers.php')"
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="1.5"
|
||||
stroke="currentColor"
|
||||
class="h-6 w-6"
|
||||
>
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
d="M17.25 6.75L22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3l-4.5 16.5"
|
||||
/>
|
||||
</svg>
|
||||
<span class="ml-2 text-gray-50">
|
||||
{{ __("PHP") }}
|
||||
</span>
|
||||
</x-sidebar-link>
|
||||
@endif
|
||||
|
||||
@if ($server->firewall())
|
||||
<x-sidebar-link
|
||||
:href="route('servers.firewall', ['server' => $server])"
|
||||
:active="request()->routeIs('servers.firewall')"
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="1.5"
|
||||
stroke="currentColor"
|
||||
class="h-6 w-6"
|
||||
>
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
d="M15.362 5.214A8.252 8.252 0 0112 21 8.25 8.25 0 016.038 7.048 8.287 8.287 0 009 9.6a8.983 8.983 0 013.361-6.867 8.21 8.21 0 003 2.48z"
|
||||
/>
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
d="M12 18a3.75 3.75 0 00.495-7.467 5.99 5.99 0 00-1.925 3.546 5.974 5.974 0 01-2.133-1A3.75 3.75 0 0012 18z"
|
||||
/>
|
||||
</svg>
|
||||
<span class="ml-2 text-gray-50">
|
||||
{{ __("Firewall") }}
|
||||
</span>
|
||||
</x-sidebar-link>
|
||||
@endif
|
||||
|
||||
@if ($server->webserver())
|
||||
<x-sidebar-link
|
||||
:href="route('servers.cronjobs', ['server' => $server])"
|
||||
:active="request()->routeIs('servers.cronjobs')"
|
||||
:href="route('servers.sites', ['server' => $server])"
|
||||
:active="request()->routeIs('servers.sites') || request()->is('servers/*/sites/*')"
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="1.5"
|
||||
stroke="currentColor"
|
||||
class="h-6 w-6"
|
||||
>
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
d="M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"
|
||||
/>
|
||||
</svg>
|
||||
<x-heroicon-o-globe-alt class="h-6 w-6" />
|
||||
<span class="ml-2 text-gray-50">
|
||||
{{ __("Cronjobs") }}
|
||||
{{ __("Sites") }}
|
||||
</span>
|
||||
</x-sidebar-link>
|
||||
@endif
|
||||
|
||||
@if ($server->database())
|
||||
<x-sidebar-link
|
||||
:href="route('servers.ssh-keys', ['server' => $server])"
|
||||
:active="request()->routeIs('servers.ssh-keys')"
|
||||
:href="route('servers.databases', ['server' => $server])"
|
||||
:active="request()->routeIs('servers.databases') ||
|
||||
request()->routeIs('servers.databases.backups')"
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="1.5"
|
||||
stroke="currentColor"
|
||||
class="h-6 w-6"
|
||||
>
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
d="M15.75 5.25a3 3 0 013 3m3 0a6 6 0 01-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1121.75 8.25z"
|
||||
/>
|
||||
</svg>
|
||||
<x-heroicon-o-circle-stack class="h-6 w-6" />
|
||||
<span class="ml-2 text-gray-50">
|
||||
{{ __("SSH Keys") }}
|
||||
{{ __("Databases") }}
|
||||
</span>
|
||||
</x-sidebar-link>
|
||||
@endif
|
||||
|
||||
@if ($server->php())
|
||||
<x-sidebar-link
|
||||
:href="route('servers.services', ['server' => $server])"
|
||||
:active="request()->routeIs('servers.services')"
|
||||
:href="route('servers.php', ['server' => $server])"
|
||||
:active="request()->routeIs('servers.php')"
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="1.5"
|
||||
stroke="currentColor"
|
||||
class="h-6 w-6"
|
||||
>
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 010 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 010-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.087.22-.128.332-.183.582-.495.644-.869l.214-1.281z"
|
||||
/>
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"
|
||||
/>
|
||||
</svg>
|
||||
<x-heroicon-o-code-bracket class="h-6 w-6" />
|
||||
<span class="ml-2 text-gray-50">
|
||||
{{ __("Services") }}
|
||||
{{ __("PHP") }}
|
||||
</span>
|
||||
</x-sidebar-link>
|
||||
@endif
|
||||
|
||||
@if ($server->firewall())
|
||||
<x-sidebar-link
|
||||
:href="route('servers.firewall', ['server' => $server])"
|
||||
:active="request()->routeIs('servers.firewall')"
|
||||
>
|
||||
<x-heroicon-o-fire class="h-6 w-6" />
|
||||
<span class="ml-2 text-gray-50">
|
||||
{{ __("Firewall") }}
|
||||
</span>
|
||||
</x-sidebar-link>
|
||||
@endif
|
||||
|
||||
<x-sidebar-link
|
||||
:href="route('servers.cronjobs', ['server' => $server])"
|
||||
:active="request()->routeIs('servers.cronjobs')"
|
||||
>
|
||||
<x-heroicon-o-clock class="h-6 w-6" />
|
||||
<span class="ml-2 text-gray-50">
|
||||
{{ __("Cronjobs") }}
|
||||
</span>
|
||||
</x-sidebar-link>
|
||||
<x-sidebar-link
|
||||
:href="route('servers.ssh-keys', ['server' => $server])"
|
||||
:active="request()->routeIs('servers.ssh-keys')"
|
||||
>
|
||||
<x-heroicon-o-key class="h-6 w-6" />
|
||||
<span class="ml-2 text-gray-50">
|
||||
{{ __("SSH Keys") }}
|
||||
</span>
|
||||
</x-sidebar-link>
|
||||
<x-sidebar-link
|
||||
:href="route('servers.services', ['server' => $server])"
|
||||
:active="request()->routeIs('servers.services')"
|
||||
>
|
||||
<x-heroicon-o-cog-6-tooth class="h-6 w-6" />
|
||||
<span class="ml-2 text-gray-50">
|
||||
{{ __("Services") }}
|
||||
</span>
|
||||
</x-sidebar-link>
|
||||
|
||||
<x-sidebar-link
|
||||
:href="route('servers.settings', ['server' => $server])"
|
||||
:active="request()->routeIs('servers.settings')"
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="1.5"
|
||||
stroke="currentColor"
|
||||
class="h-6 w-6"
|
||||
>
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
d="M11.42 15.17L17.25 21A2.652 2.652 0 0021 17.25l-5.877-5.877M11.42 15.17l2.496-3.03c.317-.384.74-.626 1.208-.766M11.42 15.17l-4.655 5.653a2.548 2.548 0 11-3.586-3.586l6.837-5.63m5.108-.233c.55-.164 1.163-.188 1.743-.14a4.5 4.5 0 004.486-6.336l-3.276 3.277a3.004 3.004 0 01-2.25-2.25l3.276-3.276a4.5 4.5 0 00-6.336 4.486c.091 1.076-.071 2.264-.904 2.95l-.102.085m-1.745 1.437L5.909 7.5H4.5L2.25 3.75l1.5-1.5L7.5 4.5v1.409l4.26 4.26m-1.745 1.437l1.745-1.437m6.615 8.206L15.75 15.75M4.867 19.125h.008v.008h-.008v-.008z"
|
||||
/>
|
||||
</svg>
|
||||
<x-heroicon-o-wrench-screwdriver class="h-6 w-6" />
|
||||
<span class="ml-2 text-gray-50">
|
||||
{{ __("Settings") }}
|
||||
</span>
|
||||
@ -290,20 +161,7 @@ class="h-6 w-6"
|
||||
:href="route('servers.logs', ['server' => $server])"
|
||||
:active="request()->routeIs('servers.logs')"
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="1.5"
|
||||
stroke="currentColor"
|
||||
class="h-6 w-6"
|
||||
>
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
d="M6.429 9.75L2.25 12l4.179 2.25m0-4.5l5.571 3 5.571-3m-11.142 0L2.25 7.5 12 2.25l9.75 5.25-4.179 2.25m0 0L21.75 12l-4.179 2.25m0 0l4.179 2.25L12 21.75 2.25 16.5l4.179-2.25m11.142 0l-5.571 3-5.571-3"
|
||||
/>
|
||||
</svg>
|
||||
<x-heroicon-o-square-3-stack-3d class="h-6 w-6" />
|
||||
<span class="ml-2 text-gray-50">
|
||||
{{ __("Logs") }}
|
||||
</span>
|
||||
|
@ -15,6 +15,11 @@ class="flex items-center text-gray-600 dark:text-gray-300"
|
||||
this.theme = theme
|
||||
localStorage.theme = theme
|
||||
this.updateDocument()
|
||||
document.body.dispatchEvent(
|
||||
new CustomEvent('color-scheme-changed', {
|
||||
detail: { theme: this.isDark() ? 'dark' : 'light' },
|
||||
}),
|
||||
)
|
||||
},
|
||||
updateDocument() {
|
||||
if (this.isDark()) {
|
||||
|
@ -9,33 +9,20 @@
|
||||
|
||||
<x-slot name="header">
|
||||
<h2 class="text-lg font-semibold">
|
||||
<a href="{{ $site->activeSsl ? "https://" : "http://" . $site->domain }}" target="_blank">
|
||||
<a href="{{ $site->getUrl() }}" target="_blank">
|
||||
{{ $site->domain }}
|
||||
</a>
|
||||
</h2>
|
||||
<div class="flex items-end">
|
||||
<div class="flex h-20 flex-col items-end justify-center">
|
||||
<div class="flex items-center">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="1.5"
|
||||
stroke="currentColor"
|
||||
class="mr-1 h-5 w-5 text-gray-500"
|
||||
>
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
d="M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418"
|
||||
/>
|
||||
</svg>
|
||||
<x-heroicon-o-globe-alt class="mr-1 h-5 w-5 text-gray-500" />
|
||||
@include("sites.partials.site-status")
|
||||
</div>
|
||||
<x-input-label
|
||||
class="mt-1 cursor-pointer"
|
||||
x-data="{ copied: false }"
|
||||
x-clipboard.raw="{{ $site->web_directory_path }}"
|
||||
x-clipboard.raw="{{ $site->domain }}"
|
||||
>
|
||||
<div
|
||||
class="flex items-center text-sm"
|
||||
@ -47,20 +34,7 @@ class="flex items-center text-sm"
|
||||
"
|
||||
>
|
||||
<div x-show="copied" class="mr-1 flex items-center">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="1.5"
|
||||
stroke="currentColor"
|
||||
class="h-4 w-4 font-bold text-primary-600 dark:text-white"
|
||||
>
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
d="M11.35 3.836c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m8.9-4.414c.376.023.75.05 1.124.08 1.131.094 1.976 1.057 1.976 2.192V16.5A2.25 2.25 0 0118 18.75h-2.25m-7.5-10.5H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V18.75m-7.5-10.5h6.375c.621 0 1.125.504 1.125 1.125v9.375m-8.25-3l1.5 1.5 3-3.75"
|
||||
/>
|
||||
</svg>
|
||||
<x-heroicon-o-check class="h-4 w-4 font-bold text-primary-600 dark:text-white" />
|
||||
</div>
|
||||
{{ $site->domain }}
|
||||
</div>
|
||||
@ -69,20 +43,7 @@ class="h-4 w-4 font-bold text-primary-600 dark:text-white"
|
||||
<div class="mx-5 h-20 border-r border-gray-200 dark:border-gray-800"></div>
|
||||
<div class="flex h-20 flex-col items-end justify-center">
|
||||
<div class="flex items-center">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="1.5"
|
||||
stroke="currentColor"
|
||||
class="mr-1 h-5 w-5 text-gray-500"
|
||||
>
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
d="M21.75 17.25v-.228a4.5 4.5 0 00-.12-1.03l-2.268-9.64a3.375 3.375 0 00-3.285-2.602H7.923a3.375 3.375 0 00-3.285 2.602l-2.268 9.64a4.5 4.5 0 00-.12 1.03v.228m19.5 0a3 3 0 01-3 3H5.25a3 3 0 01-3-3m19.5 0a3 3 0 00-3-3H5.25a3 3 0 00-3 3m16.5 0h.008v.008h-.008v-.008zm-3 0h.008v.008h-.008v-.008z"
|
||||
/>
|
||||
</svg>
|
||||
<x-heroicon-o-server class="mr-1 h-5 w-5 text-gray-500" />
|
||||
@include("servers.partials.server-status", ["server" => $site->server])
|
||||
</div>
|
||||
<x-input-label
|
||||
@ -100,20 +61,7 @@ class="flex items-center text-sm"
|
||||
"
|
||||
>
|
||||
<div x-show="copied" class="mr-1 flex items-center">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="1.5"
|
||||
stroke="currentColor"
|
||||
class="h-4 w-4 font-bold text-primary-600 dark:text-white"
|
||||
>
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
d="M11.35 3.836c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m8.9-4.414c.376.023.75.05 1.124.08 1.131.094 1.976 1.057 1.976 2.192V16.5A2.25 2.25 0 0118 18.75h-2.25m-7.5-10.5H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V18.75m-7.5-10.5h6.375c.621 0 1.125.504 1.125 1.125v9.375m-8.25-3l1.5 1.5 3-3.75"
|
||||
/>
|
||||
</svg>
|
||||
<x-heroicon-o-check class="h-4 w-4 font-bold text-primary-600 dark:text-white" />
|
||||
</div>
|
||||
{{ $site->server->ip }}
|
||||
</div>
|
||||
@ -133,22 +81,25 @@ class="h-4 w-4 font-bold text-primary-600 dark:text-white"
|
||||
:href="route('servers.sites.show', ['server' => $site->server, 'site' => $site])"
|
||||
:active="request()->routeIs('servers.sites.show')"
|
||||
>
|
||||
<x-heroicon-o-globe-alt class="mr-2 h-5 w-5" />
|
||||
{{ __("Application") }}
|
||||
</x-secondary-sidebar-link>
|
||||
@if ($site->isReady() && $site->hasFeature(SiteFeature::SSL))
|
||||
@if ($site->hasFeature(SiteFeature::SSL))
|
||||
<x-secondary-sidebar-link
|
||||
:href="route('servers.sites.ssl', ['server' => $site->server, 'site' => $site])"
|
||||
:active="request()->routeIs('servers.sites.ssl')"
|
||||
>
|
||||
<x-heroicon-o-lock-closed class="mr-2 h-5 w-5" />
|
||||
{{ __("SSL") }}
|
||||
</x-secondary-sidebar-link>
|
||||
@endif
|
||||
|
||||
@if ($site->isReady() && $site->hasFeature(SiteFeature::QUEUES))
|
||||
@if ($site->hasFeature(SiteFeature::QUEUES))
|
||||
<x-secondary-sidebar-link
|
||||
:href="route('servers.sites.queues', ['server' => $site->server, 'site' => $site])"
|
||||
:active="request()->routeIs('servers.sites.queues')"
|
||||
>
|
||||
<x-heroicon-o-queue-list class="mr-2 h-5 w-5" />
|
||||
{{ __("Queues") }}
|
||||
</x-secondary-sidebar-link>
|
||||
@endif
|
||||
@ -157,12 +108,14 @@ class="h-4 w-4 font-bold text-primary-600 dark:text-white"
|
||||
:href="route('servers.sites.settings', ['server' => $site->server, 'site' => $site])"
|
||||
:active="request()->routeIs('servers.sites.settings')"
|
||||
>
|
||||
<x-heroicon-o-cog-6-tooth class="mr-2 h-5 w-5" />
|
||||
{{ __("Settings") }}
|
||||
</x-secondary-sidebar-link>
|
||||
<x-secondary-sidebar-link
|
||||
:href="route('servers.sites.logs', ['server' => $site->server, 'site' => $site])"
|
||||
:active="request()->routeIs('servers.sites.logs')"
|
||||
>
|
||||
<x-heroicon-o-square-3-stack-3d class="mr-2 h-5 w-5" />
|
||||
{{ __("Logs") }}
|
||||
</x-secondary-sidebar-link>
|
||||
</div>
|
||||
|
@ -1,6 +1,12 @@
|
||||
<x-server-layout :server="$server">
|
||||
<x-slot name="pageTitle">{{ __("PHP") }}</x-slot>
|
||||
|
||||
@error("version")
|
||||
<x-alert-danger>
|
||||
<x-input-error :messages="$errors->get('version')" />
|
||||
</x-alert-danger>
|
||||
@enderror
|
||||
|
||||
@include("php.partials.installed-versions")
|
||||
|
||||
@if ($server->defaultService("php"))
|
||||
|
@ -17,13 +17,11 @@ class="p-6"
|
||||
<x-select-input name="extension" class="mt-1 w-full">
|
||||
<option value="" selected>{{ __("Select") }}</option>
|
||||
@foreach (config("core.php_extensions") as $extension)
|
||||
<option value="{{ $extension }}" {{-- @if(in_array($extension, $installedExtensions)) disabled @endif --}}>
|
||||
<option
|
||||
value="{{ $extension }}"
|
||||
x-bind:disabled="installedExtensions.includes('{{ $extension }}')"
|
||||
>
|
||||
{{ $extension }}
|
||||
{{--
|
||||
@if (in_array($extension, $installedExtensions))
|
||||
({{ __("Installed") }})
|
||||
@endif
|
||||
--}}
|
||||
</option>
|
||||
@endforeach
|
||||
</x-select-input>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div x-data="{ version: '', uninstallAction: '' }">
|
||||
<div x-data="{ version: '', uninstallAction: '', installedExtensions: [] }">
|
||||
<x-card-header>
|
||||
<x-slot name="title">{{ __("Installed PHPs") }}</x-slot>
|
||||
<x-slot name="description">
|
||||
@ -33,7 +33,7 @@
|
||||
<x-slot name="content">
|
||||
<x-dropdown-link
|
||||
class="cursor-pointer"
|
||||
x-on:click="version = '{{ $php->version }}'; $dispatch('open-modal', 'install-extension')"
|
||||
x-on:click="version = '{{ $php->version }}'; installedExtensions = {{ json_encode($php->type_data['extensions'] ?? []) }}; $dispatch('open-modal', 'install-extension')"
|
||||
>
|
||||
{{ __("Install Extension") }}
|
||||
</x-dropdown-link>
|
||||
|
@ -36,8 +36,11 @@ class="mt-1 w-full"
|
||||
{{ __("Select") }}
|
||||
</option>
|
||||
<option value="root" @if(old('user') == 'root') selected @endif>root</option>
|
||||
<option value="{{ $server->ssh_user }}" @if(old('user') == $server->ssh_user) selected @endif>
|
||||
{{ $server->ssh_user }}
|
||||
<option
|
||||
value="{{ $server->getSshUser() }}"
|
||||
@if(old('user') == $server->getSshUser()) selected @endif
|
||||
>
|
||||
{{ $server->getSshUser() }}
|
||||
</option>
|
||||
</x-select-input>
|
||||
@error("user")
|
||||
|
@ -26,10 +26,6 @@
|
||||
<x-status status="danger">{{ $status }}</x-status>
|
||||
@endif
|
||||
|
||||
@if ($status == \App\Enums\QueueStatus::FAILED)
|
||||
<x-status status="danger">{{ $status }}</x-status>
|
||||
@endif
|
||||
|
||||
@if ($status == \App\Enums\QueueStatus::DELETING)
|
||||
<x-status status="danger">{{ $status }}</x-status>
|
||||
@endif
|
||||
|
@ -21,7 +21,7 @@ class="p-6"
|
||||
<option value="" selected disabled>
|
||||
{{ __("Select") }}
|
||||
</option>
|
||||
@foreach ($keys as $key)
|
||||
@foreach (auth()->user()->sshKeys as $key)
|
||||
<option value="{{ $key->id }}" @if($key->id === old('key_id')) selected @endif>
|
||||
{{ $key->name }}
|
||||
</option>
|
||||
|
@ -1,3 +1,8 @@
|
||||
@php
|
||||
use App\Enums\Database;
|
||||
use App\Enums\Webserver;
|
||||
@endphp
|
||||
|
||||
<x-container x-data="">
|
||||
<x-card>
|
||||
<x-slot name="title">{{ __("Create new Server") }}</x-slot>
|
||||
@ -205,7 +210,7 @@ class="mt-1 block w-full"
|
||||
<x-input-label for="webserver" value="Webserver" />
|
||||
<x-select-input id="webserver" name="webserver" class="mt-1 w-full">
|
||||
@foreach (config("core.webservers") as $ws)
|
||||
<option value="{{ $ws }}" @if($ws == old('webserver')) selected @endif>
|
||||
<option value="{{ $ws }}" @if($ws == old('webserver', Webserver::NGINX)) selected @endif>
|
||||
{{ $ws }}
|
||||
</option>
|
||||
@endforeach
|
||||
@ -218,7 +223,7 @@ class="mt-1 block w-full"
|
||||
<x-input-label for="database" value="Database" />
|
||||
<x-select-input id="database" name="database" class="mt-1 w-full">
|
||||
@foreach (config("core.databases") as $db)
|
||||
<option value="{{ $db }}" @if($db == old('database')) selected @endif>
|
||||
<option value="{{ $db }}" @if($db == old('database', Database::MYSQL80)) selected @endif>
|
||||
{{ $db }}
|
||||
</option>
|
||||
@endforeach
|
||||
@ -231,7 +236,7 @@ class="mt-1 block w-full"
|
||||
<x-input-label for="php" value="PHP" />
|
||||
<x-select-input id="php" name="php" class="mt-1 w-full">
|
||||
@foreach (config("core.php_versions") as $p)
|
||||
<option value="{{ $p }}" @if($p == old('php')) selected @endif>
|
||||
<option value="{{ $p }}" @if($p == old('php', '8.2')) selected @endif>
|
||||
{{ $p }}
|
||||
</option>
|
||||
@endforeach
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x-slot name="aside"></x-slot>
|
||||
</x-card-header>
|
||||
|
||||
<x-live id="live-services">
|
||||
<x-live id="live-services" interval="5s">
|
||||
<div class="space-y-3">
|
||||
@foreach ($services as $service)
|
||||
<x-item-card>
|
||||
|
@ -10,6 +10,8 @@
|
||||
hx-post="{{ route("servers.sites.settings.php", ["server" => $server, "site" => $site]) }}"
|
||||
hx-swap="outerHTML"
|
||||
hx-select="#change-php-version"
|
||||
hx-ext="disable-element"
|
||||
hx-disable-element="#btn-change-php-version"
|
||||
class="space-y-6"
|
||||
>
|
||||
<div>
|
||||
@ -29,7 +31,7 @@ class="space-y-6"
|
||||
</form>
|
||||
|
||||
<x-slot name="actions">
|
||||
<x-primary-button form="change-php-version" hx-disable>
|
||||
<x-primary-button id="btn-change-php-version" form="change-php-version" hx-disable>
|
||||
{{ __("Save") }}
|
||||
</x-primary-button>
|
||||
</x-slot>
|
||||
|
@ -5,35 +5,35 @@
|
||||
{{ __("You can change your site's VHost configuration") }}
|
||||
</x-slot>
|
||||
|
||||
<div
|
||||
id="update-vhost-container"
|
||||
hx-get="{{ route("servers.sites.settings.vhost", ["server" => $server, "site" => $site]) }}"
|
||||
hx-trigger="load"
|
||||
hx-target="#vhost"
|
||||
hx-select="#vhost"
|
||||
<form
|
||||
id="update-vhost"
|
||||
hx-post="{{ route("servers.sites.settings.vhost", ["server" => $server, "site" => $site]) }}"
|
||||
hx-swap="outerHTML"
|
||||
hx-select="#update-vhost"
|
||||
class="space-y-6"
|
||||
hx-ext="disable-element"
|
||||
hx-disable-element="#btn-update-vhost"
|
||||
>
|
||||
<form
|
||||
id="update-vhost"
|
||||
hx-post="{{ route("servers.sites.settings.vhost", ["server" => $server, "site" => $site]) }}"
|
||||
<div
|
||||
hx-get="{{ route("servers.sites.settings.vhost", ["server" => $server, "site" => $site]) }}"
|
||||
hx-trigger="load"
|
||||
hx-target="#vhost-container"
|
||||
hx-select="#vhost-container"
|
||||
hx-swap="outerHTML"
|
||||
hx-target="#update-vhost-container"
|
||||
hx-select="#update-vhost-container"
|
||||
class="space-y-6"
|
||||
>
|
||||
<div>
|
||||
<x-textarea id="vhost" name="vhost" rows="10" class="mt-1 block w-full">
|
||||
<div id="vhost-container">
|
||||
<x-code-editor id="vhost" name="vhost" rows="10" class="mt-1 block w-full">
|
||||
{{ session()->has("vhost") ? session()->get("vhost") : "Loading..." }}
|
||||
</x-textarea>
|
||||
@error("vhost")
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</x-code-editor>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@error("vhost")
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<x-slot name="actions">
|
||||
<x-primary-button form="update-vhost" hx-disable>
|
||||
<x-primary-button form="update-vhost" id="btn-update-vhost" hx-disable>
|
||||
{{ __("Save") }}
|
||||
</x-primary-button>
|
||||
</x-slot>
|
||||
|
@ -10,6 +10,8 @@
|
||||
hx-trigger="submit"
|
||||
hx-select="#create-site-form"
|
||||
hx-swap="outerHTML"
|
||||
hx-ext="disable-element"
|
||||
hx-disable-element="#btn-create-site"
|
||||
class="space-y-6"
|
||||
>
|
||||
<div>
|
||||
@ -72,7 +74,7 @@ class="mt-1 block w-full"
|
||||
@include("sites.partials.create." . $type)
|
||||
</form>
|
||||
<x-slot name="actions">
|
||||
<x-primary-button hx-disable form="create-site-form">
|
||||
<x-primary-button id="btn-create-site" hx-disable form="create-site-form">
|
||||
{{ __("Create") }}
|
||||
</x-primary-button>
|
||||
</x-slot>
|
||||
|
Reference in New Issue
Block a user