chore: update deploy
CI / build (push) Failing after 1m57s

This commit is contained in:
2026-06-14 00:21:13 +03:00
parent 6367cdae56
commit c3c0e63fd5
4 changed files with 52 additions and 29 deletions
+29 -14
View File
@@ -1,32 +1,47 @@
---
- name: Deploy Frontend
hosts: prod
vars:
deploy_path: /opt/app
pre_tasks:
- name: Install docker
ansible.builtin.include_role:
name: geerlingguy.docker
- name: Configure ufw
community.general.ufw:
rule: allow
port: "{{ item }}"
loop:
- "80"
- "443"
- "2222"
- name: Enable ufw
community.general.ufw:
state: enabled
tasks:
- name: Ensure deployment directory
- name: Ensure directory
ansible.builtin.file:
path: "{{ deploy_path }}"
path: /opt/aegisfront
state: directory
- name: Copy docker-compose
- name: Copy compose
ansible.builtin.copy:
src: "{{ playbook_dir }}/../docker-compose.yml"
dest: "{{ deploy_path }}/docker-compose.yml"
dest: /opt/aegisfront/docker-compose.yml
- name: Pull images
- name: Pull image
ansible.builtin.shell:
cmd: docker compose pull
chdir: "{{ deploy_path }}"
chdir: /opt/aegisfront
environment:
REGISTRY: "{{ registry }}"
TAG: "{{ tag }}"
REGISTRY: gitea.d3m0k1d.ru
TAG: latest
- name: Start services
- name: Start
ansible.builtin.shell:
cmd: docker compose up -d --remove-orphans
chdir: "{{ deploy_path }}"
chdir: /opt/aegisfront
environment:
REGISTRY: "{{ registry }}"
TAG: "{{ tag }}"
REGISTRY: gitea.d3m0k1d.ru
TAG: latest