feat: add Docker image, production server and health check
- Multi-stage Dockerfile on node:24-slim, non-root, healthcheck, /app/data volume - server.mjs wraps the Astro handler with brotli/gzip compression, security headers and graceful SIGTERM shutdown (npm start) - GET /api/health/ reports server and view-counter DB status - Move build-only packages to devDependencies (smaller runtime image) - docker-compose.yml as an alternative for Dokploy Compose Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+14
-11
@@ -3,7 +3,7 @@
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"engines": {
|
||||
"node": ">=22.22.0"
|
||||
"node": ">=24"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "astro dev",
|
||||
@@ -16,29 +16,31 @@
|
||||
"astro": "astro",
|
||||
"icons": "node scripts/generate-icons.mjs",
|
||||
"check:site": "node scripts/check-site.mjs",
|
||||
"fonts": "node scripts/subset-fonts.mjs"
|
||||
"fonts": "node scripts/subset-fonts.mjs",
|
||||
"start": "node server.mjs"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/markdown-satteri": "^0.4.4",
|
||||
"@astrojs/mdx": "^8.1.0",
|
||||
"@astrojs/node": "^11.1.8",
|
||||
"@astrojs/rss": "^4.0.19",
|
||||
"@astrojs/sitemap": "^3.7.4",
|
||||
"@iconify-json/tabler": "^1.2.42",
|
||||
"@tailwindcss/vite": "^4.3.3",
|
||||
"astro": "^7.4.0",
|
||||
"astro-icon": "^1.2.0",
|
||||
"leaflet": "^1.9.4",
|
||||
"tailwindcss": "^4.3.3"
|
||||
"compression": "^1.8.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@astrojs/check": "^0.9.10",
|
||||
"@astrojs/markdown-satteri": "^0.4.4",
|
||||
"@astrojs/mdx": "^8.1.0",
|
||||
"@astrojs/rss": "^4.0.19",
|
||||
"@astrojs/sitemap": "^3.7.4",
|
||||
"@fontsource-variable/inter": "^5.3.0",
|
||||
"@fontsource-variable/rubik": "^5.3.0",
|
||||
"@fontsource/inter": "^5.3.0",
|
||||
"@fontsource/rubik": "^5.3.0",
|
||||
"@iconify-json/tabler": "^1.2.42",
|
||||
"@tailwindcss/typography": "^0.5.20",
|
||||
"@tailwindcss/vite": "^4.3.3",
|
||||
"@types/compression": "^1.8.1",
|
||||
"@types/leaflet": "^1.9.22",
|
||||
"astro-icon": "^1.2.0",
|
||||
"leaflet": "^1.9.4",
|
||||
"pagefind": "^1.5.2",
|
||||
"prettier": "^3.9.10",
|
||||
"prettier-plugin-astro": "^1.1.1",
|
||||
@@ -46,6 +48,7 @@
|
||||
"satori": "^0.60.0",
|
||||
"sharp": "^0.35.5",
|
||||
"subset-font": "^2.9.0",
|
||||
"tailwindcss": "^4.3.3",
|
||||
"typescript": "^6.0.3"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user