Browse Source

:bug: fix "Illuminate\Foundation\ComposerScripts::postAutoloadDump"
cache

Jeremy Zheng 2 năm trước cách đây
mục cha
commit
acad6c4cd5
1 tập tin đã thay đổi với 21 bổ sung12 xóa
  1. 21 12
      deploy/roles/mint-v2/tasks/laravel.yml

+ 21 - 12
deploy/roles/mint-v2/tasks/laravel.yml

@@ -43,22 +43,13 @@
     group: www-data
     mode: "0444"
 
-- name: setup bootstrap folder
+- name: setup bootstrap folder for {{ ansible_user }}
   become: true
   ansible.builtin.file:
     path: "{{ app_deploy_root }}/htdocs/bootstrap/cache"
     state: directory
-    owner: www-data
-    group: www-data
-    recurse: yes
-
-- name: setup storage folder for v2
-  become: true
-  ansible.builtin.file:
-    path: "{{ app_deploy_root }}/htdocs/storage"
-    state: directory
-    owner: www-data
-    group: www-data
+    owner: "{{ ansible_user }}"
+    group: "{{ ansible_user }}"
     recurse: yes
 
 - name: auto-loader optimization for v2
@@ -71,6 +62,24 @@
     cmd: composer update --optimize-autoloader --no-dev
     chdir: "{{ app_deploy_root }}/htdocs/public"
 
+- name: setup bootstrap folder for php-fpm
+  become: true
+  ansible.builtin.file:
+    path: "{{ app_deploy_root }}/htdocs/bootstrap/cache"
+    state: directory
+    owner: www-data
+    group: www-data
+    recurse: yes
+
+- name: setup storage folder for v2 for php-fpm
+  become: true
+  ansible.builtin.file:
+    path: "{{ app_deploy_root }}/htdocs/storage"
+    state: directory
+    owner: www-data
+    group: www-data
+    recurse: yes
+
 - name: caching configuration
   become: true
   ansible.builtin.shell: