docker service config

This commit is contained in:
Ryan Toler
2026-03-13 05:21:58 +00:00
parent 6704565217
commit 331dd8a829
2 changed files with 34 additions and 3 deletions

View File

@@ -9,7 +9,7 @@
vars:
restic_repo: "s3:http://misamisa.duckdns.org:9000/resticbackup"
restore_target_path: "/apps"
restore_target_path: "/"
# restic_password_value: "Stored in vault"
tasks:
@@ -30,7 +30,7 @@
- name: Check if app data directory exists
stat:
path: "/app/"
path: "/apps/"
register: app_data
- name: Restic restore app data Dir
@@ -46,12 +46,22 @@
when: not app_data.stat.exists or not app_data.stat.isdir
- name: Copy docker-compose.yml from repo
ansible.builtin.copy:
src: ./{{ ansible_hostname }}/docker-compose.yml
dest: /apps/docker/docker-compose.yml
- name: Copy docker-compose.env from repo
ansible.builtin.copy:
src: ./{{ ansible_hostname }}/docker-compose.env
dest: /apps/docker/docker-compose.env
- name: Reload systemd daemon
systemd:
daemon_reload: yes
- name: Start App Service
systemd:
name: "{{ ansible_hostname }}"
name: app
state: started
enabled: yes