diff --git a/roles/deploy/defaults/main.yml b/roles/deploy/defaults/main.yml index 50b91e6b8b..329075b9de 100644 --- a/roles/deploy/defaults/main.yml +++ b/roles/deploy/defaults/main.yml @@ -32,7 +32,7 @@ project_templates: # mode: '0755' // <- optional, use an octal number starting with 0 or quote it, defaults to `'0755'` if `directory` or `'0644'` if `file` # type: directory // <- optional, defaults to `directory`, options: `directory` or `file` project_shared_children: - - path: web/app/uploads + - path: "{{ project_public_path }}/{{ project_upload_path }}" src: uploads # The project_environment is a list of environment variables that can be used in hooks @@ -58,6 +58,8 @@ composer_classmap_authoritative: true project: "{{ wordpress_sites[site] }}" project_root: "{{ www_root }}/{{ site }}" project_local_path: "{{ (lookup('env', 'USER') == 'vagrant') | ternary(project_root + '/' + project_current_path, project.local_path) }}" +project_public_path: "{{ project.public_path | default('web') }}" +project_upload_path: "{{ project.upload_path | default('app/uploads') }}" # Deploy hooks diff --git a/roles/wordpress-install/tasks/directories.yml b/roles/wordpress-install/tasks/directories.yml index 0a6956fad7..591255688b 100644 --- a/roles/wordpress-install/tasks/directories.yml +++ b/roles/wordpress-install/tasks/directories.yml @@ -1,7 +1,7 @@ --- - name: Create web root of sites file: - path: "{{ www_root }}/{{ item.key }}/{{ item.value.current_path | default('current') }}/web" + path: "{{ www_root }}/{{ item.key }}/{{ item.value.current_path | default('current') }}/{{ item.value.public_path | default('web') }}" owner: "{{ web_user }}" group: "{{ web_group }}" mode: '0755' diff --git a/roles/wordpress-setup/templates/wordpress-site.conf.j2 b/roles/wordpress-setup/templates/wordpress-site.conf.j2 index 414328fcc4..2096c6d45b 100644 --- a/roles/wordpress-setup/templates/wordpress-site.conf.j2 +++ b/roles/wordpress-setup/templates/wordpress-site.conf.j2 @@ -15,7 +15,7 @@ server { {% endblock %} {% block server_basic -%} - root {{ www_root }}/{{ item.key }}/{{ item.value.current_path | default('current') }}/web; + root {{ www_root }}/{{ item.key }}/{{ item.value.current_path | default('current') }}/{{ item.value.public_path | default('web') }}; index index.php index.htm index.html; add_header Fastcgi-Cache $upstream_cache_status;