User Tools

Site Tools


servers:windows:nginx:friendica

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
servers:windows:nginx:friendica [2025/11/21 01:07] Sean Rhoneservers:windows:nginx:friendica [2025/11/29 01:08] (current) Sean Rhone
Line 56: Line 56:
 ===== PHP ===== ===== PHP =====
  
-  "wsl.exe" --distribution openSUSE-Tumbleweed --user root -- nano '/etc/php8/fpm/php-fpm.d/social.conf'+  "wsl.exe" --distribution openSUSE-Tumbleweed --user root -- '/usr/bin/nano'/etc/php8/fpm/php-fpm.d/social.conf'
  
 <code> <code>
 [social] [social]
 +listen = "127.0.0.1:9005"
  
-; User/Group 
 user = "espionage724" user = "espionage724"
 group = "espionage724" group = "espionage724"
- 
-; Socket 
-listen = "127.0.0.1:9005" 
 listen.allowed_clients = "127.0.0.1" listen.allowed_clients = "127.0.0.1"
  
-; Process Management 
 pm = "ondemand" pm = "ondemand"
 pm.max_children = "8" pm.max_children = "8"
 pm.process_idle_timeout = "30" pm.process_idle_timeout = "30"
  
-; openSUSE php.ini Defaults +php_value[error_reporting] = "~E_ALL" 
-php_value[session.save_path] = "/var/lib/php8/sessions"+php_value[display_errors] = "Off" 
 +php_value[log_errors] = "Off"
  
-; General 
-php_value[log_errors] = "0" 
-php_value[error_reporting] = "~E_ALL" 
-;php_value[display_errors] = "On" 
 php_value[date.timezone] = "America/New_York" php_value[date.timezone] = "America/New_York"
 php_value[max_execution_time] = "200" php_value[max_execution_time] = "200"
Line 88: Line 81:
 php_value[max_file_uploads] = "100" php_value[max_file_uploads] = "100"
 php_value[register_argc_argv] = "On" php_value[register_argc_argv] = "On"
 +php_value[session.save_path] = "/var/lib/php8/sessions"
  
 ; End</code> ; End</code>
Line 179: Line 173:
 @echo off @echo off
  
-START "Social PHP-FPM" "wsl.exe" --distribution openSUSE-Tumbleweed --user root -- '/usr/sbin/php-fpm' -c '/etc/php8/fpm/php-fpm.d/social.conf' -F+START "Social PHP-FPM" /MIN "wsl.exe" --distribution openSUSE-Tumbleweed --user root -- '/usr/sbin/php-fpm' -c '/etc/php8/fpm/php-fpm.d/social.conf' -F
  
 :: End</code> :: End</code>
  
   "%SystemDrive%\www\scripts\social\PHP-FPM.bat"   "%SystemDrive%\www\scripts\social\PHP-FPM.bat"
 +
 +===== Worker =====
 +
 +  "notepad.exe" "%SystemDrive%\www\scripts\social\Worker.bat"
 +
 +<code>
 +@echo off
 +
 +TITLE Social Worker
 +
 +"wsl.exe" --distribution openSUSE-Tumbleweed --cd "/mnt/c/www/social" -- '/usr/bin/php' '/mnt/c/www/social/bin/console.php' worker
 +
 +:: End</code>
 +
 +  "%SystemDrive%\www\scripts\social\Worker.bat"
  
 ===== Update ===== ===== Update =====
  
-  "notepad.exe" "%SystemDrive%\www\scripts\media\Update.bat"+  "notepad.exe" "%SystemDrive%\www\scripts\social\Update.bat"
  
 <code> <code>
 @echo off @echo off
  
-:: Piwigo +TITLE Social Updater
-"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media" pull origin "master"+
  
