chore: configure Dokploy Railpack deployment
Railpack's Node provider builds this Astro project as a static site with zero
config (bun install -> bun run build -> Caddy serving dist), verified with
`railpack plan`:
- railpack.json pins provider=node explicitly, since the repo has both a
package.json and a public/ dir, and sets TZ=UTC
- Staticfile sets root=dist and index_fallback=false. Railpack's default SPA
fallback appends /index.html to try_files, which answers unknown URLs with the
homepage and HTTP 200; disabling it yields a real 404 for this multi-page site
- src/pages/404.astro gives the static build a dist/404.html to serve
- build script now runs `astro check && astro build`, so a type error fails the
deploy instead of shipping
Dokploy side: build type Railpack, container port 80 (the generated Caddyfile
listens on {$PORT:80}), and GET /health returns 200 for healthchecks.
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
|||||||
|
# Read by Railpack (Dokploy "Railpack" build type) to configure the Caddy server
|
||||||
|
# that serves the Astro static build produced by `bun run build`.
|
||||||
|
# Docs: https://railpack.com/languages/staticfile/
|
||||||
|
|
||||||
|
# Directory Caddy serves (Astro's build output).
|
||||||
|
root: dist
|
||||||
|
|
||||||
|
# This is a multi-page site: /, /add and /edit are real files on disk.
|
||||||
|
# index_fallback: true (Railpack's default) would answer unknown URLs with
|
||||||
|
# index.html and a 200 (soft 404). Disabling it makes unmatched paths return a
|
||||||
|
# real 404, served from Astro's generated dist/404.html.
|
||||||
|
index_fallback: false
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://schema.railpack.com",
|
||||||
|
"provider": "node",
|
||||||
|
"deploy": {
|
||||||
|
"variables": {
|
||||||
|
"TZ": "UTC"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user