roles/caddy: fix issues
This commit is contained in:
parent
e0b7c5a15e
commit
a1c44da446
@ -7,3 +7,6 @@
|
||||
website_path: /srv/http
|
||||
|
||||
gitea_domain: "git.{{ domain }}"
|
||||
|
||||
## send renewal reminders to this address
|
||||
email: null
|
||||
|
@ -9,6 +9,14 @@
|
||||
template:
|
||||
src: Caddyfile.j2
|
||||
dest: /etc/caddy/Caddyfile
|
||||
lstrip_blocks: true
|
||||
register: caddy_config
|
||||
|
||||
- name: Restart Caddy service
|
||||
service:
|
||||
name: caddy
|
||||
state: restarted
|
||||
when: caddy_config.changed
|
||||
|
||||
- name: Enable Caddy service
|
||||
service:
|
||||
|
@ -1,12 +1,18 @@
|
||||
{
|
||||
{% if email is not none %}
|
||||
email {{ email }}
|
||||
{% endif %}
|
||||
}
|
||||
|
||||
{% if "website" in group_names %}
|
||||
www.{{ domain }} {
|
||||
http://www.{{ domain }} {
|
||||
root * {{ website_path }}
|
||||
file_server
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
{% if groups["gitea"] %}
|
||||
{{ gitea_domain }} {
|
||||
{% if groups["gitea"] | length > 0 %}
|
||||
http://{{ gitea_domain }} {
|
||||
reverse_proxy {{ groups["gitea"][0] }}:3000
|
||||
}
|
||||
{% endif %}
|
||||
|
@ -3,5 +3,5 @@
|
||||
|
||||
set -e
|
||||
|
||||
git -C /home/{{ web_username }}/website pull
|
||||
make -C /home/{{ web_username }}/website build
|
||||
git -C /home/{{ website_username }}/website pull
|
||||
make -C /home/{{ website_username }}/website build
|
||||
|
Loading…
Reference in New Issue
Block a user