laravel storage fixed
This commit is contained in:
		
							parent
							
								
									115cdd0952
								
							
						
					
					
						commit
						9e5f8a93ed
					
				@ -1,5 +1,6 @@
 | 
				
			|||||||
---
 | 
					---
 | 
				
			||||||
# ------------------ VALIDATION TASKS ------------------
 | 
					# ------------------ VALIDATION TASKS ------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- name: "Validate that project root '{{ project.project_root }}' exists"
 | 
					- name: "Validate that project root '{{ project.project_root }}' exists"
 | 
				
			||||||
  ansible.builtin.stat:
 | 
					  ansible.builtin.stat:
 | 
				
			||||||
    path: "{{ project.project_root }}"
 | 
					    path: "{{ project.project_root }}"
 | 
				
			||||||
@ -41,7 +42,22 @@
 | 
				
			|||||||
      Nginx requires an entry point file to serve the site.
 | 
					      Nginx requires an entry point file to serve the site.
 | 
				
			||||||
  when: index_file_find.matched == 0
 | 
					  when: index_file_find.matched == 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# ------------------ PERMISSION FIX FOR LARAVEL ------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- name: "Check if 'storage' directory exists in project root"
 | 
				
			||||||
 | 
					  ansible.builtin.stat:
 | 
				
			||||||
 | 
					    path: "{{ project.project_root }}/storage"
 | 
				
			||||||
 | 
					  register: storage_dir_stat
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- name: "Set full permissions (777) on 'storage' if it exists"
 | 
				
			||||||
 | 
					  ansible.builtin.file:
 | 
				
			||||||
 | 
					    path: "{{ project.project_root }}/storage"
 | 
				
			||||||
 | 
					    mode: '0777'
 | 
				
			||||||
 | 
					    recurse: yes
 | 
				
			||||||
 | 
					  when: storage_dir_stat.stat.exists and storage_dir_stat.stat.isdir
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# ------------------ CONFIGURATION TASKS ------------------
 | 
					# ------------------ CONFIGURATION TASKS ------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- name: "Create Nginx config for {{ project.domain }} in conf.d"
 | 
					- name: "Create Nginx config for {{ project.domain }} in conf.d"
 | 
				
			||||||
  ansible.builtin.template:
 | 
					  ansible.builtin.template:
 | 
				
			||||||
    src: nginx-site.conf.j2
 | 
					    src: nginx-site.conf.j2
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user