Compare commits
4
Commits
68bb418d36
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9f0bc68120 | ||
|
|
87b522bfa9 | ||
|
|
e68f374152 | ||
|
|
5549840536 |
No files matched your search
@@ -26,7 +26,7 @@ jobs:
|
|||||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_RELEASE_KEY }}
|
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_RELEASE_KEY }}
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
printf '%s\n' "$SSH_PRIVATE_RELEASE_KEY" > ~/.ssh/deploy_key
|
printf '%s' "$SSH_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/deploy_key
|
||||||
chmod 600 ~/.ssh/deploy_key
|
chmod 600 ~/.ssh/deploy_key
|
||||||
ssh-keygen -y -f ~/.ssh/deploy_key >/dev/null
|
ssh-keygen -y -f ~/.ssh/deploy_key >/dev/null
|
||||||
|
|
||||||
@@ -46,6 +46,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
ansible-playbook \
|
ansible-playbook \
|
||||||
-i "${{ secrets.RELEASE_SERVER_IP }}," \
|
-i "${{ secrets.RELEASE_SERVER_IP }}," \
|
||||||
ansible/restart_compose.yml \
|
ansible/restart_release_compose.yml \
|
||||||
--user "${{ secrets.RELEASE_SERVER_USER }}" \
|
--user "${{ secrets.RELEASE_SERVER_USER }}" \
|
||||||
--private-key ~/.ssh/deploy_key
|
--private-key ~/.ssh/deploy_key
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
- name: Restart Docker Compose services
|
||||||
|
hosts: all
|
||||||
|
# become: yes # <-- больше не нужно, т.к. пользователь уже имеет права Docker
|
||||||
|
tasks:
|
||||||
|
- name: docker compose down
|
||||||
|
ansible.builtin.shell:
|
||||||
|
cmd: docker compose down pvh-backend
|
||||||
|
chdir: ~/web
|
||||||
|
- name: prune system
|
||||||
|
ansible.builtin.shell:
|
||||||
|
cmd: docker system prune -a -f
|
||||||
|
- name: docker compose up -d
|
||||||
|
ansible.builtin.shell:
|
||||||
|
cmd: docker compose up -d pvh-backend
|
||||||
|
chdir: ~/web
|
||||||
Reference in new issue
Block a user