mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-22 04:31:13 +01:00
Implemented new upload limit
This commit is contained in:
parent
c18795f2b9
commit
7eee1748cc
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:
|
||||
cmd: docker-compose -p wordpress up -d --force-recreate
|
||||
chdir: "{{path_docker_compose_files}}wordpress/"
|
||||
cmd: docker build --no-cache -t custom_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:
|
||||
COMPOSE_HTTP_TIMEOUT: 600
|
||||
DOCKER_CLIENT_TIMEOUT: 600
|
@ -5,18 +5,34 @@
|
||||
|
||||
- name: configure wordpress nginx configurations
|
||||
vars:
|
||||
client_max_body_size: "2M"
|
||||
client_max_body_size: "{{wordpress_max_upload_size}}"
|
||||
domain: "{{item}}"
|
||||
template: src=roles/docker-reverse-proxy/templates/domain.conf.j2 dest=/etc/nginx/conf.d/{{ item }}.conf
|
||||
loop: "{{domains}}"
|
||||
notify: restart nginx
|
||||
|
||||
- name: "create {{path_docker_compose_files}}wordpress/"
|
||||
- name: "create {{docker_compose_wordpress_path}}"
|
||||
file:
|
||||
path: "{{path_docker_compose_files}}wordpress/"
|
||||
path: "{{docker_compose_wordpress_path}}"
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
- name: add docker-compose.yml
|
||||
template: src=docker-compose.yml.j2 dest={{path_docker_compose_files}}wordpress/docker-compose.yml
|
||||
- name: "Transfering upload.ini to {{docker_compose_wordpress_path}}"
|
||||
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
|
||||
|
@ -4,7 +4,9 @@ services:
|
||||
application:
|
||||
logging:
|
||||
driver: journald
|
||||
image: wordpress
|
||||
image: custom_wordpress
|
||||
build:
|
||||
context: .
|
||||
restart: always
|
||||
ports:
|
||||
- "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