-:: Bootstrap Darkroom +"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\social" reset --hard "origin/develop" 
-"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media\themes\bootstrap_darkroom" pull origin "master"+"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\social" pull origin "develop" --rebase 
 + 
 +"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\social\addon" reset --hard "origin/develop" 
 +"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\social\addon" pull origin "develop--rebase 
 + 
 +"wsl.exe" --distribution openSUSE-Tumbleweed -- '/usr/bin/composer' --working-dir='/mnt/c/www/social' --no-cache install --no-dev 
 + 
 +"wsl.exe" --distribution openSUSE-Tumbleweed --cd "/mnt/c/www/social" -- '/usr/bin/php' '/mnt/c/www/social/bin/console.php' worker 
 + 
 +"wsl.exe" --distribution openSUSE-Tumbleweed --cd "/mnt/c/www/social" -- '/usr/bin/php' '/mnt/c/www/social/bin/console.php' dbstructure update --force 
 +"wsl.exe" --distribution openSUSE-Tumbleweed --cd "/mnt/c/www/social" -- '/usr/bin/php' '/mnt/c/www/social/bin/console.php' dbstructure drop --execute 
 +"wsl.exe" --distribution openSUSE-Tumbleweed --cd "/mnt/c/www/social" -- '/usr/bin/php' '/mnt/c/www/social/bin/console.php' postupdate
  
 :: End</code> :: End</code>
  
-  "%SystemDrive%\www\scripts\media\Update.bat"+  "%SystemDrive%\www\scripts\social\Update.bat"
  
 ===== Back-up ===== ===== Back-up =====
  
-  * TODO+  * ''D:\Servers\Scheduled Backups''
  
-  "notepad.exe" "%SystemDrive%\www\scripts\media\Back-up.bat"+  "notepad.exe" "%SystemDrive%\www\scripts\social\Back-up.bat"
  
 <code> <code>
 @echo off @echo off
 +
 +TITLE Social Back-up
  
 :: User\Downloads :: User\Downloads
-"tar.exe" -czf "%UserProfile%\Downloads\dokuwiki-files-auto-%RANDOM%.tar.gz" -C "%SystemDrive%\www\wiki" "data/pages" "data/meta" "data/media" "data/media_meta" "data/attic" "data/media_attic" "conf"+::"tar.exe" -czf "%UserProfile%\Downloads\friendica-files-auto-%RANDOM%.tar.gz" -C "%SystemDrive%\www" "social" 
 +::"%ProgramFiles%\MariaDB 12.2\bin\mariadb-dump.exe-u "root--opt -r "%UserProfile%\Downloads\%RANDOM%-friendica.sql" "friendica"
  
 :: NAS :: NAS
-::"tar.exe" -czf "D:\Servers\Scheduled Backups\dokuwiki-files-auto-%RANDOM%.tar.gz" -C "%SystemDrive%\www\wiki" "data/pages" "data/meta" "data/media" "data/media_meta" "data/attic" "data/media_attic" "conf"+"tar.exe" -czf "D:\Servers\Scheduled Backups\friendica-files-auto-%RANDOM%.tar.gz" -C "%SystemDrive%\www" "social" 
 +"%ProgramFiles%\MariaDB 12.2\bin\mariadb-dump.exe-u "root--opt -r "D:\Servers\Scheduled Backups\%RANDOM%-friendica.sql" "friendica"
  
 :: End</code> :: End</code>
  
-  "%SystemDrive%\www\scripts\media\Back-up.bat"+  "%SystemDrive%\www\scripts\social\Back-up.bat"
  
 ===== Maintenance ===== ===== Maintenance =====
  
-  "notepad.exe" "%SystemDrive%\www\scripts\media\Maintenance.bat"+  "notepad.exe" "%SystemDrive%\www\scripts\social\Maintenance.bat"
  
 <code> <code>
 @echo off @echo off
  
-:: Piwigo +TITLE Social Maintenance
-"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media" reset --hard+
  
-"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media" gc --aggressive --prune="all" +CALL "%SystemDrive%\www\scripts\social\Git Fix.bat"
-"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\mediafsck --full --strict+
  
-:: Bootstrap Darkroom +"wsl.exe" --distribution openSUSE-Tumbleweed --cd "/mnt/c/www/social" -- '/usr/bin/php' '/mnt/c/www/social/bin/console.php' cache clear 
-"%ProgramFiles%\Git\bin\git.exe" -"%SystemDrive%\www\media\themes\bootstrap_darkroomreset --hard +"wsl.exe" --distribution openSUSE-Tumbleweed --cd "/mnt/c/www/social" -- '/usr/bin/php' '/mnt/c/www/social/bin/console.php' clearavatarcache
- +
-"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media\themes\bootstrap_darkroom" gc --aggressive --prune="all" +
-"%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\media\themes\bootstrap_darkroomfsck --full --strict+
  
 :: End</code> :: End</code>
  
