build(deploy): migrate from Vercel to Coolify with @astrojs/node + Nixpacks

Swap @astrojs/vercel adapter for @astrojs/node standalone (Vercel adapter
emits serverless functions; Coolify runs a long-lived Node container).
Add web/nixpacks.toml with explicit install/build/start phases.
Fix web/pnpm-workspace.yaml: scaffolded without the packages field, which
broke pnpm install on any environment that validates workspaces strictly
(this was the root cause of the original Coolify build error).
This commit is contained in:
2026-07-29 15:41:26 +02:00
parent 70a556f0de
commit b5af81f9ef
5 changed files with 209 additions and 424 deletions
+2 -2
View File
@@ -2,7 +2,7 @@
import { defineConfig } from 'astro/config';
import tailwindcss from '@tailwindcss/vite';
import sitemap from '@astrojs/sitemap';
import vercel from '@astrojs/vercel';
import node from '@astrojs/node';
// Vite plugin inline: añade Content-Type correcto para .pmtiles y .geojson
// en dev server. Sin esto, Astro/Vite sirve .pmtiles con Content-Type vacío
@@ -31,7 +31,7 @@ function assetMimePlugin() {
export default defineConfig({
site: 'https://casestancades.vercel.app',
output: 'server',
adapter: vercel(),
adapter: node({ mode: 'standalone' }),
integrations: [sitemap()],
vite: {
plugins: [assetMimePlugin(), tailwindcss()],
+11
View File
@@ -0,0 +1,11 @@
[phases.setup]
nixPkgs = ["nodejs_22", "pnpm"]
[phases.install]
cmds = ["pnpm install --frozen-lockfile"]
[phases.build]
cmds = ["pnpm run build"]
[start]
cmd = "node ./dist/server/entry.mjs"
+1 -1
View File
@@ -12,8 +12,8 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/node": "11.0.3",
"@astrojs/sitemap": "^3.7.3",
"@astrojs/vercel": "^11.0.3",
"astro": "^7.0.9",
"maplibre-gl": "^5.24.0",
"pmtiles": "^4.4.1"
+192 -421
View File
File diff suppressed because it is too large Load Diff
+3
View File
@@ -1,3 +1,6 @@
packages:
- '.'
allowBuilds:
esbuild: true
sharp: true