feat: update deployment configuration and encrypted env loader
- Update Ansible playbooks and roles for application deployment - Add new Gitea/Traefik troubleshooting playbooks - Update Docker Compose configurations (base, local, staging, production) - Enhance EncryptedEnvLoader with improved error handling - Add deployment scripts (autossh setup, migration, secret testing) - Update CI/CD workflows and documentation - Add Semaphore stack configuration
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
file: "{{ application_vault_file }}"
|
||||
when: application_vault_stat.stat.exists
|
||||
no_log: yes
|
||||
ignore_errors: yes
|
||||
delegate_to: localhost
|
||||
become: no
|
||||
|
||||
@@ -72,21 +73,57 @@
|
||||
application_encryption_key: "{{ encryption_key | default(vault_encryption_key | default('')) }}"
|
||||
no_log: yes
|
||||
|
||||
- name: Check if application docker-compose source exists locally
|
||||
- name: Check if application docker-compose.base.yml source exists locally
|
||||
stat:
|
||||
path: "{{ application_stack_src }}/docker-compose.base.yml"
|
||||
delegate_to: localhost
|
||||
register: application_compose_base_src
|
||||
become: no
|
||||
|
||||
- name: Check if application docker-compose.production.yml source exists locally
|
||||
stat:
|
||||
path: "{{ application_stack_src }}/../../../docker-compose.production.yml"
|
||||
delegate_to: localhost
|
||||
register: application_compose_prod_src
|
||||
become: no
|
||||
|
||||
- name: Copy application docker-compose.base.yml to target host
|
||||
copy:
|
||||
src: "{{ application_stack_src }}/docker-compose.base.yml"
|
||||
dest: "{{ application_stack_dest }}/docker-compose.base.yml"
|
||||
owner: "{{ ansible_user }}"
|
||||
group: "{{ ansible_user }}"
|
||||
mode: '0644'
|
||||
when: application_compose_base_src.stat.exists
|
||||
|
||||
- name: Copy application docker-compose.production.yml to target host
|
||||
copy:
|
||||
src: "{{ application_stack_src }}/../../../docker-compose.production.yml"
|
||||
dest: "{{ application_stack_dest }}/docker-compose.production.yml"
|
||||
owner: "{{ ansible_user }}"
|
||||
group: "{{ ansible_user }}"
|
||||
mode: '0644'
|
||||
when: application_compose_prod_src.stat.exists
|
||||
|
||||
- name: Check if legacy docker-compose.yml exists (fallback)
|
||||
stat:
|
||||
path: "{{ application_stack_src }}/docker-compose.yml"
|
||||
delegate_to: localhost
|
||||
register: application_compose_src
|
||||
become: no
|
||||
when: not (application_compose_base_src.stat.exists | default(false))
|
||||
|
||||
- name: Copy application docker-compose to target host
|
||||
- name: Copy application docker-compose.yml to target host (fallback for legacy)
|
||||
copy:
|
||||
src: "{{ application_stack_src }}/docker-compose.yml"
|
||||
dest: "{{ application_stack_dest }}/docker-compose.yml"
|
||||
owner: "{{ ansible_user }}"
|
||||
group: "{{ ansible_user }}"
|
||||
mode: '0644'
|
||||
when: application_compose_src.stat.exists
|
||||
when:
|
||||
- application_compose_src is defined
|
||||
- application_compose_src.stat.exists | default(false)
|
||||
- not (application_compose_base_src.stat.exists | default(false))
|
||||
|
||||
- name: Check if nginx configuration exists locally
|
||||
stat:
|
||||
|
||||
Reference in New Issue
Block a user