Verified Commit d6320b75 authored by Jelle van der Waa's avatar Jelle van der Waa 🚧

Switch the archwiki to PHP 7

As mediawiki does not support PHP 8 yet in the current LTS release, we
have to stay with PHP 7.
parent ddc8d916
Pipeline #5293 passed with stage
in 38 seconds
......@@ -14,7 +14,7 @@
- { role: postfix, postfix_relayhost: "mail.archlinux.org" }
- { role: mariadb, mariadb_query_cache_type: '0', mariadb_innodb_file_per_table: true }
- { role: sudo }
- { role: php_fpm, php_extensions: ['bcmath', 'curl', 'gd', 'iconv', 'intl', 'mysqli', 'sockets', 'zip'], zend_extensions: ['opcache'] }
- { role: php7_fpm, php_extensions: ['bcmath', 'curl', 'gd', 'iconv', 'intl', 'mysqli', 'sockets', 'zip'], zend_extensions: ['opcache'] }
- { role: memcached }
- { role: archwiki }
- { role: fail2ban }
......
......@@ -7,7 +7,7 @@ archwiki_repository: 'https://github.com/archlinux/archwiki.git'
archwiki_version: '1.35.0-1'
archwiki_question_answer_file: '/srv/http/archwiki/registration-question-answer.txt'
archwiki_socket: '/run/php-fpm/archwiki.socket'
archwiki_socket: '/run/php-fpm7/archwiki.socket'
archwiki_memcached_socket: '/run/memcached/archwiki.sock'
archwiki_memcached_memory: 2048
......
---
- name: restart php-fpm@archwiki
service: name=php-fpm@{{ archwiki_user }} state=restarted
- name: restart php-fpm7@archwiki
service: name=php-fpm7@{{ archwiki_user }} state=restarted
- name: run wiki updatescript
command: php {{ archwiki_dir }}/public/maintenance/update.php --quick
......
......@@ -17,7 +17,7 @@
when: 'archwiki_domain is defined'
- name: install packages
pacman: name=git,php-intl state=present
pacman: name=git,php7-intl state=present
- name: make archwiki user
user: name="{{ archwiki_user }}" shell=/bin/false home="{{ archwiki_dir }}" createhome=no
......@@ -80,16 +80,16 @@
- name: configure php-fpm
template:
src=php-fpm.conf.j2 dest="/etc/php/php-fpm.d/{{ archwiki_user }}.conf"
src=php-fpm.conf.j2 dest="/etc/php7/php-fpm.d/{{ archwiki_user }}.conf"
owner=root group=root mode=0644
notify:
- restart php-fpm@{{ archwiki_user }}
- restart php-fpm7@{{ 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-fpm@{{ archwiki_user }}.socket state=started enabled=true
service: name=php-fpm7@{{ 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
......
......@@ -5,7 +5,7 @@ Description=Archwiki Prune Cache Service
Type=oneshot
User={{ archwiki_user }}
WorkingDirectory={{ archwiki_dir }}
ExecStart=/usr/bin/php {{ archwiki_dir }}/public/maintenance/pruneFileCache.php -q --agedays 1
ExecStart=/usr/bin/php7 {{ archwiki_dir }}/public/maintenance/pruneFileCache.php -q --agedays 1
NoNewPrivileges=yes
PrivateTmp=yes
......
......@@ -5,7 +5,7 @@ After=mysqld.service
[Service]
User={{ archwiki_user }}
WorkingDirectory={{ archwiki_dir }}
ExecStart=/usr/bin/php {{ archwiki_dir }}/public/maintenance/runJobs.php -q --wait
ExecStart=/usr/bin/php7 {{ archwiki_dir }}/public/maintenance/runJobs.php -q --wait
Restart=on-failure
NoNewPrivileges=true
......
......@@ -5,7 +5,7 @@ Description=Archwiki runJobs Service
Type=oneshot
User={{ archwiki_user }}
WorkingDirectory={{ archwiki_dir }}
ExecStart=/usr/bin/php {{ archwiki_dir }}/public/maintenance/runJobs.php -q
ExecStart=/usr/bin/php7 {{ archwiki_dir }}/public/maintenance/runJobs.php -q
NoNewPrivileges=true
ProtectHome=true
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment