1
1
mirror of https://gitlab.archlinux.org/archlinux/infrastructure.git synced 2024-09-24 22:10:41 +02:00

archwiki: Update to PHP8

PHP7 will likely be removed from the repos soon[1]. Time to upgrade! :)

[1] https://archlinux.org/todo/php-7-retiredment/
This commit is contained in:
Kristian Klausen 2022-01-22 11:43:20 +01:00
parent 6757e4450c
commit 525bd79083
No known key found for this signature in database
GPG Key ID: E2BE346E410366C3
7 changed files with 11 additions and 11 deletions

View File

@ -15,7 +15,7 @@
- { role: postfix_null }
- { role: mariadb }
- { role: sudo }
- { role: php7_fpm, php_extensions: ['bcmath', 'curl', 'gd', 'iconv', 'intl', 'mysqli', 'sockets', 'zip'], zend_extensions: ['opcache'] }
- { role: php_fpm, php_extensions: ['bcmath', 'curl', 'gd', 'iconv', 'intl', 'mysqli', 'sockets', 'zip'], zend_extensions: ['opcache'] }
- { role: memcached }
- { role: archwiki }
- { role: fail2ban }

View File

@ -7,7 +7,7 @@ archwiki_repository: 'https://github.com/archlinux/archwiki.git'
archwiki_version: '1.37.1-4'
archwiki_question_answer_file: '/srv/http/archwiki/registration-question-answer.txt'
archwiki_socket: '/run/php-fpm7/archwiki.socket'
archwiki_socket: '/run/php-fpm/archwiki.socket'
archwiki_memcached_socket: '/run/memcached/archwiki.sock'
archwiki_memcached_memory: 1024

View File

@ -1,7 +1,7 @@
---
- name: restart php-fpm7@archwiki
service: name=php-fpm7@{{ archwiki_user }} state=restarted
- name: restart php-fpm@archwiki
service: name=php-fpm@{{ archwiki_user }} state=restarted
- name: run wiki updatescript
command: php {{ archwiki_dir }}/public/maintenance/update.php --quick

View File

@ -17,7 +17,7 @@
when: 'archwiki_domain is defined'
- name: install packages
pacman: name=git,php7-intl state=present
pacman: name=git,php-intl state=present
- name: make archwiki user
user: name="{{ archwiki_user }}" shell=/bin/false home="{{ archwiki_dir }}" createhome=no
@ -79,16 +79,16 @@
- name: configure php-fpm
template:
src=php-fpm.conf.j2 dest="/etc/php7/php-fpm.d/{{ archwiki_user }}.conf"
src=php-fpm.conf.j2 dest="/etc/php/php-fpm.d/{{ archwiki_user }}.conf"
owner=root group=root mode=0644
notify:
- restart php-fpm7@{{ archwiki_user }}
- restart php-fpm@{{ archwiki_user }}
- name: install archwiki memcached service
template: src="archwiki-memcached.service.j2" dest="/etc/systemd/system/archwiki-memcached.service" owner=root group=root mode=0644
- name: start and enable systemd socket
service: name=php-fpm7@{{ archwiki_user }}.socket state=started enabled=true
service: name=php-fpm@{{ archwiki_user }}.socket state=started enabled=true
- name: install systemd services/timers
template: src="{{ item }}.j2" dest="/etc/systemd/system/{{ item }}" owner=root group=root mode=0644

View File

@ -5,7 +5,7 @@ Description=Archwiki Prune Cache Service
Type=oneshot
User={{ archwiki_user }}
WorkingDirectory={{ archwiki_dir }}
ExecStart=/usr/bin/php7 {{ archwiki_dir }}/public/maintenance/pruneFileCache.php -q --agedays 1
ExecStart=/usr/bin/php {{ archwiki_dir }}/public/maintenance/pruneFileCache.php -q --agedays 1
NoNewPrivileges=yes
PrivateTmp=yes

View File

@ -5,7 +5,7 @@ After=mysqld.service
[Service]
User={{ archwiki_user }}
WorkingDirectory={{ archwiki_dir }}
ExecStart=/usr/bin/php7 {{ archwiki_dir }}/public/maintenance/runJobs.php -q --wait
ExecStart=/usr/bin/php {{ archwiki_dir }}/public/maintenance/runJobs.php -q --wait
Restart=on-failure
NoNewPrivileges=true

View File

@ -5,7 +5,7 @@ Description=Archwiki runJobs Service
Type=oneshot
User={{ archwiki_user }}
WorkingDirectory={{ archwiki_dir }}
ExecStart=/usr/bin/php7 {{ archwiki_dir }}/public/maintenance/runJobs.php -q
ExecStart=/usr/bin/php {{ archwiki_dir }}/public/maintenance/runJobs.php -q
NoNewPrivileges=true
ProtectHome=true