mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 14:36:17 +00:00
Merge (#127)
This commit is contained in:
@ -1,7 +0,0 @@
|
||||
if ! echo '__data__' | sudo -u __user__ crontab -; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo -u __user__ crontab -l; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
@ -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,5 +0,0 @@
|
||||
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -;
|
||||
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt update
|
||||
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt install nodejs -y
|
@ -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 +0,0 @@
|
||||
cat /etc/php/__version__/cli/php.ini
|
@ -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,17 +0,0 @@
|
||||
if ! sudo chown -R 755 /home/vito/phpmyadmin; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! echo '__vhost__' | sudo tee /etc/nginx/sites-available/phpmyadmin; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo ln -s /etc/nginx/sites-available/phpmyadmin /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
|
||||
|
||||
echo "PHPMyAdmin vhost created"
|
@ -1,11 +0,0 @@
|
||||
sudo rm -rf __path__
|
||||
|
||||
sudo rm /etc/nginx/sites-available/phpmyadmin
|
||||
|
||||
sudo rm /etc/nginx/sites-enabled/phpmyadmin
|
||||
|
||||
if ! sudo service nginx restart; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
echo "PHPMyAdmin deleted"
|
@ -1,21 +0,0 @@
|
||||
sudo rm -rf phpmyadmin
|
||||
|
||||
if ! wget https://files.phpmyadmin.net/phpMyAdmin/5.1.2/phpMyAdmin-5.1.2-all-languages.zip; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! unzip phpMyAdmin-5.1.2-all-languages.zip; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! rm -rf phpMyAdmin-5.1.2-all-languages.zip; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! mv phpMyAdmin-5.1.2-all-languages phpmyadmin; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! mv phpmyadmin/config.sample.inc.php phpmyadmin/config.inc.php; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
@ -1,3 +0,0 @@
|
||||
sudo service __service__ restart
|
||||
|
||||
sudo service __service__ status | cat
|
@ -1 +0,0 @@
|
||||
sudo service __service__ status | cat
|
@ -1,3 +0,0 @@
|
||||
sudo service __service__ start
|
||||
|
||||
sudo service __service__ status | cat
|
@ -1,3 +0,0 @@
|
||||
sudo service __service__ stop
|
||||
|
||||
sudo service __service__ status | cat
|
@ -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 +0,0 @@
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt install certbot python3-certbot-nginx -y
|
@ -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 +0,0 @@
|
||||
sudo sed -i 's/__key__//g' ~/.ssh/authorized_keys
|
@ -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,27 +0,0 @@
|
||||
if ! curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! chmod +x wp-cli.phar; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! sudo mv wp-cli.phar /usr/local/bin/wp; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
rm -rf __path__
|
||||
|
||||
if ! wp --path=__path__ core download; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! wp --path=__path__ core config --dbname='__db_name__' --dbuser='__db_user__' --dbpass='__db_pass__' --dbhost='__db_host__' --dbprefix='__db_prefix__'; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
if ! wp --path=__path__ core install --url='http://__domain__' --title="__title__" --admin_user='__username__' --admin_password="__password__" --admin_email='__email__'; then
|
||||
echo 'VITO_SSH_ERROR' && exit 1
|
||||
fi
|
||||
|
||||
print "Wordpress installed!"
|
@ -1,5 +1,4 @@
|
||||
@import "toastr.css";
|
||||
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
@ -7,3 +6,7 @@
|
||||
[x-cloak] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
body {
|
||||
@apply text-gray-700 dark:text-gray-300;
|
||||
}
|
||||
|
@ -1,11 +1,86 @@
|
||||
import { Livewire, Alpine } from '../../vendor/livewire/livewire/dist/livewire.esm';
|
||||
import 'flowbite';
|
||||
|
||||
Alpine.directive('clipboard', (el) => {
|
||||
let text = el.textContent
|
||||
import Alpine from 'alpinejs';
|
||||
window.Alpine = Alpine;
|
||||
Alpine.start();
|
||||
|
||||
el.addEventListener('click', () => {
|
||||
navigator.clipboard.writeText(text)
|
||||
})
|
||||
})
|
||||
import htmx from "htmx.org";
|
||||
window.htmx = htmx;
|
||||
window.htmx.defineExtension('disable-element', {
|
||||
onEvent: function (name, evt) {
|
||||
let elt = evt.detail.elt;
|
||||
let target = elt.getAttribute("hx-disable-element");
|
||||
let targetElements = (target === "self") ? [elt] : document.querySelectorAll(target);
|
||||
|
||||
Livewire.start()
|
||||
for (let i = 0; i < targetElements.length; i++) {
|
||||
if (name === "htmx:beforeRequest" && targetElements[i]) {
|
||||
targetElements[i].disabled = true;
|
||||
} else if (name === "htmx:afterRequest" && targetElements[i]) {
|
||||
targetElements[i].disabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
document.body.addEventListener('htmx:configRequest', (event) => {
|
||||
event.detail.headers['X-CSRF-TOKEN'] = document.head.querySelector('meta[name="csrf-token"]').content;
|
||||
if (window.getSelection) { window.getSelection().removeAllRanges(); }
|
||||
else if (document.selection) { document.selection.empty(); }
|
||||
});
|
||||
document.body.addEventListener('htmx:beforeRequest', (event) => {
|
||||
let targetElements = event.target.querySelectorAll('[hx-disable]');
|
||||
for (let i = 0; i < targetElements.length; i++) {
|
||||
targetElements[i].disabled = true;
|
||||
}
|
||||
});
|
||||
document.body.addEventListener('htmx:afterRequest', (event) => {
|
||||
let targetElements = event.target.querySelectorAll('[hx-disable]');
|
||||
for (let i = 0; i < targetElements.length; i++) {
|
||||
targetElements[i].disabled = false;
|
||||
}
|
||||
});
|
||||
|
||||
import toastr from 'toastr';
|
||||
window.toastr = toastr;
|
||||
window.toastr.options = {
|
||||
"debug": false,
|
||||
"positionClass": "toast-bottom-right",
|
||||
"preventDuplicates": true,
|
||||
}
|
||||
|
||||
import tippy from 'tippy.js';
|
||||
import 'tippy.js/dist/tippy.css';
|
||||
document.body.addEventListener('htmx:afterSettle', (event) => {
|
||||
tippy('[data-tooltip]', {
|
||||
content(reference) {
|
||||
return reference.getAttribute('data-tooltip');
|
||||
},
|
||||
});
|
||||
});
|
||||
tippy('[data-tooltip]', {
|
||||
content(reference) {
|
||||
return reference.getAttribute('data-tooltip');
|
||||
},
|
||||
});
|
||||
|
||||
window.copyToClipboard = async function (text) {
|
||||
try {
|
||||
await navigator.clipboard.writeText(text);
|
||||
} catch (err) {
|
||||
const textArea = document.createElement("textarea");
|
||||
textArea.value = text;
|
||||
|
||||
textArea.style.position = "absolute";
|
||||
textArea.style.left = "-999999px";
|
||||
|
||||
document.body.prepend(textArea);
|
||||
textArea.select();
|
||||
|
||||
try {
|
||||
document.execCommand('copy');
|
||||
} catch (error) {
|
||||
//
|
||||
} finally {
|
||||
textArea.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
43
resources/js/bootstrap.js
vendored
43
resources/js/bootstrap.js
vendored
@ -1,43 +0,0 @@
|
||||
/**
|
||||
* We'll load the axios HTTP library which allows us to easily issue requests
|
||||
* to our Laravel back-end. This library automatically handles sending the
|
||||
* CSRF token as a header based on the value of the "XSRF" token cookie.
|
||||
*/
|
||||
|
||||
import axios from 'axios';
|
||||
|
||||
window.axios = axios;
|
||||
|
||||
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
||||
|
||||
/**
|
||||
* Echo exposes an expressive API for subscribing to channels and listening
|
||||
* for events that are broadcast by Laravel. Echo and event broadcasting
|
||||
* allows your team to easily build robust real-time web applications.
|
||||
*/
|
||||
|
||||
// import Echo from 'laravel-echo';
|
||||
|
||||
// import Pusher from 'pusher-js';
|
||||
// window.Pusher = Pusher;
|
||||
|
||||
// window.Echo = new Echo({
|
||||
// broadcaster: 'pusher',
|
||||
// key: import.meta.env.VITE_PUSHER_APP_KEY,
|
||||
// cluster: import.meta.env.VITE_PUSHER_APP_CLUSTER ?? 'mt1',
|
||||
// wsHost: import.meta.env.VITE_PUSHER_HOST ? import.meta.env.VITE_PUSHER_HOST : `ws-${import.meta.env.VITE_PUSHER_APP_CLUSTER}.pusher.com`,
|
||||
// wsPort: import.meta.env.VITE_PUSHER_PORT ?? 80,
|
||||
// wssPort: import.meta.env.VITE_PUSHER_PORT ?? 443,
|
||||
// forceTLS: (import.meta.env.VITE_PUSHER_SCHEME ?? 'https') === 'https',
|
||||
// enabledTransports: ['ws', 'wss'],
|
||||
// });
|
||||
|
||||
import toastr from 'toastr';
|
||||
|
||||
window.toastr = toastr;
|
||||
|
||||
window.toastr.options = {
|
||||
"debug": false,
|
||||
"positionClass": "toast-bottom-right",
|
||||
"preventDuplicates": true,
|
||||
}
|
38
resources/views/application/auto-deployment.blade.php
Normal file
38
resources/views/application/auto-deployment.blade.php
Normal file
@ -0,0 +1,38 @@
|
||||
<div>
|
||||
@if ($site->deploymentScript)
|
||||
<x-dropdown>
|
||||
<x-slot name="trigger">
|
||||
<x-secondary-button>
|
||||
{{ __("Auto Deployment") }}
|
||||
</x-secondary-button>
|
||||
</x-slot>
|
||||
<x-slot name="content">
|
||||
<div id="auto-deployment">
|
||||
<x-dropdown-link
|
||||
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->isAutoDeployment())
|
||||
<x-heroicon name="o-check" class="ml-1 h-5 w-5 text-green-600" />
|
||||
@endif
|
||||
</x-dropdown-link>
|
||||
<x-dropdown-link
|
||||
class="cursor-pointer"
|
||||
hx-delete="{{ route('servers.sites.application.auto-deployment', ['server' => $server, 'site' => $site]) }}"
|
||||
hx-swap="outerHTML"
|
||||
hx-target="#auto-deployment"
|
||||
>
|
||||
{{ __("Disable") }}
|
||||
@if (! $site->isAutoDeployment())
|
||||
<x-heroicon name="o-check" class="ml-1 h-5 w-5 text-green-600" />
|
||||
@endif
|
||||
</x-dropdown-link>
|
||||
</div>
|
||||
</x-slot>
|
||||
</x-dropdown>
|
||||
@endif
|
||||
</div>
|
39
resources/views/application/change-branch.blade.php
Normal file
39
resources/views/application/change-branch.blade.php
Normal file
@ -0,0 +1,39 @@
|
||||
<div x-data="">
|
||||
<x-modal name="change-branch">
|
||||
<form
|
||||
id="change-branch-form"
|
||||
hx-post="{{ route("servers.sites.application.branch", ["server" => $server, "site" => $site]) }}"
|
||||
hx-select="#change-branch-form"
|
||||
hx-swap="outerHTML"
|
||||
class="p-6"
|
||||
>
|
||||
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
||||
{{ __("Change Branch") }}
|
||||
</h2>
|
||||
|
||||
<div class="mt-6">
|
||||
<x-input-label for="branch" :value="__('Branch')" />
|
||||
<x-text-input
|
||||
value="{{ old('branch', $site->branch) }}"
|
||||
id="branch"
|
||||
name="branch"
|
||||
type="text"
|
||||
class="mt-1 w-full"
|
||||
/>
|
||||
@error("branch")
|
||||
<x-input-error class="mt-2" :messages="$message" />
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="mt-6 flex items-center justify-end">
|
||||
<x-secondary-button type="button" x-on:click="$dispatch('close')">
|
||||
{{ __("Cancel") }}
|
||||
</x-secondary-button>
|
||||
|
||||
<x-primary-button class="ml-3" hx-disable>
|
||||
{{ __("Save") }}
|
||||
</x-primary-button>
|
||||
</div>
|
||||
</form>
|
||||
</x-modal>
|
||||
</div>
|
14
resources/views/application/deploy.blade.php
Normal file
14
resources/views/application/deploy.blade.php
Normal file
@ -0,0 +1,14 @@
|
||||
<div>
|
||||
@if ($site->deploymentScript)
|
||||
<form
|
||||
id="deploy"
|
||||
hx-post="{{ route("servers.sites.application.deploy", ["server" => $server, "site" => $site]) }}"
|
||||
hx-swap="outerHTML"
|
||||
hx-select="#deploy"
|
||||
>
|
||||
<x-primary-button hx-disable>
|
||||
{{ __("Deploy") }}
|
||||
</x-primary-button>
|
||||
</form>
|
||||
@endif
|
||||
</div>
|
36
resources/views/application/deployment-script.blade.php
Normal file
36
resources/views/application/deployment-script.blade.php
Normal file
@ -0,0 +1,36 @@
|
||||
<div x-data="">
|
||||
<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"
|
||||
>
|
||||
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
||||
{{ __("Deployment Script") }}
|
||||
</h2>
|
||||
|
||||
<div class="mt-6">
|
||||
<x-input-label for="script" :value="__('Script')" />
|
||||
<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
|
||||
</div>
|
||||
|
||||
<div class="mt-6 flex items-center justify-end">
|
||||
<x-secondary-button type="button" x-on:click="$dispatch('close')">
|
||||
{{ __("Cancel") }}
|
||||
</x-secondary-button>
|
||||
|
||||
<x-primary-button class="ml-3" hx-disable>
|
||||
{{ __("Save") }}
|
||||
</x-primary-button>
|
||||
</div>
|
||||
</form>
|
||||
</x-modal>
|
||||
</div>
|
75
resources/views/application/deployments-list.blade.php
Normal file
75
resources/views/application/deployments-list.blade.php
Normal file
@ -0,0 +1,75 @@
|
||||
@php
|
||||
$deployments = $site
|
||||
->deployments()
|
||||
->latest()
|
||||
->paginate(10);
|
||||
@endphp
|
||||
|
||||
<div x-data="">
|
||||
<x-card-header>
|
||||
<x-slot name="title">{{ __("Deployments") }}</x-slot>
|
||||
</x-card-header>
|
||||
<x-live id="live-deployments">
|
||||
<x-table>
|
||||
<x-thead>
|
||||
<x-tr>
|
||||
<x-th>{{ __("Commit") }}</x-th>
|
||||
<x-th>{{ __("Date") }}</x-th>
|
||||
<x-th>{{ __("Status") }}</x-th>
|
||||
<x-th></x-th>
|
||||
</x-tr>
|
||||
</x-thead>
|
||||
<x-tbody>
|
||||
@foreach ($deployments as $deployment)
|
||||
<x-tr>
|
||||
<x-td class="truncate">
|
||||
<a
|
||||
href="{{ $deployment->commit_data["url"] ?? "#" }}"
|
||||
target="_blank"
|
||||
class="block max-w-[500px] truncate font-semibold text-primary-600"
|
||||
>
|
||||
{{ $deployment->commit_data["message"] ?? "No message" }}
|
||||
</a>
|
||||
</x-td>
|
||||
<x-td>
|
||||
<x-datetime :value="$deployment->created_at" />
|
||||
</x-td>
|
||||
<x-td>
|
||||
<div class="inline-flex">
|
||||
@include("application.partials.deployment-status", ["status" => $deployment->status])
|
||||
</div>
|
||||
</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"
|
||||
>
|
||||
<x-heroicon name="o-eye" class="h-5 w-5" />
|
||||
</x-icon-button>
|
||||
</x-td>
|
||||
</x-tr>
|
||||
@endforeach
|
||||
</x-tbody>
|
||||
</x-table>
|
||||
</x-live>
|
||||
<div class="mt-5">
|
||||
{{ $deployments->withQueryString()->links() }}
|
||||
</div>
|
||||
<x-modal name="show-log" max-width="4xl">
|
||||
<div class="p-6" id="show-log-content">
|
||||
<h2 class="mb-5 text-lg font-medium text-gray-900 dark:text-gray-100">
|
||||
{{ __("View Log") }}
|
||||
</h2>
|
||||
<x-console-view>{{ session()->get("content") }}</x-console-view>
|
||||
<div class="mt-6 flex justify-end">
|
||||
<x-secondary-button type="button" x-on:click="$dispatch('close')">
|
||||
{{ __("Close") }}
|
||||
</x-secondary-button>
|
||||
</div>
|
||||
</div>
|
||||
</x-modal>
|
||||
</div>
|
44
resources/views/application/env.blade.php
Normal file
44
resources/views/application/env.blade.php
Normal file
@ -0,0 +1,44 @@
|
||||
<div x-data="">
|
||||
<x-modal name="update-env" max-width="3xl">
|
||||
<form
|
||||
id="update-env-form"
|
||||
hx-post="{{ route("servers.sites.application.env", [$server, $site]) }}"
|
||||
hx-swap="outerHTML"
|
||||
hx-select="#update-env-form"
|
||||
class="p-6"
|
||||
>
|
||||
<h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
|
||||
{{ __("Update .env File") }}
|
||||
</h2>
|
||||
|
||||
<div
|
||||
class="mt-6"
|
||||
hx-get="{{ route("servers.sites.application.env", [$server, $site]) }}"
|
||||
hx-trigger="load"
|
||||
hx-target="#env-content"
|
||||
hx-select="#env-content"
|
||||
hx-swap="outerHTML"
|
||||
>
|
||||
<x-input-label for="env" :value="__('.env')" />
|
||||
<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
|
||||
</div>
|
||||
|
||||
<div class="mt-6 flex items-center justify-end">
|
||||
<x-secondary-button type="button" x-on:click="$dispatch('close')">
|
||||
{{ __("Cancel") }}
|
||||
</x-secondary-button>
|
||||
|
||||
<x-primary-button class="ml-3" hx-disable>
|
||||
{{ __("Save") }}
|
||||
</x-primary-button>
|
||||
</div>
|
||||
</form>
|
||||
</x-modal>
|
||||
</div>
|
1
resources/views/application/laravel-app.blade.php
Normal file
1
resources/views/application/laravel-app.blade.php
Normal file
@ -0,0 +1 @@
|
||||
@include("application.php-app")
|
@ -1,9 +1,11 @@
|
||||
@if($status == \App\Enums\DeploymentStatus::DEPLOYING)
|
||||
@if ($status == \App\Enums\DeploymentStatus::DEPLOYING)
|
||||
<x-status status="warning">{{ $status }}</x-status>
|
||||
@endif
|
||||
@if($status == \App\Enums\DeploymentStatus::FINISHED)
|
||||
|
||||
@if ($status == \App\Enums\DeploymentStatus::FINISHED)
|
||||
<x-status status="success">{{ $status }}</x-status>
|
||||
@endif
|
||||
@if($status == \App\Enums\DeploymentStatus::FAILED)
|
||||
|
||||
@if ($status == \App\Enums\DeploymentStatus::FAILED)
|
||||
<x-status status="danger">{{ $status }}</x-status>
|
||||
@endif
|
56
resources/views/application/php-app.blade.php
Normal file
56
resources/views/application/php-app.blade.php
Normal file
@ -0,0 +1,56 @@
|
||||
<div>
|
||||
<x-card-header>
|
||||
<x-slot name="title">{{ __("Application") }}</x-slot>
|
||||
<x-slot name="description">
|
||||
{{ __("Here you can manage your application") }}
|
||||
</x-slot>
|
||||
<x-slot name="aside">
|
||||
<div class="flex flex-col items-end lg:flex-row lg:items-center">
|
||||
<div class="mb-2 lg:mb-0 lg:mr-2">
|
||||
@include("application.deploy")
|
||||
</div>
|
||||
@if ($site->source_control_id)
|
||||
<div class="mb-2 lg:mb-0 lg:mr-2">
|
||||
@include("application.auto-deployment")
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<x-dropdown>
|
||||
<x-slot name="trigger">
|
||||
<x-secondary-button>
|
||||
{{ __("Manage") }}
|
||||
</x-secondary-button>
|
||||
</x-slot>
|
||||
<x-slot name="content">
|
||||
@if ($site->source_control_id)
|
||||
<x-dropdown-link
|
||||
class="cursor-pointer"
|
||||
x-on:click="$dispatch('open-modal', 'change-branch')"
|
||||
>
|
||||
{{ __("Branch") }}
|
||||
</x-dropdown-link>
|
||||
@endif
|
||||
|
||||
<x-dropdown-link
|
||||
class="cursor-pointer"
|
||||
x-on:click="$dispatch('open-modal', 'deployment-script')"
|
||||
>
|
||||
{{ __("Deployment Script") }}
|
||||
</x-dropdown-link>
|
||||
<x-dropdown-link class="cursor-pointer" x-on:click="$dispatch('open-modal', 'update-env')">
|
||||
{{ __(".env") }}
|
||||
</x-dropdown-link>
|
||||
</x-slot>
|
||||
</x-dropdown>
|
||||
@if ($site->source_control_id)
|
||||
@include("application.change-branch")
|
||||
@endif
|
||||
|
||||
@include("application.deployment-script")
|
||||
@include("application.env")
|
||||
</div>
|
||||
</x-slot>
|
||||
</x-card-header>
|
||||
|
||||
@include("application.deployments-list")
|
||||
</div>
|
1
resources/views/application/php-blank-app.blade.php
Normal file
1
resources/views/application/php-blank-app.blade.php
Normal file
@ -0,0 +1 @@
|
||||
@include("application.php-app")
|
10
resources/views/application/wordpress-app.blade.php
Normal file
10
resources/views/application/wordpress-app.blade.php
Normal file
@ -0,0 +1,10 @@
|
||||
<div>
|
||||
<x-simple-card class="flex items-center justify-between">
|
||||
<span>
|
||||
{{ __("Your Wordpress site is installed and ready to use! ") }}
|
||||
</span>
|
||||
<x-secondary-button :href="$site->url" target="_blank">
|
||||
{{ __("Open Website") }}
|
||||
</x-secondary-button>
|
||||
</x-simple-card>
|
||||
</div>
|
@ -1,26 +1,30 @@
|
||||
<x-guest-layout>
|
||||
<div class="mb-4 text-sm text-gray-600 dark:text-gray-400">
|
||||
{{ __('This is a secure area of the application. Please confirm your password before continuing.') }}
|
||||
{{ __("This is a secure area of the application. Please confirm your password before continuing.") }}
|
||||
</div>
|
||||
|
||||
<form method="POST" action="{{ route('password.confirm') }}">
|
||||
<form method="POST" action="{{ route("password.confirm") }}">
|
||||
@csrf
|
||||
|
||||
<!-- Password -->
|
||||
<div>
|
||||
<x-input-label for="password" :value="__('Password')" />
|
||||
|
||||
<x-text-input id="password" class="block mt-1 w-full"
|
||||
type="password"
|
||||
name="password"
|
||||
required autocomplete="current-password" />
|
||||
<x-text-input
|
||||
id="password"
|
||||
class="mt-1 block w-full"
|
||||
type="password"
|
||||
name="password"
|
||||
required
|
||||
autocomplete="current-password"
|
||||
/>
|
||||
|
||||
<x-input-error :messages="$errors->get('password')" class="mt-2" />
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end mt-4">
|
||||
<div class="mt-4 flex justify-end">
|
||||
<x-primary-button>
|
||||
{{ __('Confirm') }}
|
||||
{{ __("Confirm") }}
|
||||
</x-primary-button>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -1,24 +1,32 @@
|
||||
<x-guest-layout>
|
||||
<div class="mb-4 text-sm text-gray-600 dark:text-gray-400">
|
||||
{{ __('Forgot your password? No problem. Just let us know your email address and we will email you a password reset link that will allow you to choose a new one.') }}
|
||||
{{ __("Forgot your password? No problem. Just let us know your email address and we will email you a password reset link that will allow you to choose a new one.") }}
|
||||
</div>
|
||||
|
||||
<!-- Session Status -->
|
||||
<x-auth-session-status class="mb-4" :status="session('status')" />
|
||||
|
||||
<form method="POST" action="{{ route('password.email') }}">
|
||||
<form method="POST" action="{{ route("password.email") }}">
|
||||
@csrf
|
||||
|
||||
<!-- Email Address -->
|
||||
<div>
|
||||
<x-input-label for="email" :value="__('Email')" />
|
||||
<x-text-input id="email" class="block mt-1 w-full" type="email" name="email" :value="old('email')" required autofocus />
|
||||
<x-text-input
|
||||
id="email"
|
||||
class="mt-1 block w-full"
|
||||
type="email"
|
||||
name="email"
|
||||
:value="old('email')"
|
||||
required
|
||||
autofocus
|
||||
/>
|
||||
<x-input-error :messages="$errors->get('email')" class="mt-2" />
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-end mt-4">
|
||||
<div class="mt-4 flex items-center justify-end">
|
||||
<x-primary-button>
|
||||
{{ __('Email Password Reset Link') }}
|
||||
{{ __("Email Password Reset Link") }}
|
||||
</x-primary-button>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -2,57 +2,68 @@
|
||||
<!-- Session Status -->
|
||||
<x-auth-session-status class="mb-4" :status="session('status')" />
|
||||
|
||||
<form method="POST" action="{{ route('login') }}">
|
||||
<form method="POST" action="{{ route("login") }}">
|
||||
@csrf
|
||||
<div x-data="{ isPasswordVisible: false }">
|
||||
<div>
|
||||
<!-- Email Address -->
|
||||
<div>
|
||||
<x-input-label for="email" :value="__('Email')" />
|
||||
<x-text-input id="email" class="block mt-1 w-full" type="email" name="email" :value="old('email')"
|
||||
required autofocus autocomplete="username" />
|
||||
<x-text-input
|
||||
id="email"
|
||||
class="mt-1 block w-full"
|
||||
type="email"
|
||||
name="email"
|
||||
:value="old('email')"
|
||||
required
|
||||
autofocus
|
||||
autocomplete="username"
|
||||
/>
|
||||
<x-input-error :messages="$errors->get('email')" class="mt-2" />
|
||||
</div>
|
||||
|
||||
<!-- Password -->
|
||||
<div class="mt-4">
|
||||
<x-input-label for="password" :value="__('Password')" />
|
||||
<x-text-input id="password" class="block mt-1 w-full"
|
||||
x-bind:type="isPasswordVisible ? 'text' : 'password'" name="password" required
|
||||
autocomplete="current-password" />
|
||||
<x-text-input
|
||||
id="password"
|
||||
class="mt-1 block w-full"
|
||||
type="password"
|
||||
name="password"
|
||||
required
|
||||
autocomplete="current-password"
|
||||
/>
|
||||
<x-input-error :messages="$errors->get('password')" class="mt-2" />
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-between">
|
||||
<!-- Remember Me -->
|
||||
<div class="block mt-4 ">
|
||||
<div class="mt-4 block">
|
||||
<label for="remember_me" class="inline-flex items-center">
|
||||
<input id="remember_me" type="checkbox"
|
||||
class="rounded dark:bg-gray-900 border-gray-300 dark:border-gray-700 text-indigo-600 shadow-sm focus:ring-indigo-500 dark:focus:ring-indigo-600 dark:focus:ring-offset-gray-800"
|
||||
name="remember">
|
||||
<span class="ml-2 text-sm text-gray-600 dark:text-gray-400">{{ __('Remember me') }}</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Show Password -->
|
||||
<div class="block mt-4">
|
||||
<label for="show_password" class="inline-flex items-center float-right">
|
||||
<input id="show_password" type="checkbox" x-model="isPasswordVisible"
|
||||
class="rounded dark:bg-gray-900 border-gray-300 dark:border-gray-700 text-indigo-600 shadow-sm focus:ring-indigo-500 dark:focus:ring-indigo-600 dark:focus:ring-offset-gray-800">
|
||||
<span class="ml-2 text-sm text-gray-600 dark:text-gray-400">{{ __('Show password') }}</span>
|
||||
<input
|
||||
id="remember_me"
|
||||
type="checkbox"
|
||||
class="rounded border-gray-300 text-indigo-600 shadow-sm focus:ring-indigo-500 dark:border-gray-700 dark:bg-gray-900 dark:focus:ring-indigo-600 dark:focus:ring-offset-gray-800"
|
||||
name="remember"
|
||||
/>
|
||||
<span class="ml-2 text-sm text-gray-600 dark:text-gray-400">
|
||||
{{ __("Remember me") }}
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-end mt-4">
|
||||
@if (Route::has('password.request'))
|
||||
<a class="underline text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-offset-gray-800"
|
||||
href="{{ route('password.request') }}">
|
||||
{{ __('Forgot your password?') }}
|
||||
<div class="mt-4 flex items-center justify-end">
|
||||
@if (Route::has("password.request"))
|
||||
<a
|
||||
class="rounded-md text-sm text-gray-600 underline hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 dark:text-gray-400 dark:hover:text-gray-100 dark:focus:ring-offset-gray-800"
|
||||
href="{{ route("password.request") }}"
|
||||
>
|
||||
{{ __("Forgot your password?") }}
|
||||
</a>
|
||||
@endif
|
||||
|
||||
<x-primary-button class="ml-3">
|
||||
{{ __('Log in') }}
|
||||
{{ __("Log in") }}
|
||||
</x-primary-button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,21 +1,37 @@
|
||||
<x-guest-layout>
|
||||
<form method="POST" action="{{ route('password.update') }}">
|
||||
<form method="POST" action="{{ route("password.update") }}">
|
||||
@csrf
|
||||
|
||||
<!-- Password Reset Token -->
|
||||
<input type="hidden" name="token" value="{{ $token }}">
|
||||
<input type="hidden" name="token" value="{{ $token }}" />
|
||||
|
||||
<!-- Email Address -->
|
||||
<div>
|
||||
<x-input-label for="email" :value="__('Email')" />
|
||||
<x-text-input id="email" class="block mt-1 w-full" type="email" name="email" :value="old('email', $email)" required autofocus autocomplete="username" />
|
||||
<x-text-input
|
||||
id="email"
|
||||
class="mt-1 block w-full"
|
||||
type="email"
|
||||
name="email"
|
||||
:value="old('email', $email)"
|
||||
required
|
||||
autofocus
|
||||
autocomplete="username"
|
||||
/>
|
||||
<x-input-error :messages="$errors->get('email')" class="mt-2" />
|
||||
</div>
|
||||
|
||||
<!-- Password -->
|
||||
<div class="mt-4">
|
||||
<x-input-label for="password" :value="__('Password')" />
|
||||
<x-text-input id="password" class="block mt-1 w-full" type="password" name="password" required autocomplete="new-password" />
|
||||
<x-text-input
|
||||
id="password"
|
||||
class="mt-1 block w-full"
|
||||
type="password"
|
||||
name="password"
|
||||
required
|
||||
autocomplete="new-password"
|
||||
/>
|
||||
<x-input-error :messages="$errors->get('password')" class="mt-2" />
|
||||
</div>
|
||||
|
||||
@ -23,16 +39,21 @@
|
||||
<div class="mt-4">
|
||||
<x-input-label for="password_confirmation" :value="__('Confirm Password')" />
|
||||
|
||||
<x-text-input id="password_confirmation" class="block mt-1 w-full"
|
||||
type="password"
|
||||
name="password_confirmation" required autocomplete="new-password" />
|
||||
<x-text-input
|
||||
id="password_confirmation"
|
||||
class="mt-1 block w-full"
|
||||
type="password"
|
||||
name="password_confirmation"
|
||||
required
|
||||
autocomplete="new-password"
|
||||
/>
|
||||
|
||||
<x-input-error :messages="$errors->get('password_confirmation')" class="mt-2" />
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-end mt-4">
|
||||
<div class="mt-4 flex items-center justify-end">
|
||||
<x-primary-button>
|
||||
{{ __('Reset Password') }}
|
||||
{{ __("Reset Password") }}
|
||||
</x-primary-button>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -4,21 +4,29 @@
|
||||
<form method="POST">
|
||||
@csrf
|
||||
<div class="mb-4 text-sm text-gray-600 dark:text-gray-400">
|
||||
{{ __('Please enter your recovery code') }}
|
||||
{{ __("Please enter your recovery code") }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<x-input-label for="recovery_code" :value="__('Recovery Code')" />
|
||||
<x-text-input id="recovery_code" class="block mt-1 w-full" type="text" name="recovery_code" required autofocus autocomplete="recovery_code" />
|
||||
<x-text-input
|
||||
id="recovery_code"
|
||||
class="mt-1 block w-full"
|
||||
type="text"
|
||||
name="recovery_code"
|
||||
required
|
||||
autofocus
|
||||
autocomplete="recovery_code"
|
||||
/>
|
||||
<x-input-error :messages="$errors->get('recovery_code')" class="mt-2" />
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-end mt-4">
|
||||
<div class="mt-4 flex items-center justify-end">
|
||||
<x-secondary-button class="mr-2" x-on:click="recover = false">
|
||||
{{ __('Login') }}
|
||||
{{ __("Login") }}
|
||||
</x-secondary-button>
|
||||
<x-primary-button type="submit">
|
||||
{{ __('Recover') }}
|
||||
{{ __("Recover") }}
|
||||
</x-primary-button>
|
||||
</div>
|
||||
</form>
|
||||
@ -27,21 +35,29 @@
|
||||
<form method="POST">
|
||||
@csrf
|
||||
<div class="mb-4 text-sm text-gray-600 dark:text-gray-400">
|
||||
{{ __('Please confirm access to your account by entering the authentication code provided by your authenticator application.') }}
|
||||
{{ __("Please confirm access to your account by entering the authentication code provided by your authenticator application.") }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<x-input-label for="code" :value="__('Code')" />
|
||||
<x-text-input id="code" class="block mt-1 w-full" type="text" name="code" required autofocus autocomplete="code" />
|
||||
<x-text-input
|
||||
id="code"
|
||||
class="mt-1 block w-full"
|
||||
type="text"
|
||||
name="code"
|
||||
required
|
||||
autofocus
|
||||
autocomplete="code"
|
||||
/>
|
||||
<x-input-error :messages="$errors->get('code')" class="mt-2" />
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-end mt-4">
|
||||
<div class="mt-4 flex items-center justify-end">
|
||||
<x-secondary-button class="mr-2" x-on:click="recover = true">
|
||||
{{ __('Recover') }}
|
||||
{{ __("Recover") }}
|
||||
</x-secondary-button>
|
||||
<x-primary-button type="submit">
|
||||
{{ __('Login') }}
|
||||
{{ __("Login") }}
|
||||
</x-primary-button>
|
||||
</div>
|
||||
</form>
|
||||
|
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>
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user