1
0

Фикс запуска caddy-сервера

This commit is contained in:
Anton Vakhrushev 2022-08-12 10:40:43 +03:00
parent a57b39ec76
commit 2c6d4ac321
Signed by: av
GPG Key ID: 581F7473F7A21FA2
2 changed files with 24 additions and 39 deletions

View File

@ -32,15 +32,27 @@
- name: 'Install python docker lib.'
pip:
name: docker
tags:
- docker
- import_role:
name: geerlingguy.docker
tags:
- docker
- name: 'Ensure networkd service is started (required by Caddy).'
systemd:
name: systemd-networkd
state: started
enabled: true
tags:
- webserver
- import_role:
name: caddy_ansible.caddy_ansible
vars:
caddy_github_token: '{{ caddy_vars.github_token }}'
# caddy_config: '{{ lookup("template", "templates/Caddyfile.j2") }}'
caddy_config: '{{ lookup("template", "templates/Caddyfile.j2") }}'
caddy_update: False
caddy_setcap: True
caddy_systemd_capabilities_enabled: True

View File

@ -2,48 +2,21 @@
# Proxy services
# -------------------------------------------------------------------
vakhrushev.me {
tls anwinged@ya.ru
respond "Hello!"
}
# NetData proxy
status.vakhrushev.me, :29999 {
proxy / 127.0.0.1:19999 {
transparent
reverse_proxy {
to 127.0.0.1:19999
}
tls anwinged@ya.ru
basicauth / {{ netdata.login }} {{ netdata.password }}
# basicauth / {
# {{ netdata.login }} {{ netdata.password | password_hash('blowfish') | b64encode }}
# }
}
# Yandex Image Proxy
preview.vakhrushev.me {
proxy /img https://webdav.yandex.ru {
transparent
header_upstream User-Agent "yandex-disk-previewer/1.0"
header_upstream Authorization "Basic {{ (yandex_disk.login ~ ':' ~ yandex_disk.password) | b64encode }}"
}
tls anwinged@ya.ru
}
# -------------------------------------------------------------------
# Applications
# -------------------------------------------------------------------
# Homepage
homepage.vakhrushev.me, vakhrushev.me {
root /var/www/homepage/current
tls anwinged@ya.ru
gzip
errors {
404 404/index.html
}
}
# Dayoff app
dayoff.vakhrushev.me {
proxy / 127.0.0.1:{{ dayoff_port }} {
transparent
}
tls anwinged@ya.ru
}