From ee0335345d5a962f83af0e3e5d21672bc1582ec7 Mon Sep 17 00:00:00 2001 From: Adrian Bonpin Date: Wed, 16 Sep 2026 19:00:18 +0800 Subject: [PATCH] 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. --- Staticfile | 12 ++++++++++++ railpack.json | 9 +++++++++ 2 files changed, 21 insertions(+) create mode 100644 Staticfile create mode 100644 railpack.json diff --git a/Staticfile b/Staticfile new file mode 100644 index 0000000..2edd922 --- /dev/null +++ b/Staticfile @@ -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 diff --git a/railpack.json b/railpack.json new file mode 100644 index 0000000..b9a6be2 --- /dev/null +++ b/railpack.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://schema.railpack.com", + "provider": "node", + "deploy": { + "variables": { + "TZ": "UTC" + } + } +}