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

Merge branch 'noblogs-memcache-sessions' into 'master'

Configure PHP options for noblogs in Ansible not in the container

See merge request !217
parents 1d04a3f3 997fd8f1
No related branches found
No related tags found
1 merge request!217Configure PHP options for noblogs in Ansible not in the container
......@@ -8,10 +8,13 @@
- name: Install noblogs config
template:
src: config.json.j2
dest: /etc/noblogs/config.json
src: "{{ item }}.j2"
dest: "/etc/noblogs/{{ item }}"
group: docker-noblogs
mode: 0640
loop:
- config.json
- 99-noblogs.ini
- name: Create noblogs data directory
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:
port: 8082
volumes:
- /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/cache: /opt/noblogs/www/wp-content/cache
- /opt/noblogs/uploads: /opt/noblogs/www/wp-content/uploads
......@@ -25,8 +26,16 @@ noblogs:
- 7108
- 7109
env:
MEM: 1024
MEM: 2048
PORT: 7108
- name: memcache-sessions
image: registry.git.autistici.org/ai3/docker/memcached:master
ports:
- 7208
- 7209
env:
MEM: 128
PORT: 7208
- name: poster
image: registry.git.autistici.org/noblogs/noblogs-poster:master
port: 7107
......@@ -71,20 +80,19 @@ noblogs:
domains:
- remote-follow.noblogs.org
monitoring_endpoints:
- job_name: noblogs
port: 8182
- port: 8182
scheme: http
- job_name: noblogs-php
port: 8282
- port: 8282
scheme: http
- job_name: mariadb-noblogs
port: 9307
- port: 9307
scheme: http
- port: 7109
scheme: http
- port: 7209
scheme: http
ports:
- 3307
- 7107
- 7208
volumes:
- name: data
path: /opt/noblogs
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment