Caddy
This commit is contained in:
@@ -5,9 +5,24 @@
|
||||
loop:
|
||||
- /opt/stacks/caddy
|
||||
|
||||
- name: copy Caddyfile
|
||||
ansible.builtin.copy:
|
||||
src: Caddyfile
|
||||
- name: Install apache2-utils for htpasswd
|
||||
ansible.builtin.apt:
|
||||
name: apache2-utils
|
||||
state: present
|
||||
become: true
|
||||
when: vault_dir2opds is defined
|
||||
|
||||
- name: Generate bcrypt hash for dir2opds basic auth
|
||||
ansible.builtin.shell: |
|
||||
htpasswd -bnB "{{ vault_dir2opds.basic_auth_user }}" "{{ vault_dir2opds.basic_auth_password }}" | awk -F: '{print $1, $2}'
|
||||
register: dir2opds_basic_auth_hash_result
|
||||
changed_when: false
|
||||
no_log: true
|
||||
when: vault_dir2opds is defined
|
||||
|
||||
- name: template Caddyfile
|
||||
ansible.builtin.template:
|
||||
src: Caddyfile.j2
|
||||
dest: /opt/stacks/caddy/Caddyfile
|
||||
owner: root
|
||||
mode: 644
|
||||
|
||||
@@ -109,3 +109,12 @@ listmonk.nerder.land {
|
||||
repaircafe.nerder.land {
|
||||
redir /volunteer-signup https://listmonk.nerder.land/subscription/form 301
|
||||
}
|
||||
|
||||
{% if vault_dir2opds is defined %}
|
||||
opds.thesatelliteoflove.com {
|
||||
basicauth {
|
||||
{{ dir2opds_basic_auth_hash_result.stdout }}
|
||||
}
|
||||
reverse_proxy dir2opds:8080
|
||||
}
|
||||
{% endif %}
|
||||
@@ -17,7 +17,7 @@ services:
|
||||
labels:
|
||||
glance.name: dir2opds
|
||||
glance.icon: si:book
|
||||
glance.url: http://docker-01:8080
|
||||
glance.url: https://{{ subdomains.dir2opds }}/
|
||||
glance.description: OPDS book catalog
|
||||
mag37.dockcheck.update: true
|
||||
networks:
|
||||
|
||||
Reference in New Issue
Block a user