- commit
- 121c015
- parent
- 520a647
- author
- Eric Bower
- date
- 2024-03-09 22:19:59 +0000 UTC
fix: caddy
2 files changed,
+42,
-1
+41,
-0
1@@ -36,6 +36,12 @@
2 Content-Security-Policy "default-src 'self'; img-src * 'unsafe-inline'; style-src * 'unsafe-inline'"
3
4 X-XSS-Protection "1; mode=block"
5+
6+ # CORS
7+ header Access-Control-Allow-Origin "*"
8+ header Access-Control-Allow-Methods "GET, POST, PUT, PATCH, DELETE"
9+ header Access-Control-Allow-Headers "*"
10+ header Access-Control-Max-Age "3600"
11 }
12
13 @caddymetrics {
14@@ -58,6 +64,41 @@
15 }
16 }
17
18+monitoring.{$MONITORING_APP_DOMAIN}, prometheus.{$MONITORING_APP_DOMAIN}, grafana.{$MONITORING_APP_DOMAIN} {
19+ @grafana {
20+ host grafana.{$MONITORING_APP_DOMAIN}
21+ }
22+
23+ @prometheus {
24+ host prometheus.{$MONITORING_APP_DOMAIN}
25+ }
26+
27+ tls {$MONITORING_APP_EMAIL} {
28+ dns cloudflare {$CF_API_TOKEN}
29+ resolvers 1.1.1.1
30+ }
31+
32+ encode zstd gzip
33+
34+ reverse_proxy @grafana grafana:3000
35+
36+ basicauth @prometheus {
37+ eric JDJhJDE0JDdPOXhoNUdhSmNVNDl6UWpmeTE0cWVkLjRwcUNJUnc0dVQ4MTZNSmVaNjA1TlptaVZYY1hh
38+ antonio JDJhJDE0JHI5dkVtMW0vcGxIb011OG4vME5HOU91c3U2VjM2QTZiWVpUeXdSbEg3VUtNZVdhN3BRazFH
39+ bot JDJhJDE0JFVsRlNHSDlJbFhDeUd0NldRR2JkcGVFYUJtWGluTHZDVlc5L3QwNWNwWUMuODRlcXZNZHpT
40+ }
41+ reverse_proxy @prometheus prometheus:9090
42+
43+ @caddymetrics {
44+ host monitoring.{$MONITORING_APP_DOMAIN}
45+ path /_caddy/metrics
46+ }
47+
48+ metrics @caddymetrics {
49+ disable_openmetrics
50+ }
51+}
52+
53 :443 {
54 reverse_proxy web:3000
55 tls {$APP_EMAIL} {
+1,
-1
1@@ -219,7 +219,7 @@ services:
2 APP_DOMAIN: ${PGS_DOMAIN:-pgs.sh}
3 APP_EMAIL: ${PGS_EMAIL:-hello@pico.sh}
4 volumes:
5- - ${PGS_CADDYFILE}:/etc/caddy/Caddyfile.pgs
6+ - ${PGS_CADDYFILE}:/etc/caddy/Caddyfile
7 - ./data/pgs-caddy/data:/data
8 - ./data/pgs-caddy/config:/config
9 ports: