domaino/Caddyfile
Jakub Dorfman 702d99b9ed Added shop and checkout to the CMS
Checkout is done with stripe
Added reservation system
2026-07-29 18:18:23 +02:00

35 lines
817 B
Caddyfile

# Reverse proxy — single port for both the SvelteKit app and PocketBase
# Route: /api/basket, /api/checkout/*, /api/webhooks/* → SvelteKit app (commerce endpoints)
# /api/* and /_/* → PocketBase
# everything else → SvelteKit app
:8080 {
# SvelteKit commerce endpoints must reach the app, not PocketBase.
# These matchers are more specific than the generic /api/* handle below.
handle /api/basket {
reverse_proxy app:3000
}
handle /api/checkout/* {
reverse_proxy app:3000
}
handle /api/webhooks/* {
reverse_proxy app:3000
}
# PocketBase REST API (collections, records, files, health)
handle /api/* {
reverse_proxy pocketbase:80
}
# PocketBase admin UI
handle /_/* {
reverse_proxy pocketbase:80
}
# Public site + SSR pages
handle {
reverse_proxy app:3000
}
}