Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
servers:nginx:friendica [2019/06/28 23:19] – Mostly change to Fedora Server Sean Rhone | servers:nginx:friendica [2019/06/29 00:51] – Sean Rhone |
---|
* [[servers:nginx_php_php-fpm | nginx + PHP + PHP-FPM]] | * [[servers:nginx_php_php-fpm | nginx + PHP + PHP-FPM]] |
* [[servers:nginx:lets_encrypt | Let's Encrypt]] | * [[servers:nginx:lets_encrypt | Let's Encrypt]] |
| |
====== Dependencies ====== | |
| |
* ''unzip'' was a suggested requirement when running Composer later | |
| |
sudo apt install 'unzip' | |
| |
====== Download Source ====== | ====== Download Source ====== |
| |
**** | * :!: ''develop'' branch was broken on 2019/06/28 |
| |
sudo rm -Rf '/var/www/social' && sudo git clone --branch 'develop' --depth '1' --recurse-submodules 'https://github.com/friendica/friendica.git' '/var/www/social' && sudo rm -Rf '/var/www/social/addon' && sudo git clone --branch 'develop' --depth '1' --recurse-submodules 'https://github.com/friendica/friendica-addons.git' '/var/www/social/addon' && sudo chown -R 'nginx':'nginx' '/var/www/social' && sync | sudo rm -Rf '/var/www/social' && sudo git clone --branch 'master' --depth '1' --recurse-submodules 'https://github.com/friendica/friendica.git' '/var/www/social' && sudo rm -Rf '/var/www/social/addon' && sudo git clone --branch 'master' --depth '1' --recurse-submodules 'https://github.com/friendica/friendica-addons.git' '/var/www/social/addon' && sudo chown -R 'nginx':'nginx' '/var/www/social' && sync |
| |
===== SELinux ===== | ===== SELinux ===== |
**** | **** |
| |
cd '/var/www/social' && sudo -u 'nginx' COMPOSER_CACHE_DIR='/dev/null' '/var/www/social/bin/composer.phar' install && sync | cd '/var/www/social' && sudo -u 'nginx' COMPOSER_CACHE_DIR='/dev/null' '/var/www/social/bin/composer.phar' install --no-dev && sync |
| |
====== Database ====== | ====== Database ====== |
| |
* Every 5 minutes | * Every 5 minutes |
| * :!: Refer to [[distros:fedora_server#selinux|SELinux notes]] to generate a profile for this |
| |
sudo -e '/etc/systemd/system/social-d.timer' && sudo systemctl daemon-reload && sudo systemctl enable 'social-d.timer' --now | sudo -e '/etc/systemd/system/social-d.timer' && sudo systemctl daemon-reload && sudo systemctl enable 'social-d.timer' --now |
| |
==== Service ==== | ==== Service ==== |
| |
| * :!: Refer to [[distros:fedora_server#selinux|SELinux notes]] to generate a profile for this ((the composer step will likely be denied)) |
| |
sudo -e '/etc/systemd/system/social-up.service' | sudo -e '/etc/systemd/system/social-up.service' |
WorkingDirectory=/var/www/social | WorkingDirectory=/var/www/social |
Environment="COMPOSER_CACHE_DIR=/dev/null" | Environment="COMPOSER_CACHE_DIR=/dev/null" |
ExecStart='/usr/bin/git' -C '/var/www/social' pull origin 'develop' | ExecStart='/usr/bin/git' -C '/var/www/social' pull origin 'master' |
ExecStart='/usr/bin/git' -C '/var/www/social/addon' pull origin 'develop' | ExecStart='/usr/bin/git' -C '/var/www/social/addon' pull origin 'master' |
ExecStart='/var/www/social/bin/composer.phar' install | ExecStart='/var/www/social/bin/composer.phar' install --no-dev |
ExecStartPost='/usr/bin/sync'</code> | ExecStartPost='/usr/bin/sync'</code> |
| |