diff --git a/02_vps_core_services_setup.md b/02_vps_core_services_setup.md index 5d75de9..76eefd5 100644 --- a/02_vps_core_services_setup.md +++ b/02_vps_core_services_setup.md @@ -285,22 +285,6 @@ LNBits is a Lightning Network wallet and accounts system. It uses the phoenixd n * Start it up again. -## ntfy-emergency-app - -ntfy-emergency-app is a simple web application that allows trusted people to send emergency messages via ntfy notifications. Perfect for situations where you need to be alerted immediately but don't want to enable notifications on your regular messaging apps. - -### Deploy - -* Decide what subdomain you want to serve the emergency app on and update `ansible/services_config.yml` under `ntfy_emergency_app`. - * Note that you will have to add a DNS entry to point to the VPS public IP. -* Configure the ntfy settings in `ntfy_emergency_app_vars.yml`: - * `ntfy_emergency_app_topic`: The ntfy topic to send messages to (default: "emergency") - * `ntfy_emergency_app_ui_message`: Custom message displayed in the web interface -* Ensure `infra_secrets.yml` contains `ntfy_username` and `ntfy_password` with the credentials the app should use. -* Make sure docker is available on the host. -* Run the deployment playbook: `ansible-playbook -i inventory.ini services/ntfy-emergency-app/deploy_ntfy_emergency_app_playbook.yml`. - - ## Headscale Headscale is a self-hosted Tailscale control server that allows you to create your own Tailscale network. diff --git a/ansible/group_vars/all/main.yml b/ansible/group_vars/all/main.yml index 3a365f8..e9ab735 100644 --- a/ansible/group_vars/all/main.yml +++ b/ansible/group_vars/all/main.yml @@ -36,7 +36,6 @@ subdomains: lnbits: wallet # Secondary services (vipy) - ntfy_emergency_app: avisame personal_blog: pablohere # Memos (memos-box) diff --git a/ansible/infra/402_public_monitoring.yml b/ansible/infra/402_public_monitoring.yml index a6dfa63..ee6eb9f 100644 --- a/ansible/infra/402_public_monitoring.yml +++ b/ansible/infra/402_public_monitoring.yml @@ -26,7 +26,6 @@ - {sub: "{{ subdomains.vaultwarden }}", host: vipy} - {sub: "{{ subdomains.forgejo }}", host: vipy} - {sub: "{{ subdomains.lnbits }}", host: vipy} - - {sub: "{{ subdomains.ntfy_emergency_app }}", host: vipy} - {sub: "{{ subdomains.personal_blog }}", host: vipy} - {sub: "{{ subdomains.memos }}", host: vipy} - {sub: "{{ subdomains.mempool }}", host: vipy} @@ -52,7 +51,6 @@ - {name: vaultwarden, sub: "{{ subdomains.vaultwarden }}", path: "/", status: 200} - {name: forgejo, sub: "{{ subdomains.forgejo }}", path: "/", status: 200} - {name: lnbits, sub: "{{ subdomains.lnbits }}", path: "/", status: 200} - - {name: avisame, sub: "{{ subdomains.ntfy_emergency_app }}", path: "/", status: 200} - {name: blog, sub: "{{ subdomains.personal_blog }}", path: "/", status: 200} - {name: memos, sub: "{{ subdomains.memos }}", path: "/", status: 200} - {name: mempool, sub: "{{ subdomains.mempool }}", path: "/", status: 200} diff --git a/ansible/services/ntfy-emergency-app/deploy_ntfy_emergency_app_playbook.yml b/ansible/services/ntfy-emergency-app/deploy_ntfy_emergency_app_playbook.yml deleted file mode 100644 index 58f0348..0000000 --- a/ansible/services/ntfy-emergency-app/deploy_ntfy_emergency_app_playbook.yml +++ /dev/null @@ -1,62 +0,0 @@ -- name: Deploy ntfy-emergency-app with Docker Compose and configure Caddy reverse proxy - hosts: edge - become: yes - vars_files: - - ./ntfy_emergency_app_vars.yml - vars: - ntfy_emergency_app_subdomain: "{{ subdomains.ntfy_emergency_app }}" - ntfy_emergency_app_domain: "{{ ntfy_emergency_app_subdomain }}.{{ root_domain }}" - # ⚠ UNRESOLVED: this app sends its notifications to an ntfy server, and the - # server it points at ran on watchtower, which is being destroyed. This was - # derived from subdomains.ntfy, which is now gone with it. - # - # Until an ntfy server exists again this URL is dead, and the app fails - # silently at exactly the moment it matters - it is an EMERGENCY notifier. - # Three ways out, none of them automatic: - # * stand ntfy up somewhere else (the monitoring VPS, or vipy) - # * point this at the public ntfy.sh - # * retire the app - ntfy_emergency_app_ntfy_url: "{{ ntfy_service_url }}" - ntfy_emergency_app_ntfy_user: "{{ ntfy_username | default('') }}" - ntfy_emergency_app_ntfy_password: "{{ ntfy_password | default('') }}" - - tasks: - - name: Create ntfy-emergency-app directory - file: - path: "{{ ntfy_emergency_app_dir }}" - state: directory - owner: "{{ ansible_user }}" - group: "{{ ansible_user }}" - mode: '0755' - - - name: Create docker-compose.yml for ntfy-emergency-app - copy: - dest: "{{ ntfy_emergency_app_dir }}/docker-compose.yml" - content: | - version: "3" - services: - ntfy-emergency-app: - image: ghcr.io/pmartincalvo/ntfy-emergency-app:latest - container_name: ntfy-emergency-app - restart: unless-stopped - ports: - - "{{ ntfy_emergency_app_port }}:3000" - environment: - NTFY_TOPIC: "{{ ntfy_emergency_app_topic }}" - NTFY_URL: "{{ ntfy_emergency_app_ntfy_url }}" - NTFY_USER: "{{ ntfy_emergency_app_ntfy_user }}" - NTFY_PASSWORD: "{{ ntfy_emergency_app_ntfy_password }}" - UI_MESSAGE: "{{ ntfy_emergency_app_ui_message }}" - - - name: Deploy ntfy-emergency-app container with docker compose - command: docker compose up -d - args: - chdir: "{{ ntfy_emergency_app_dir }}" - - - name: Publish ntfy-emergency-app through Caddy - ansible.builtin.include_role: - name: caddy_site - vars: - caddy_site_name: ntfy-emergency-app - caddy_site_domain: "{{ ntfy_emergency_app_domain }}" - caddy_site_upstream: "localhost:{{ ntfy_emergency_app_port }}" diff --git a/ansible/services/ntfy-emergency-app/ntfy_emergency_app_vars.yml b/ansible/services/ntfy-emergency-app/ntfy_emergency_app_vars.yml deleted file mode 100644 index bfa4bd1..0000000 --- a/ansible/services/ntfy-emergency-app/ntfy_emergency_app_vars.yml +++ /dev/null @@ -1,22 +0,0 @@ -# General -ntfy_emergency_app_dir: /opt/ntfy-emergency-app -ntfy_emergency_app_port: 3000 - -# (subdomain in group_vars/all/main.yml, caddy_sites_dir in roles/caddy_site/defaults/) - -# ntfy configuration -ntfy_emergency_app_topic: "emergencia" -ntfy_emergency_app_ui_message: "Leave Pablo a message, he will respond as soon as possible" - -# Remote access -remote_host_name: "{{ groups['edge'] | first }}" -remote_host: "{{ hostvars.get(remote_host_name, {}).get('ansible_host', remote_host_name) }}" -remote_user: "{{ hostvars.get(remote_host_name, {}).get('ansible_user', 'counterweight') }}" -remote_key_file: "{{ hostvars.get(remote_host_name, {}).get('ansible_ssh_private_key_file', '') }}" -remote_port: "{{ hostvars.get(remote_host_name, {}).get('ansible_port', 22) }}" - -# Where the emergency notifications are sent. This pointed at ntfy.contrapeso.xyz -# on watchtower; that host is being destroyed, so this MUST be repointed before -# the app can work again. Left at the old value so the break is visible rather -# than silently defaulted to something plausible. -ntfy_service_url: "https://ntfy.contrapeso.xyz" diff --git a/ansible/site.yml b/ansible/site.yml index 40f410c..28e620e 100644 --- a/ansible/site.yml +++ b/ansible/site.yml @@ -64,7 +64,6 @@ - import_playbook: services/vaultwarden/deploy_vaultwarden_playbook.yml - import_playbook: services/forgejo/deploy_forgejo_playbook.yml - import_playbook: services/lnbits/deploy_lnbits_playbook.yml -- import_playbook: services/ntfy-emergency-app/deploy_ntfy_emergency_app_playbook.yml - import_playbook: services/personal-blog/deploy_personal_blog_playbook.yml # ── Backups: each source dumps itself, the box pulls ────────────────────────