first commit
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
---
|
||||
- name: Эффективный URL Git
|
||||
ansible.builtin.set_fact:
|
||||
effective_git_repo_url: "{{ (vault_git_repo_url | default('') | length > 0) | ternary(vault_git_repo_url, git_repo_url_public) }}"
|
||||
|
||||
- name: Клонирование приложения
|
||||
ansible.builtin.git:
|
||||
repo: "{{ effective_git_repo_url }}"
|
||||
dest: "{{ project_path }}"
|
||||
version: "{{ git_branch }}"
|
||||
force: false
|
||||
accept_hostkey: true
|
||||
become_user: "{{ deploy_user }}"
|
||||
|
||||
- name: Конфигурация docker/app.env для Laravel и Compose
|
||||
ansible.builtin.template:
|
||||
src: docker.app.env.j2
|
||||
dest: "{{ project_path }}/docker/app.env"
|
||||
owner: "{{ deploy_user }}"
|
||||
group: "{{ deploy_user }}"
|
||||
mode: "0600"
|
||||
|
||||
- name: Запуск стека Docker Compose
|
||||
ansible.builtin.shell: |
|
||||
set -e
|
||||
cd {{ project_path }}
|
||||
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d --build --remove-orphans
|
||||
become_user: "{{ deploy_user }}"
|
||||
args:
|
||||
executable: /bin/bash
|
||||
Reference in New Issue
Block a user