-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCaddyfile
More file actions
56 lines (49 loc) · 1.29 KB
/
Caddyfile
File metadata and controls
56 lines (49 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Caddyfile for Nagoya Urban Infrastructure DX Platform
nagoya.uixai.org {
# Static PMTiles files - serve from web container (long cache)
handle /tiles/*.pmtiles {
header Cache-Control "public, max-age=86400"
reverse_proxy nagoya-web:5173
}
# Dynamic vector tiles from Martin (short cache for real-time data)
handle /tiles/* {
header Cache-Control "public, max-age=300"
uri strip_prefix /tiles
reverse_proxy nagoya-martin:3000
}
# API endpoints
handle /api/* {
uri strip_prefix /api
reverse_proxy nagoya-api:3000
}
# OGC API endpoints (no prefix strip - routes are /ogc/...)
@ogc path /ogc /ogc/*
handle @ogc {
reverse_proxy nagoya-api:3000
}
# SSE endpoints (no buffering)
handle /sse/* {
uri strip_prefix /sse
reverse_proxy nagoya-api:3000 {
flush_interval -1
}
}
# Frontend (Vite dev server in Docker)
@frontend {
not path /api/*
not path /ogc /ogc/*
not path /sse/*
not path /tiles/*
not path /.well-known/*
}
handle @frontend {
reverse_proxy nagoya-web:5173
}
# Enable compression
encode gzip
# Logging
log {
output stdout
format console
}
}