build(website): Dockerfile + production start script for Coolify
Make the marketing site deployable standalone from apps/website (the repo has no root package.json, so the build must run in this subdir — set Base Directory to apps/website in Coolify). - Add a multi-stage Dockerfile (pnpm build -> node .output/server/index.mjs, port 3000, NUXT_PUBLIC_SITE_URL default) + .dockerignore. - Add a "start" script for the Nixpacks path (Nuxt SSR has no default start). - Guard the bind-mount-only /shared-packages components dir with existsSync so standalone builds don't warn on the missing path (the site uses no shared component).
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
// the Docker app stack. Locally it runs behind Traefik at dezky.local /
|
||||
// www.dezky.local with the same mkcert TLS as the rest of the platform.
|
||||
|
||||
import { existsSync } from 'node:fs'
|
||||
|
||||
const siteUrl = process.env.NUXT_PUBLIC_SITE_URL
|
||||
|| (process.env.NODE_ENV === 'production' ? 'https://dezky.eu' : 'http://localhost:3000')
|
||||
|
||||
@@ -25,7 +27,12 @@ export default defineNuxtConfig({
|
||||
// CountrySelect.vue is just <CountrySelect>. Mirrors portal/operator.
|
||||
components: [
|
||||
'~/components',
|
||||
{ path: '/shared-packages/ui/components', pathPrefix: false },
|
||||
// The shared @dezky/ui dir is bind-mounted in the Docker dev stack; include
|
||||
// it only when present so standalone builds (e.g. Coolify) don't warn on
|
||||
// the missing absolute path. The marketing site uses no shared component.
|
||||
...(existsSync('/shared-packages/ui/components')
|
||||
? [{ path: '/shared-packages/ui/components', pathPrefix: false }]
|
||||
: []),
|
||||
],
|
||||
|
||||
app: {
|
||||
|
||||
Reference in New Issue
Block a user