-  "%SystemDrive%\www\scripts\media\Maintenance.bat"+  "%SystemDrive%\www\scripts\social\Maintenance.bat"
  
 ===== Git Fix ===== ===== Git Fix =====
Line 252: Line 270:
 <code> <code>
 @echo off @echo off
 +
 +TITLE Social Git Fix
  
 RMDIR /S /Q "%SystemDrive%\www\social\.git" RMDIR /S /Q "%SystemDrive%\www\social\.git"
Line 284: Line 304:
  
   "%SystemDrive%\www\scripts\social\Git Fix.bat"   "%SystemDrive%\www\scripts\social\Git Fix.bat"
 +
 +====== Shortcuts ======
 +
 +===== Autostart =====
 +
 +==== PHP-FPM ====
 +
 +  "explorer.exe" "%AppData%\Microsoft\Windows\Start Menu\Programs\StartUp"
 +
 +  "%SystemDrive%\www\scripts\social\PHP-FPM.bat"
 +
 +  Social PHP-FPM
 +
 +====== Task Scheduler ======
 +
 +****
 +
 +  taskschd.msc
 +
 +===== Worker =====
 +
 +  * TODO: On-login, every 15 minutes
 +
 +  Social Worker
 +
 +  "%SystemDrive%\www\scripts\social\Worker.bat"
 +
 +===== Update =====
 +
 +  * ''4:00:00 AM'' daily
 +
 +  Social Update
 +
 +  "%SystemDrive%\www\scripts\social\Update.bat"
 +
 +===== Back-up =====
 +
 +  * Monthly -> All months -> Days: ''5''
 +  * ''4:15:00 AM''
 +
 +  Social Back-up
 +
 +  "%SystemDrive%\www\scripts\social\Back-up.bat"
 +
 +===== Maintenance =====
 +
 +  * Monthly -> All months -> Days: ''5''
 +  * ''4:30:00 AM''
 +
 +  Social Maintenance
 +
 +  "%SystemDrive%\www\scripts\social\Maintenance.bat"
 +
 +====== Service ======
 +
 +===== Worker =====
 +
 +==== Service ====
 +
 +  "wsl.exe" --distribution openSUSE-Tumbleweed --user root -- '/usr/bin/nano' '/etc/systemd/system/social-d.service'
 +
 +<code>
 +[Service]
 +User=espionage724
 +Group=espionage724
 +Type=oneshot
 +
 +WorkingDirectory=/mnt/c/www/social
 +
 +ExecStart='/usr/bin/php' '/mnt/c/www/social/bin/console.php' worker
 +
 +ExecStartPost='/usr/bin/sync'
 +
 +# End</code>
 +
 +==== Timer ====
 +
 +  * Every 10 minutes (([[https://wiki.friendi.ca/docs/install#required_background_tasks|info]]))
 +
 +  "wsl.exe" --distribution openSUSE-Tumbleweed --user root -- '/usr/bin/nano' '/etc/systemd/system/social-d.timer' && "wsl.exe" --distribution openSUSE-Tumbleweed --user root -- '/usr/bin/systemctl' daemon-reload && "wsl.exe" --distribution openSUSE-Tumbleweed --user root -- '/usr/bin/systemctl' enable 'social-d.timer' --now && "wsl.exe" --distribution openSUSE-Tumbleweed --user root -- '/usr/bin/systemctl' start 'social-d' && "wsl.exe" --distribution openSUSE-Tumbleweed -- '/usr/bin/systemctl' status 'social-d' -l
 +
 +<code>
 +[Unit]
 +Description=Friendica Worker Daemon
 +After=network-online.target
 +Wants=network-online.target
 +
 +[Timer]
 +OnBootSec=10m
 +OnUnitActiveSec=10m
 +
 +[Install]
 +WantedBy=timers.target
 +
 +# End</code>
  
 ====== Initial Setup ====== ====== Initial Setup ======
Line 291: Line 406:
 ====== Settings ====== ====== Settings ======
  
-  * ''x'' is WSL IP shown on host+  * ''x'' is WSL virtual adapter ''IPv4 Address''
  
   ipconfig   ipconfig
/var/www/wiki/data/attic/servers/windows/nginx/friendica.1763705279.txt.gz · Last modified: by Sean Rhone

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki