Fix indentation in workflow heredoc blocks to prevent YAML scanner error
All checks were successful
Setup EC2 Tools / setup-server (push) Successful in 1m55s

This commit is contained in:
vickytechkey 2026-09-08 23:28:57 +05:30
parent 5077c04291
commit 29f3536a63

View file

@ -120,50 +120,50 @@ jobs:
echo "Configuring Nginx..."
if [ -f /etc/letsencrypt/live/socialmedia.tradhox.com/fullchain.pem ]; then
sudo tee /etc/nginx/sites-available/socialmedia.tradhox.com > /dev/null << 'EOF'
server {
server_name socialmedia.tradhox.com;
root /var/www/trypost/public;
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/php8.4-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.(?!well-known).* {
deny all;
}
server {
server_name socialmedia.tradhox.com;
root /var/www/trypost/public;
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/php8.4-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.(?!well-known).* {
deny all;
}
listen [::]:443 ssl;
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/socialmedia.tradhox.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/socialmedia.tradhox.com/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
}
listen [::]:443 ssl;
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/socialmedia.tradhox.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/socialmedia.tradhox.com/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
}
server {
listen 80;
listen [::]:80;
server_name socialmedia.tradhox.com;
return 301 https://$host$request_uri;
}
EOF
server {
listen 80;
listen [::]:80;
server_name socialmedia.tradhox.com;
return 301 https://$host$request_uri;
}
EOF
fi
sudo ln -sf /etc/nginx/sites-available/socialmedia.tradhox.com /etc/nginx/sites-enabled/
@ -172,17 +172,17 @@ EOF
# 7. Configure Supervisor for Horizon Queue Worker
echo "Configuring Supervisor for Laravel Horizon..."
sudo tee /etc/supervisor/conf.d/trypost-horizon.conf > /dev/null << 'EOF'
[program:trypost-horizon]
process_name=%(program_name)s
command=php /var/www/trypost/artisan horizon
autostart=true
autorestart=true
user=ubuntu
redirect_stderr=true
stdout_logfile=/var/www/trypost/storage/logs/horizon.log
stopwaitsecs=3600
EOF
sed -e 's/^[[:space:]]*//' << 'EOF' | sudo tee /etc/supervisor/conf.d/trypost-horizon.conf > /dev/null
[program:trypost-horizon]
process_name=%(program_name)s
command=php /var/www/trypost/artisan horizon
autostart=true
autorestart=true
user=ubuntu
redirect_stderr=true
stdout_logfile=/var/www/trypost/storage/logs/horizon.log
stopwaitsecs=3600
EOF
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl restart trypost-horizon || sudo supervisorctl start trypost-horizon
@ -191,5 +191,3 @@ EOF
(crontab -l 2>/dev/null | grep -v 'schedule:run'; echo "* * * * * cd /var/www/trypost && php artisan schedule:run >> /dev/null 2>&1") | crontab -
echo "Setup Complete! Tools installed: Nginx, PHP 8.4, Composer, Node.js, Supervisor, Redis, Horizon"
# Trigger workflow run