- Downloads: one photo, a selection (up to 100) or a whole gallery (ZIP, up to 1000) at 2048 px with metadata, through a short-lived signed link. Gallery and large view get the buttons. - The cloud is named only to those who edit the folder there (a small "originals" link); sign-in no longer mentions it. - cloud_sources.hostname: the site's middleware serves that archive at the root of its own host; Caddy asks /v1/archive/host before getting a certificate. Set in the app (Endereço próprio). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017sovZz1NXBwx4VySojoyA1
46 lines
1.4 KiB
Caddyfile
46 lines
1.4 KiB
Caddyfile
# Reverse proxy for the `next` environment (Caddy obtains the certificates). Adjust the upstream addresses
|
|
# to the containers (docs/ARCHITECTURE.md, Infrastructure).
|
|
{
|
|
# Archives' own addresses (docs/archive.md): a certificate only for a host the API knows.
|
|
on_demand_tls {
|
|
ask http://pr-api:3000/v1/archive/host
|
|
}
|
|
}
|
|
|
|
app.next.photoreport.pt {
|
|
# The SPA (static build in /var/www/photoreport-app/current); the engine's WASM needs its media type.
|
|
root * /var/www/photoreport-app/current
|
|
@wasm path *.wasm
|
|
header @wasm Content-Type application/wasm
|
|
try_files {path} /index.html
|
|
file_server
|
|
}
|
|
|
|
api.next.photoreport.pt {
|
|
# REST, signed file URLs and Socket.io (/v1/realtime, websockets pass through).
|
|
reverse_proxy pr-api:3000
|
|
request_body {
|
|
# Chunks of resumable uploads are 4 MB; single-request uploads up to 200 MB.
|
|
max_size 210MB
|
|
}
|
|
}
|
|
|
|
# Public sites: every brand domain goes to the same Next.js server; the API picks the skin by domain.
|
|
next.photoreport.pt, shootyourmove.next.photoreport.pt, events.next.photoreport.pt {
|
|
reverse_proxy pr-site:3100 {
|
|
header_up X-Forwarded-Host {host}
|
|
}
|
|
}
|
|
|
|
# An archive's own address ("arquivo.ligaportugal.pt", set in the app): any other host whose DNS points here.
|
|
# The site looks the host up and serves that archive at the root.
|
|
https:// {
|
|
tls {
|
|
on_demand
|
|
}
|
|
reverse_proxy pr-site:3100 {
|
|
header_up X-Forwarded-Host {host}
|
|
}
|
|
}
|