Add Sigvild Gallery wedding photo application with automated deployment and improve Caddy plugin management

This commit is contained in:
2025-11-15 16:13:18 +01:00
parent 8162e789ee
commit 7c3b02e5ad
16 changed files with 923 additions and 10 deletions

View File

@@ -0,0 +1,52 @@
---
# Sigvild Gallery Deployment Playbook
- name: Deploy Sigvild Wedding Gallery
hosts: arch-vps
become: yes
gather_facts: yes
vars:
# Local project path - adjust as needed
sigvild_gallery_local_project_path: "{{ ansible_env.PWD }}/../sigvild-gallery"
pre_tasks:
- name: Verify local sigvild-gallery project exists
local_action:
module: stat
path: "{{ sigvild_gallery_local_project_path }}"
register: project_exists
become: no
- name: Fail if project directory doesn't exist
fail:
msg: "Sigvild Gallery project not found at {{ sigvild_gallery_local_project_path }}"
when: not project_exists.stat.exists
- name: Display deployment information
debug:
msg:
- "Deploying Sigvild Gallery from: {{ sigvild_gallery_local_project_path }}"
- "Frontend domain: {{ sigvild_gallery_frontend_domain }}"
- "API domain: {{ sigvild_gallery_api_domain }}"
roles:
- role: sigvild-gallery
tags: ['sigvild', 'gallery', 'wedding']
post_tasks:
- name: Wait for API to be ready
wait_for:
port: "{{ sigvild_gallery_port }}"
host: "{{ sigvild_gallery_host }}"
timeout: 60
tags: [verify]
- name: Display deployment results
debug:
msg:
- "✅ Sigvild Gallery deployment completed!"
- "Frontend: https://{{ sigvild_gallery_frontend_domain }}"
- "API: https://{{ sigvild_gallery_api_domain }}"
- "Service status: systemctl status sigvild-gallery"
- "Logs: journalctl -u sigvild-gallery -f"