feat: initial environment management
- caddy/m4mini.Caddyfile: Main reverse proxy config (all DDNS) - machines/: Documentation for 3 machines - env/: Environment variable templates
This commit is contained in:
@@ -0,0 +1,187 @@
|
||||
# Caddyfile for m4mini (192.168.110.210) - Main reverse proxy
|
||||
{
|
||||
email admin@accusys.com.tw
|
||||
metrics
|
||||
}
|
||||
|
||||
# 定義日誌 Snippet
|
||||
(common_log) {
|
||||
log {
|
||||
output file /Users/accusys/momentry/log/{args[0]}.log {
|
||||
roll_size 100mb
|
||||
roll_keep 5
|
||||
roll_keep_for 720h
|
||||
}
|
||||
format json
|
||||
}
|
||||
}
|
||||
|
||||
# router 5 (192.168.5.1)
|
||||
router5.momentry.ddns.net {
|
||||
reverse_proxy 192.168.5.1:80 {
|
||||
header_up Host {upstream_hostport}
|
||||
}
|
||||
import common_log router5_access
|
||||
}
|
||||
|
||||
# router 110 (192.168.110.1)
|
||||
router110.momentry.ddns.net {
|
||||
reverse_proxy 192.168.110.1:80 {
|
||||
header_up Host {upstream_hostport}
|
||||
}
|
||||
import common_log router110_access
|
||||
}
|
||||
|
||||
router0.momentry.ddns.net {
|
||||
handle_path /admin/* {
|
||||
uri strip_prefix /admin
|
||||
reverse_proxy 192.168.0.1:80 {
|
||||
header_up Host 192.168.0.1
|
||||
header_up X-Forwarded-Proto http # 告诉后端:原始是 HTTP
|
||||
header_up X-Real-IP {remote_host}
|
||||
}
|
||||
}
|
||||
import common_log router0_access
|
||||
}
|
||||
|
||||
# n8n
|
||||
n8n.momentry.ddns.net {
|
||||
@metrics {
|
||||
path /metrics
|
||||
}
|
||||
respond @metrics 403
|
||||
|
||||
reverse_proxy 127.0.0.1:5678 {
|
||||
flush_interval -1
|
||||
}
|
||||
import common_log n8n_access
|
||||
}
|
||||
|
||||
# seaweed (SeaweedFS)
|
||||
seaweed.momentry.ddns.net {
|
||||
reverse_proxy 127.0.0.1:8888
|
||||
import common_log seaweed_access
|
||||
}
|
||||
|
||||
# sftpgo (sftpgo)
|
||||
m4minisftpgo.momentry.ddns.net {
|
||||
reverse_proxy 127.0.0.1:8081
|
||||
import common_log m4minisftpgo_access
|
||||
}
|
||||
|
||||
# webdav (sftpgo)
|
||||
webdav.momentry.ddns.net {
|
||||
reverse_proxy 127.0.0.1:8090
|
||||
import common_log webdav_access
|
||||
}
|
||||
|
||||
# qdrant (qdrant)
|
||||
qdrant.momentry.ddns.net {
|
||||
reverse_proxy 127.0.0.1:6333
|
||||
import common_log qdrant_access
|
||||
}
|
||||
|
||||
# Gitea (Gitea)
|
||||
gitea.momentry.ddns.net {
|
||||
reverse_proxy 127.0.0.1:3000
|
||||
encode gzip
|
||||
import common_log gitea_access
|
||||
}
|
||||
|
||||
# Chat (Open WebUI)
|
||||
chat.momentry.ddns.net {
|
||||
reverse_proxy 127.0.0.1:8085
|
||||
import common_log chat_access
|
||||
}
|
||||
|
||||
# Netdata
|
||||
netdata.momentry.ddns.net {
|
||||
reverse_proxy 127.0.0.1:19999
|
||||
import common_log netdata_access
|
||||
}
|
||||
|
||||
# Grafana
|
||||
grafana.momentry.ddns.net {
|
||||
reverse_proxy 127.0.0.1:3001
|
||||
import common_log grafana_access
|
||||
}
|
||||
|
||||
# TrueNAS
|
||||
truenas.momentry.ddns.net {
|
||||
reverse_proxy 192.168.0.219:80 192.168.110.219:80
|
||||
import common_log truenas_access
|
||||
}
|
||||
|
||||
# Momentry Dashboard (Static HTML)
|
||||
:3200 {
|
||||
handle /api/* {
|
||||
reverse_proxy localhost:3002
|
||||
}
|
||||
|
||||
handle {
|
||||
root * /Users/accusys/momentry_dashboard/dist
|
||||
encode gzip
|
||||
try_files {path} /index.html
|
||||
file_server
|
||||
}
|
||||
}
|
||||
|
||||
# Momentry Core API
|
||||
api.momentry.ddns.net {
|
||||
reverse_proxy localhost:3002
|
||||
import common_log momentry_api_access
|
||||
}
|
||||
|
||||
# M5 SFTPGo
|
||||
m5max48sftpgo.momentry.ddns.net {
|
||||
reverse_proxy 192.168.110.201:8081
|
||||
import common_log m5max48sftpgo_access
|
||||
}
|
||||
|
||||
# M5 WordPress
|
||||
m5wp.momentry.ddns.net {
|
||||
tls internal
|
||||
|
||||
# Local video files: direct serve, zero backend overhead
|
||||
handle_path /files/* {
|
||||
root * /Users/accusys/momentry/var/sftpgo/data
|
||||
file_server
|
||||
}
|
||||
|
||||
# Media proxy: bypasses inactive WordPress Code Snippet 61
|
||||
# Rewrites path, preserves original query string
|
||||
@handle_media path /wp-json/momentry/v1/media
|
||||
handle @handle_media {
|
||||
rewrite * /api/v1/media-proxy
|
||||
reverse_proxy localhost:3002 {
|
||||
header_up X-API-Key muser_68600856036340bcafc01930eb4bd839_1774418104_97221b69
|
||||
}
|
||||
}
|
||||
|
||||
reverse_proxy localhost:9002
|
||||
import common_log m5wp_access
|
||||
}
|
||||
|
||||
# M5 Momentry Core API
|
||||
m5api.momentry.ddns.net {
|
||||
tls internal
|
||||
reverse_proxy localhost:3002
|
||||
import common_log m5api_access
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Momentry Studio (Vue3 Frontend)
|
||||
studio.momentry.ddns.net {
|
||||
reverse_proxy localhost:5173
|
||||
import common_log studio_access
|
||||
}
|
||||
|
||||
# M4ProMini - Nextorage Services
|
||||
nextorage.momentry.ddns.net {
|
||||
reverse_proxy localhost:5173 {
|
||||
header_up Host {upstream_hostport}
|
||||
}
|
||||
encode gzip
|
||||
import common_log nextorage_access
|
||||
}
|
||||
Reference in New Issue
Block a user