Browse Source

Remove incompatible restic plugin

Because of this issue: https://github.com/caddyserver/caddy/issues/2560
master
Andreas Linz 1 year ago
parent
commit
88eb4f6595
Signed by: alinz GPG Key ID: 9BF39809C9DA580C
6 changed files with 1 additions and 29 deletions
  1. +0
    -1
      backup.sh
  2. +0
    -1
      build/caddy/plugins.patch
  3. +0
    -1
      playbook.yml
  4. +0
    -1
      roles/caddy/defaults/main.yml
  5. +1
    -9
      roles/caddy/tasks/main.yml
  6. +0
    -16
      roles/caddy/templates/Caddyfile.tmpl

+ 0
- 1
backup.sh View File

@ -19,7 +19,6 @@ _caddy() {
ssh ${domain} "sudo systemctl stop caddy"
local fname="backups/caddy-files-${timestamp}.tar.xz"
echo "Creating $fname ..."
# backup 'restic files.${domain}' in a separate target
ssh ${domain} "sudo tar -C /home/caddy -cf - -- certs | pixz" > "$fname"
ssh ${domain} "sudo systemctl start caddy"
}

+ 0
- 1
build/caddy/plugins.patch View File

@ -19,7 +19,6 @@ index e9ce689b..56a4b096 100644
+ _ "github.com/miekg/caddy-prometheus"
+ _ "github.com/nicolasazrak/caddy-cache"
+ _ "github.com/pyed/ipfilter"
+ _ "github.com/restic/caddy"
+ _ "github.com/xuqingfeng/caddy-rate-limit"
)

+ 0
- 1
playbook.yml View File

@ -8,7 +8,6 @@
domain: "{{ var_domain | default('klingt.net') }}"
domain_version: unknown
caddy_email: "{{ user_email }}"
caddy_restic_user: alinz
web_root: /var/web
vars_files:
- vault_vars.yml

+ 0
- 1
roles/caddy/defaults/main.yml View File

@ -2,5 +2,4 @@ caddy_user: caddy
caddy_group: caddy
caddy_path: /usr/bin/caddy
caddy_prometheus_port: 9180
caddy_restic_path: "/home/{{ caddy_user }}/restic"
caddy_file_browser_root: "/home/{{ caddy_user }}/files.{{ domain }}"

+ 1
- 9
roles/caddy/tasks/main.yml View File

@ -39,14 +39,6 @@
- "{{ domain }}.key"
- "{{ domain }}.crt"
when: is_staging
- name: Create caddy restic path
become: true
file:
name: "{{ caddy_restic_path }}"
owner: "{{ caddy_user }}"
group: "{{ caddy_group }}"
state: directory
mode: 0700
- name: "Create {{ caddy_file_browser_root }} directory"
become: true
file:
@ -98,4 +90,4 @@
name: caddy
state: started
enabled: true
notify: restart-caddy
notify: restart-caddy

+ 0
- 16
roles/caddy/templates/Caddyfile.tmpl View File

@ -86,22 +86,6 @@ grafana.{{ domain }}:443 {
}
}
restic.{{ domain }}:80 {
prometheus
header / X-klingt-net-version "{{ domain_version }}"
errors stderr
redir https://restic.{{ domain }}{uri}
}
restic.{{ domain }}:443 {
prometheus
header / X-klingt-net-version "{{ domain_version }}"
errors stderr
{% if is_staging %}tls /home/{{ caddy_user }}/certs/{{ domain }}.crt /home/{{ caddy_user }}/certs/{{ domain }}.key
{% endif %}
basicauth / {{ caddy_restic_user }} {{ caddy_restic_password }}
restic / {{ caddy_restic_path }}
}
files.{{ domain }}:80 {
import common.caddy
redir https://files.{{ domain }}{uri}

Loading…
Cancel
Save