feat: Complete deployment setup for code pushes
- Add pre-flight checks in deploy-update.yml - Automatically copy docker-compose.yml and nginx config in setup-infrastructure.yml - Add comprehensive deployment documentation - Ready for automated code deployments via CI/CD pipeline
This commit is contained in:
@@ -279,6 +279,38 @@
|
||||
state: directory
|
||||
mode: '0755'
|
||||
|
||||
- name: Check if application stack docker-compose.yml exists locally
|
||||
stat:
|
||||
path: "{{ playbook_dir }}/../../stacks/application/docker-compose.yml"
|
||||
register: app_compose_local
|
||||
delegate_to: localhost
|
||||
become: no
|
||||
|
||||
- name: Copy application stack docker-compose.yml to server
|
||||
copy:
|
||||
src: "{{ playbook_dir }}/../../stacks/application/docker-compose.yml"
|
||||
dest: "{{ stacks_base_path }}/application/docker-compose.yml"
|
||||
owner: "{{ ansible_user }}"
|
||||
group: "{{ ansible_user }}"
|
||||
mode: '0644'
|
||||
when: app_compose_local.stat.exists
|
||||
|
||||
- name: Check if application stack nginx directory exists locally
|
||||
stat:
|
||||
path: "{{ playbook_dir }}/../../stacks/application/nginx/"
|
||||
register: app_nginx_local
|
||||
delegate_to: localhost
|
||||
become: no
|
||||
|
||||
- name: Copy application stack nginx configuration to server
|
||||
copy:
|
||||
src: "{{ playbook_dir }}/../../stacks/application/nginx/"
|
||||
dest: "{{ stacks_base_path }}/application/nginx/"
|
||||
owner: "{{ ansible_user }}"
|
||||
group: "{{ ansible_user }}"
|
||||
mode: '0644'
|
||||
when: app_nginx_local.stat.exists
|
||||
|
||||
- name: Create application stack .env file
|
||||
template:
|
||||
src: "{{ playbook_dir }}/../templates/application.env.j2"
|
||||
|
||||
Reference in New Issue
Block a user