|
| 1 | +metadata: |
| 2 | + id: "deploy-gotify" |
| 3 | + name: "Gotify" |
| 4 | + description: "Gotify is a simple server for sending and receiving messages in real-time, perfect for push notifications and alerts." |
| 5 | + author: "Nixopus Team" |
| 6 | + icon: "📨" |
| 7 | + category: "Containers" |
| 8 | + type: "install" |
| 9 | + version: "1.0.0" |
| 10 | + isVerified: false |
| 11 | + |
| 12 | +variables: |
| 13 | + image: |
| 14 | + type: "string" |
| 15 | + description: "Docker image for Gotify" |
| 16 | + default: "ghcr.io/gotify/server" |
| 17 | + is_required: true |
| 18 | + |
| 19 | + tag: |
| 20 | + type: "string" |
| 21 | + description: "Docker image tag" |
| 22 | + default: "latest" |
| 23 | + is_required: true |
| 24 | + |
| 25 | + container_name: |
| 26 | + type: "string" |
| 27 | + description: "Name of the container" |
| 28 | + default: "gotify" |
| 29 | + is_required: true |
| 30 | + |
| 31 | + host_port: |
| 32 | + type: "integer" |
| 33 | + description: "Host port to expose" |
| 34 | + default: 80 |
| 35 | + is_required: true |
| 36 | + |
| 37 | + container_port: |
| 38 | + type: "integer" |
| 39 | + description: "Container port to map" |
| 40 | + default: 80 |
| 41 | + is_required: true |
| 42 | + |
| 43 | + data_volume: |
| 44 | + type: "string" |
| 45 | + description: "Docker volume name for Gotify persistent data" |
| 46 | + default: "gotify_data" |
| 47 | + is_required: true |
| 48 | + |
| 49 | + timezone: |
| 50 | + type: "string" |
| 51 | + description: "Timezone (TZ) environment variable" |
| 52 | + default: "UTC" |
| 53 | + is_required: false |
| 54 | + |
| 55 | + default_user: |
| 56 | + type: "string" |
| 57 | + description: "Default admin username" |
| 58 | + default: "admin" |
| 59 | + is_required: false |
| 60 | + |
| 61 | + default_password: |
| 62 | + type: "string" |
| 63 | + description: "Default admin password" |
| 64 | + default: "admin" |
| 65 | + is_required: false |
| 66 | + |
| 67 | + proxy_domain: |
| 68 | + type: "string" |
| 69 | + description: "Domain name for Gotify (optional)" |
| 70 | + default: "" |
| 71 | + is_required: false |
| 72 | + |
| 73 | +execution: |
| 74 | + run: |
| 75 | + - name: "Remove existing Gotify container if present" |
| 76 | + type: "command" |
| 77 | + properties: |
| 78 | + cmd: "docker rm -f {{ container_name }} || true" |
| 79 | + timeout: 30 |
| 80 | + |
| 81 | + - name: "Pull Gotify image" |
| 82 | + type: "docker" |
| 83 | + properties: |
| 84 | + action: "pull" |
| 85 | + image: "{{ image }}" |
| 86 | + tag: "{{ tag }}" |
| 87 | + timeout: 300 |
| 88 | + |
| 89 | + - name: "Run Gotify container" |
| 90 | + type: "docker" |
| 91 | + properties: |
| 92 | + action: "run" |
| 93 | + name: "{{ container_name }}" |
| 94 | + image: "{{ image }}" |
| 95 | + tag: "{{ tag }}" |
| 96 | + ports: "{{ host_port }}:{{ container_port }}" |
| 97 | + volumes: |
| 98 | + - "{{ data_volume }}:/app/data" |
| 99 | + environment: |
| 100 | + - "TZ={{ timezone }}" |
| 101 | + - "GOTIFY_DEFAULTUSER_NAME={{ default_user }}" |
| 102 | + - "GOTIFY_DEFAULTUSER_PASS={{ default_password }}" |
| 103 | + restart: "unless-stopped" |
| 104 | + timeout: 120 |
| 105 | + |
| 106 | + - name: "Add proxy for Gotify" |
| 107 | + type: "proxy" |
| 108 | + properties: |
| 109 | + action: "add" |
| 110 | + domain: "{{ proxy_domain }}" |
| 111 | + port: "{{ host_port }}" |
| 112 | + timeout: 30 |
| 113 | + |
| 114 | + validate: |
| 115 | + - name: "Check Gotify web interface is accessible" |
| 116 | + type: "command" |
| 117 | + properties: |
| 118 | + cmd: "sh -c 'for i in $(seq 1 30); do code=$(curl -fsS -o /dev/null -w \"%{http_code}\\n\" http://localhost:{{ host_port }} || true); echo \"HTTP $code\"; echo $code | grep -E \"^(200|301|302)$\" && exit 0; sleep 2; done; exit 1'" |
| 119 | + timeout: 60 |
0 commit comments