Skip to content

Commit

Permalink
Remove incompatible restic plugin
Browse files Browse the repository at this point in the history
Because of this issue: caddyserver/caddy#2560
  • Loading branch information
klingtnet committed Oct 27, 2019
1 parent b7eff3d commit 88eb4f6
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 29 deletions.
1 change: 0 additions & 1 deletion backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
1 change: 0 additions & 1 deletion build/caddy/plugins.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
1 change: 0 additions & 1 deletion playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion roles/caddy/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
10 changes: 1 addition & 9 deletions roles/caddy/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -98,4 +90,4 @@
name: caddy
state: started
enabled: true
notify: restart-caddy
notify: restart-caddy
16 changes: 0 additions & 16 deletions roles/caddy/templates/Caddyfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 88eb4f6

Please sign in to comment.