graylog updates, test.debyl.io, scripts for reference
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
# Legacy volume mounts removed - Caddy manages certificates automatically
|
||||
# Mount static site directories
|
||||
- "/usr/local/share/fulfillr-site:/usr/local/share/fulfillr-site:ro"
|
||||
- "/usr/local/share/test-site:/srv/test-site:ro"
|
||||
env:
|
||||
CADDY_ADMIN: "0.0.0.0:2019"
|
||||
restart_policy: always
|
||||
|
||||
@@ -27,6 +27,17 @@
|
||||
- caddy
|
||||
- ssl
|
||||
|
||||
- name: create test-site directory
|
||||
become: true
|
||||
ansible.builtin.file:
|
||||
path: /usr/local/share/test-site
|
||||
state: directory
|
||||
owner: "{{ ansible_user }}"
|
||||
group: "{{ ansible_user }}"
|
||||
mode: '0755'
|
||||
tags:
|
||||
- caddy
|
||||
|
||||
- name: deploy caddyfile
|
||||
become: true
|
||||
ansible.builtin.template:
|
||||
|
||||
@@ -327,22 +327,45 @@
|
||||
|
||||
reverse_proxy localhost:9054
|
||||
}
|
||||
|
||||
|
||||
# Serve static files with SPA fallback
|
||||
handle {
|
||||
root * /usr/local/share/fulfillr-site
|
||||
try_files {path} {path}/ /index.html
|
||||
file_server
|
||||
}
|
||||
|
||||
|
||||
header {
|
||||
Strict-Transport-Security "max-age=31536000; includeSubDomains"
|
||||
X-Content-Type-Options "nosniff"
|
||||
Referrer-Policy "same-origin"
|
||||
}
|
||||
|
||||
|
||||
log {
|
||||
output file /var/log/caddy/fulfillr.log
|
||||
format json
|
||||
}
|
||||
}
|
||||
|
||||
# ============================================================================
|
||||
# TEST/STAGING SITES
|
||||
# ============================================================================
|
||||
|
||||
# Test Site - test.debyl.io (Public static site hosting, no caching)
|
||||
test.debyl.io {
|
||||
import common_headers
|
||||
|
||||
root * /srv/test-site
|
||||
try_files {path} {path}/ /index.html
|
||||
file_server
|
||||
|
||||
# Disable all caching for test sites
|
||||
header Cache-Control "no-store, no-cache, must-revalidate, max-age=0"
|
||||
header Pragma "no-cache"
|
||||
|
||||
log {
|
||||
output file /var/log/caddy/test.log
|
||||
format json
|
||||
level {{ caddy_log_level }}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user