mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-22 12:41:05 +01:00
Implemented new upload limit
This commit is contained in:
parent
8407c288fb
commit
c0be4a912f
2
roles/docker-wordpress/files/Dockerfile
Normal file
2
roles/docker-wordpress/files/Dockerfile
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
FROM wordpress
|
||||||
|
COPY upload.ini $PHP_INI_DIR/conf.d/
|
@ -1,8 +1,15 @@
|
|||||||
---
|
---
|
||||||
- name: recreate wordpress
|
- name: rebuild wordpress container
|
||||||
command:
|
command:
|
||||||
cmd: docker-compose -p wordpress up -d --force-recreate
|
cmd: docker build --no-cache -t custom_wordpress .
|
||||||
chdir: "{{path_docker_compose_files}}wordpress/"
|
chdir: "{{docker_compose_wordpress_path}}"
|
||||||
|
environment:
|
||||||
|
COMPOSE_HTTP_TIMEOUT: 600
|
||||||
|
DOCKER_CLIENT_TIMEOUT: 600
|
||||||
|
- name: recreate wordpress
|
||||||
|
command:
|
||||||
|
cmd: docker-compose -p wordpress up -d --force-recreate
|
||||||
|
chdir: "{{docker_compose_wordpress_path}}"
|
||||||
environment:
|
environment:
|
||||||
COMPOSE_HTTP_TIMEOUT: 600
|
COMPOSE_HTTP_TIMEOUT: 600
|
||||||
DOCKER_CLIENT_TIMEOUT: 600
|
DOCKER_CLIENT_TIMEOUT: 600
|
@ -5,18 +5,34 @@
|
|||||||
|
|
||||||
- name: configure wordpress nginx configurations
|
- name: configure wordpress nginx configurations
|
||||||
vars:
|
vars:
|
||||||
client_max_body_size: "2M"
|
client_max_body_size: "{{wordpress_max_upload_size}}"
|
||||||
domain: "{{item}}"
|
domain: "{{item}}"
|
||||||
template: src=roles/docker-reverse-proxy/templates/domain.conf.j2 dest=/etc/nginx/conf.d/{{ item }}.conf
|
template: src=roles/docker-reverse-proxy/templates/domain.conf.j2 dest=/etc/nginx/conf.d/{{ item }}.conf
|
||||||
loop: "{{domains}}"
|
loop: "{{domains}}"
|
||||||
notify: restart nginx
|
notify: restart nginx
|
||||||
|
|
||||||
- name: "create {{path_docker_compose_files}}wordpress/"
|
- name: "create {{docker_compose_wordpress_path}}"
|
||||||
file:
|
file:
|
||||||
path: "{{path_docker_compose_files}}wordpress/"
|
path: "{{docker_compose_wordpress_path}}"
|
||||||
state: directory
|
state: directory
|
||||||
mode: 0755
|
mode: 0755
|
||||||
|
|
||||||
- name: add docker-compose.yml
|
- name: "Transfering upload.ini to {{docker_compose_wordpress_path}}"
|
||||||
template: src=docker-compose.yml.j2 dest={{path_docker_compose_files}}wordpress/docker-compose.yml
|
template:
|
||||||
|
src: upload.ini.j2
|
||||||
|
dest: "{{docker_compose_wordpress_path}}upload.ini"
|
||||||
|
notify:
|
||||||
|
- recreate wordpress
|
||||||
|
- rebuild wordpress container
|
||||||
|
|
||||||
|
- name: "Transfering Dockerfile to {{docker_compose_wordpress_path}}"
|
||||||
|
copy:
|
||||||
|
src: Dockerfile
|
||||||
|
dest: "{{docker_compose_wordpress_path}}Dockerfile"
|
||||||
|
notify:
|
||||||
|
- recreate wordpress
|
||||||
|
- rebuild wordpress container
|
||||||
|
|
||||||
|
- name: "add docker-compose.yml to {{docker_compose_wordpress_path}}"
|
||||||
|
template: src=docker-compose.yml.j2 dest={{docker_compose_wordpress_path}}docker-compose.yml
|
||||||
notify: recreate wordpress
|
notify: recreate wordpress
|
||||||
|
@ -4,7 +4,9 @@ services:
|
|||||||
application:
|
application:
|
||||||
logging:
|
logging:
|
||||||
driver: journald
|
driver: journald
|
||||||
image: wordpress
|
image: custom_wordpress
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:{{http_port}}:80"
|
- "127.0.0.1:{{http_port}}:80"
|
||||||
|
5
roles/docker-wordpress/templates/upload.ini.j2
Normal file
5
roles/docker-wordpress/templates/upload.ini.j2
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
file_uploads = On
|
||||||
|
memory_limit = {{wordpress_max_upload_size}}
|
||||||
|
upload_max_filesize = {{wordpress_max_upload_size}}
|
||||||
|
post_max_size = {{wordpress_max_upload_size}}
|
||||||
|
max_execution_time = 300
|
2
roles/docker-wordpress/vars/main.yml
Normal file
2
roles/docker-wordpress/vars/main.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
docker_compose_wordpress_path: "{{path_docker_compose_files}}wordpress/"
|
||||||
|
wordpress_max_upload_size: "64M"
|
Loading…
Reference in New Issue
Block a user