From 552a13c7977ada8880353a11fdcb60ed08aecdd2 Mon Sep 17 00:00:00 2001 From: cbax Date: Thu, 24 Oct 2024 16:52:13 +0000 Subject: [PATCH 1/2] added posts to volume set --- compose.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compose.yml b/compose.yml index 55e4f6f..eda5e72 100644 --- a/compose.yml +++ b/compose.yml @@ -9,4 +9,5 @@ services: - '7654:7654' restart: unless-stopped volumes: - - /srv/http/cbax_dev:/app/static + - /srv/http/cbax_dev/static:/app/static + - /srv/http/cbax_dev/posts:/app/posts From 995ac1b7d2dadebeff04125885d1cc230fc12a33 Mon Sep 17 00:00:00 2001 From: cbax Date: Thu, 24 Oct 2024 16:57:11 +0000 Subject: [PATCH 2/2] added posts to copy and prevented lossy clobbering --- deploy.playbook.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/deploy.playbook.yml b/deploy.playbook.yml index 1387e1a..5fcab21 100644 --- a/deploy.playbook.yml +++ b/deploy.playbook.yml @@ -9,11 +9,19 @@ src: "{{playbook_dir}}/" dest: "/root/cbax_dev" - - name: Move assets + - name: Copy static files to application folder in /srv/http ansible.builtin.copy: + backup: true remote_src: true - src: /root/cbax_dev/static/ - dest: /srv/http/cbax_dev/ + src: /root/cbax_dev/static + dest: /srv/http/cbax_dev/static + + - name: Copy posts to application folder in /srv/http + ansible.builtin.copy: + backup: true + remote_src: true + src: /root/cbax_dev/posts + dest: /srv/http/cbax_dev/posts - name: Tear down existing service ansible.builtin.command: "docker compose down --rmi all"