Update pixelfed-install.sh

This commit is contained in:
CanbiZ 2025-03-03 15:18:07 +01:00
parent 8ddfc057d1
commit 66a3e96273

View File

@ -6,7 +6,7 @@
# License: MIT
# https://github.com/tteck/Proxmox/raw/main/LICENSE
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
@ -61,7 +61,7 @@ msg_info "Setup Postgres Database"
DB_NAME=pixelfed_db
DB_USER=pixelfed_user
DB_PASS="$(openssl rand -base64 18 | cut -c1-13)"
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc|gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg
echo "deb https://apt.postgresql.org/pub/repos/apt bookworm-pgdg main" >/etc/apt/sources.list.d/pgdg.list
apt-get update
apt-get install -y postgresql-17
@ -118,21 +118,6 @@ systemctl restart php8.3-fpm
msg_ok "Pixelfed successfully set up"
msg_info "Creating Services"
cat <<EOF >/etc/supervisor/conf.d/pixelfed-worker.conf
[program:pixelfed-worker]
command=/usr/bin/php /opt/pixelfed/artisan queue:work
autostart=true
autorestart=true
user=root
numprocs=1
redirect_stderr=true
stdout_logfile=/opt/pixelfed/storage/logs/worker.log
EOL
EOF
supervisorctl reread
supervisorctl update
supervisorctl start pixelfed-worker
cat <<EOF >/etc/nginx/sites-available/pixelfed.conf
server {
listen 80;
@ -179,7 +164,21 @@ Restart=always
[Install]
WantedBy=multi-user.target
EOF
cat <<EOF >/etc/systemd/system/pixelfed-scheduler.service
[Unit]
Description=Pixelfed Scheduler
After=network.target
[Service]
User=www-data
ExecStart=/usr/bin/php /opt/pixelfed/artisan schedule:run
Restart=always
[Install]
WantedBy=multi-user.target
EOF
systemctl enable --now pixelfed-scheduler
systemctl enable --now pixelfed-horizon
msg_ok "Created Services"