Differenze tra le versioni di "Framadate/Technical documentation"
(more info) |
(→Filesystem: +notes) |
||
Riga 26: | Riga 26: | ||
== Filesystem == | == Filesystem == | ||
+ | |||
+ | The whole application is in read-only (writable only by <code>root</code>). It seems that only the <code>tpl_c/</code> directory needs to be writable. | ||
+ | |||
+ | <pre> | ||
+ | # ls -l /var/www/framadate/production/ | ||
+ | total 412 | ||
+ | drwxr-xr-x 2 root root 4096 21 dic 11.50 action | ||
+ | drwxr-xr-x 2 root root 4096 25 gen 09.59 admin | ||
+ | -rw-r--r-- 1 root root 17997 21 dic 11.50 adminstuds.php | ||
+ | drwxr-xr-x 5 root root 4096 21 dic 11.50 app | ||
+ | -rw-r--r-- 1 root root 637 21 dic 11.50 AUTHORS.md | ||
+ | -rw-r--r-- 1 root root 3053 21 dic 11.50 bandeaux.php | ||
+ | -rw-r--r-- 1 root root 1439 21 dic 11.50 buildlang.php | ||
+ | -rw-r--r-- 1 root root 13754 21 dic 11.50 CHANGELOG.md | ||
+ | -rw-r--r-- 1 root root 1912 21 dic 11.50 compare.php | ||
+ | -rw-r--r-- 1 root root 2209 21 dic 11.50 composer.json | ||
+ | -rw-r--r-- 1 root root 132735 21 dic 11.50 composer.lock | ||
+ | -rw-r--r-- 1 root root 14340 21 dic 11.50 create_classic_poll.php | ||
+ | -rw-r--r-- 1 root root 9810 25 gen 09.26 create_date_poll.php | ||
+ | -rw-r--r-- 1 root root 12614 21 dic 11.50 create_poll.php | ||
+ | drwxr-xr-x 3 root root 4096 21 dic 11.50 css | ||
+ | drwxr-xr-x 2 root root 4096 21 dic 11.50 doc | ||
+ | -rw-r--r-- 1 root root 3948 21 dic 11.50 exportcsv.php | ||
+ | -rw-r--r-- 1 root root 1150 21 dic 11.50 favicon.ico | ||
+ | -rw-r--r-- 1 root root 2103 21 dic 11.50 find_polls.php | ||
+ | drwxr-xr-x 2 root root 4096 21 dic 11.50 fonts | ||
+ | -rw-r--r-- 1 root root 702 21 dic 11.50 htaccess.txt | ||
+ | drwxr-xr-x 2 root root 4096 21 dic 11.50 images | ||
+ | -rw-r--r-- 1 root root 1774 21 dic 11.50 index.php | ||
+ | -rw-r--r-- 1 root root 75 21 dic 11.50 INSTALL.md | ||
+ | drwxr-xr-x 4 root root 4096 21 dic 11.50 js | ||
+ | -rw-r--r-- 1 root root 22400 21 dic 11.50 LICENCE.fr.txt | ||
+ | -rw-r--r-- 1 root root 21396 21 dic 11.50 LICENSE.en.txt | ||
+ | drwxr-xr-x 2 root root 4096 21 dic 11.50 locale | ||
+ | -rw-r--r-- 1 root root 317 21 dic 11.50 locale.bat | ||
+ | -rw-r--r-- 1 root root 896 21 dic 11.50 maintenance.php | ||
+ | -rw-r--r-- 1 root root 234 21 dic 11.50 Makefile | ||
+ | -rw-r--r-- 1 root root 230 21 dic 11.50 php.ini | ||
+ | -rw-r--r-- 1 root root 68 21 dic 11.50 phpunit.bat | ||
+ | -rw-r--r-- 1 root root 85 21 dic 11.50 phpunit.sh | ||
+ | drwxr-xr-x 2 root root 4096 21 dic 11.50 po | ||
+ | -rw-r--r-- 1 root root 295 21 dic 11.50 push-trad-to-zanata.sh | ||
+ | -rw-r--r-- 1 root root 2878 21 dic 11.50 README.md | ||
+ | -rw-r--r-- 1 root root 77 21 dic 11.50 robots.txt | ||
+ | drwxr-xr-x 2 root root 4096 21 dic 11.50 scripts | ||
+ | -rw-r--r-- 1 root root 10834 21 dic 11.50 studs.php | ||
+ | drwxr-xr-x 6 root root 4096 21 dic 11.50 tpl | ||
+ | drwxr-xr-x 2 apache-framadate apache-framadate 4096 24 gen 18.38 tpl_c | ||
+ | drwxr-xr-x 12 root root 4096 21 dic 11.55 vendor | ||
+ | -rw-r--r-- 1 root root 333 21 dic 11.50 zanata.xml | ||
+ | </pre> | ||
+ | |||
+ | Here an overview of the parent directory. | ||
<pre> | <pre> | ||
# ls -l /var/www/framadate | # ls -l /var/www/framadate | ||
− | total | + | total 28 |
− | drwxr-xr-x 16 | + | drwxr-xr-x 16 root root 4096 24 gen 18.36 framadate-1.1.11 |
− | lrwxrwxrwx 1 | + | drwxrwx--- 2 apache-framadate apache-framadate 4096 25 gen 09.52 log |
− | -rw-r--r-- 1 | + | lrwxrwxrwx 1 root root 16 25 gen 09.48 production -> framadate-1.1.11 |
− | drwxr-xr-x 2 root | + | -rw-r--r-- 1 root root 56 20 gen 17.24 README.txt |
+ | drwxr-xr-x 2 root root 4096 20 gen 22.55 secret | ||
+ | drwxrwx--- 2 apache-framadate apache-framadate 4096 25 gen 09.10 session | ||
+ | drwxrwx--- 2 apache-framadate apache-framadate 4096 24 gen 18.32 tmp | ||
+ | drwxr-xr-x 2 root root 4096 24 gen 00.17 wmi-images | ||
</pre> | </pre> | ||
Versione delle 10:06, 25 gen 2021
Brief documentation for system administrators of the Framadate instance in Wikimedia Italia.
Server access
ssh fabula.wikimedia.it
Overview
┌─────┐ ┌─────────────────┐ ┌───────────────┐ │Alice│ │Apache (:80 :443)│ │PHP-FPM (:9001)│ └──┬──┘ └────────┬────────┘ └───────┬───────┘ │ request │ │ │<────────────────────>│ │ │ │ │ │ │ request │ │ │<─────────────────────────>│ ┌──┴──┐ ┌────────┴────────┐ ┌───────┴───────┐ │Alice│ │Apache (:80 :443)│ │PHP-FPM (:9001)│ └─────┘ └─────────────────┘ └───────────────┘
(refresh)
Filesystem
The whole application is in read-only (writable only by root
). It seems that only the tpl_c/
directory needs to be writable.
# ls -l /var/www/framadate/production/ total 412 drwxr-xr-x 2 root root 4096 21 dic 11.50 action drwxr-xr-x 2 root root 4096 25 gen 09.59 admin -rw-r--r-- 1 root root 17997 21 dic 11.50 adminstuds.php drwxr-xr-x 5 root root 4096 21 dic 11.50 app -rw-r--r-- 1 root root 637 21 dic 11.50 AUTHORS.md -rw-r--r-- 1 root root 3053 21 dic 11.50 bandeaux.php -rw-r--r-- 1 root root 1439 21 dic 11.50 buildlang.php -rw-r--r-- 1 root root 13754 21 dic 11.50 CHANGELOG.md -rw-r--r-- 1 root root 1912 21 dic 11.50 compare.php -rw-r--r-- 1 root root 2209 21 dic 11.50 composer.json -rw-r--r-- 1 root root 132735 21 dic 11.50 composer.lock -rw-r--r-- 1 root root 14340 21 dic 11.50 create_classic_poll.php -rw-r--r-- 1 root root 9810 25 gen 09.26 create_date_poll.php -rw-r--r-- 1 root root 12614 21 dic 11.50 create_poll.php drwxr-xr-x 3 root root 4096 21 dic 11.50 css drwxr-xr-x 2 root root 4096 21 dic 11.50 doc -rw-r--r-- 1 root root 3948 21 dic 11.50 exportcsv.php -rw-r--r-- 1 root root 1150 21 dic 11.50 favicon.ico -rw-r--r-- 1 root root 2103 21 dic 11.50 find_polls.php drwxr-xr-x 2 root root 4096 21 dic 11.50 fonts -rw-r--r-- 1 root root 702 21 dic 11.50 htaccess.txt drwxr-xr-x 2 root root 4096 21 dic 11.50 images -rw-r--r-- 1 root root 1774 21 dic 11.50 index.php -rw-r--r-- 1 root root 75 21 dic 11.50 INSTALL.md drwxr-xr-x 4 root root 4096 21 dic 11.50 js -rw-r--r-- 1 root root 22400 21 dic 11.50 LICENCE.fr.txt -rw-r--r-- 1 root root 21396 21 dic 11.50 LICENSE.en.txt drwxr-xr-x 2 root root 4096 21 dic 11.50 locale -rw-r--r-- 1 root root 317 21 dic 11.50 locale.bat -rw-r--r-- 1 root root 896 21 dic 11.50 maintenance.php -rw-r--r-- 1 root root 234 21 dic 11.50 Makefile -rw-r--r-- 1 root root 230 21 dic 11.50 php.ini -rw-r--r-- 1 root root 68 21 dic 11.50 phpunit.bat -rw-r--r-- 1 root root 85 21 dic 11.50 phpunit.sh drwxr-xr-x 2 root root 4096 21 dic 11.50 po -rw-r--r-- 1 root root 295 21 dic 11.50 push-trad-to-zanata.sh -rw-r--r-- 1 root root 2878 21 dic 11.50 README.md -rw-r--r-- 1 root root 77 21 dic 11.50 robots.txt drwxr-xr-x 2 root root 4096 21 dic 11.50 scripts -rw-r--r-- 1 root root 10834 21 dic 11.50 studs.php drwxr-xr-x 6 root root 4096 21 dic 11.50 tpl drwxr-xr-x 2 apache-framadate apache-framadate 4096 24 gen 18.38 tpl_c drwxr-xr-x 12 root root 4096 21 dic 11.55 vendor -rw-r--r-- 1 root root 333 21 dic 11.50 zanata.xml
Here an overview of the parent directory.
# ls -l /var/www/framadate total 28 drwxr-xr-x 16 root root 4096 24 gen 18.36 framadate-1.1.11 drwxrwx--- 2 apache-framadate apache-framadate 4096 25 gen 09.52 log lrwxrwxrwx 1 root root 16 25 gen 09.48 production -> framadate-1.1.11 -rw-r--r-- 1 root root 56 20 gen 17.24 README.txt drwxr-xr-x 2 root root 4096 20 gen 22.55 secret drwxrwx--- 2 apache-framadate apache-framadate 4096 25 gen 09.10 session drwxrwx--- 2 apache-framadate apache-framadate 4096 24 gen 18.32 tmp drwxr-xr-x 2 root root 4096 24 gen 00.17 wmi-images
Admin
This is the admin panel:
The admin credentials are stored in this file:
cat /var/www/framadate/secret/password.clear
The admin credentials can be changed with this command:
htpasswd -c /var/www/framadate/secret/htpasswd admin
Configuration
Framadate configuration:
nano /var/www/framadate/production/app/inc/config.php nano /var/www/framadate/production/app/inc/config-secret.php
Apache configuration:
nano /etc/httpd/sites-enabled/it-wikimedia-framadate-ssl.conf nano /etc/httpd/sites-enabled/it-wikimedia-framadate-txt.conf
PHP-FPM configuration:
nano /etc/opt/rh/rh-php73/php-fpm.d/9001-framadate.conf
To publish whatever in Wikimedia Phabricator change please run this:
/root/scripts/commit.sh
Log
Log of the PHP-FPM pool:
tail -f /var/log/php-fpm/framadate-error.log
Generic Apache error log:
tail -f /var/log/httpd/error_log
Generic Apache access log:
tail -f /var/log/httpd/access_log
Service
To apply your changes you need to restart the services.
Service of the apache frontend webserver:
apache2ctl configtest apache2ctl graceful
Service of the PHP-FPM backend webserver:
systemctl status rh-php73-php-fpm systemctl restart rh-php73-php-fpm
Database
$ mysql framadate > SHOW TABLES; +------------------------+ | Tables_in_framadate | +------------------------+ | fd_comment | | fd_framadate_migration | | fd_poll | | fd_slot | | fd_vote | +------------------------+ 5 rows in set (0.00 sec)
Matomo uses an SMTP account @wikimedia.it
with username noreply
.
See #Configuration.
See technical addresses.
Update
https://framagit.org/framasoft/framadate/framadate/-/wikis/Maintenance/Updating
Phabricator
- phabricator:search - search recent activity
- phabricator:diffusion/WIIN/browse/master/servers/fabula/projects/framadate/ - public configuration