Skip to content
Snippets Groups Projects
Commit b0bfe579 authored by ale's avatar ale
Browse files

Configure PHP options for noblogs in Ansible not in the container

parent 1d04a3f3
No related branches found
No related tags found
1 merge request!217Configure PHP options for noblogs in Ansible not in the container
Pipeline #44777 passed
...@@ -8,10 +8,13 @@ ...@@ -8,10 +8,13 @@
- name: Install noblogs config - name: Install noblogs config
template: template:
src: config.json.j2 src: "{{ item }}.j2"
dest: /etc/noblogs/config.json dest: "/etc/noblogs/{{ item }}"
group: docker-noblogs group: docker-noblogs
mode: 0640 mode: 0640
loop:
- config.json
- 99-noblogs.ini
- name: Create noblogs data directory - name: Create noblogs data directory
file: file:
......
[PHP]
; Set generous memory limits.
memory_limit = 256M
; Set upload size limits.
upload_max_filesize = 50M
post_max_size = 50M
; Configure the session layer to use all our memcache-session
; instances, with consistent hashing. We use two copies to allow us to
; restart a memcache instance without killing all sessions.
session.cookie_secure = 1
session.cookie_httponly = 1
session.save_handler = memcached
session.save_path = "{% set comma = joiner(',') %}{% for h in services['noblogs'].hosts %}{{ comma() }}{{ h }}.noblogs.{{ domain }}:7208{% endfor %}"
memcached.sess_consistent_hash = 1
memcached.sess_binary = 1
memcached.sess_number_of_replicas = {{ [services['noblogs'].hosts | length, 2] | min }}
; Enable the PHP opcache.
opcache.enable = 1
...@@ -9,6 +9,7 @@ noblogs: ...@@ -9,6 +9,7 @@ noblogs:
port: 8082 port: 8082
volumes: volumes:
- /etc/noblogs: /etc/noblogs - /etc/noblogs: /etc/noblogs
- /etc/noblogs/99-noblogs.ini: /etc/php/7.4/fpm/conf.d/99-nooblogs.ini
- /opt/noblogs/data: /opt/noblogs/www/wp-content/blogs.dir - /opt/noblogs/data: /opt/noblogs/www/wp-content/blogs.dir
- /opt/noblogs/cache: /opt/noblogs/www/wp-content/cache - /opt/noblogs/cache: /opt/noblogs/www/wp-content/cache
- /opt/noblogs/uploads: /opt/noblogs/www/wp-content/uploads - /opt/noblogs/uploads: /opt/noblogs/www/wp-content/uploads
...@@ -27,6 +28,14 @@ noblogs: ...@@ -27,6 +28,14 @@ noblogs:
env: env:
MEM: 1024 MEM: 1024
PORT: 7108 PORT: 7108
- name: memcache-sessions
image: registry.git.autistici.org/ai3/docker/memcached:master
ports:
- 7208
- 7209
env:
MEM: 128
PORT: 7208
- name: poster - name: poster
image: registry.git.autistici.org/noblogs/noblogs-poster:master image: registry.git.autistici.org/noblogs/noblogs-poster:master
port: 7107 port: 7107
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment