diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 7fece82..67b1d16 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -16,7 +16,7 @@ if (process.env.BASE_PATH) { export default defineConfig({ lang: "en-US", - title: "@mandrasch's DDEV Lab", + title: "mandrasch's DDEV Lab", description: "This site contains my experimental projects done with the awesome developer environment tool DDEV (Open Source). Authored by Matthias Andrasch.", lastUpdated: true, @@ -26,15 +26,15 @@ export default defineConfig({ head: [ [ - 'script', + "script", { - "defer": true, + defer: true, "data-domain": "my-ddev-lab.mandrasch.eu", - src:"https://plausible.coolify.mandrasch.dev/js/script.js" - } - ] + src: "https://plausible.coolify.mandrasch.dev/js/script.js", + }, + ], ], - + themeConfig: { editLink: { pattern: "https://github.com/mandrasch/my-ddev-lab/edit/main/docs/:path", @@ -129,6 +129,10 @@ function getGeneralSidebar() { text: "Vite", link: "/tutorials/nodejs-tools/vite", }, + { + text: "nginx Proxy for Headless CMS", + link: "/tutorials/nodejs-tools/nginx-proxy-headless-cms", + }, { text: "Other buildtools", link: "/tutorials/nodejs-tools/laravel-mix-browsersync", diff --git a/docs/tutorials/nodejs-tools/nginx-proxy-headless-cms.md b/docs/tutorials/nodejs-tools/nginx-proxy-headless-cms.md new file mode 100644 index 0000000..62c86d4 --- /dev/null +++ b/docs/tutorials/nodejs-tools/nginx-proxy-headless-cms.md @@ -0,0 +1,21 @@ +--- +head: + - - meta + - name: description + content: "" +--- + +# nginx Proxy for Headless CMS + +This is an awesome and clean way of using NodeJS and/or PHP in one project within DDEV! + +I'm not quite finished adapting this to work with PHP + NodeJS combined in DDEV, but as I heard some people do it this way already. + +The NodeJS project will be in a separate subfolder like `frontend/`, php in the main folder. The trick is the [custom nginx configuration for the NodeJS project](https://github.com/mandrasch/ddev-laravel-breeze-sveltekit/blob/main/.ddev/nginx_full/frontend.conf) + the [additional hostname in .ddev/config.yaml](https://github.com/mandrasch/ddev-laravel-breeze-sveltekit/blob/main/.ddev/config.yaml). + +- Classic PHP backend (Laravel) with NodeJS frontend (SvelteKit) https://github.com/mandrasch/ddev-laravel-breeze-sveltekit +- Two NodeJS projects within DDEV https://www.lullabot.com/articles/nodejs-development-ddev +- Another guide: Drupal + NextJS + https://www.velir.com/ideas/2024/05/13/how-to-run-headless-drupal-and-nextjs-on-ddev + +Thanks very much to Andy Blum for writing https://www.lullabot.com/articles/nodejs-development-ddev! diff --git a/docs/tutorials/nodejs-tools/vite.md b/docs/tutorials/nodejs-tools/vite.md index 47ad2d4..b7b512a 100644 --- a/docs/tutorials/nodejs-tools/vite.md +++ b/docs/tutorials/nodejs-tools/vite.md @@ -5,7 +5,7 @@ head: content: "" --- -# Vite +# Vite (in PHP CMS) NEW: I wrote a detailed guide here: https://ddev.com/blog/working-with-vite-in-ddev/