From 8d22a1e395b8ac1accc7df5d619a350c7d11074b Mon Sep 17 00:00:00 2001 From: milldr Date: Mon, 23 Sep 2024 10:14:58 -0400 Subject: [PATCH] Add CodeBlock and Makefile for Geodesic toolbox setup --- docs/layers/project/toolbox.mdx | 11 +++++++++-- docusaurus.config.js | 4 +--- examples/snippets/Makefile | 1 + plugins/custom-loaders/index.js | 2 +- plugins/dynamicRedirects/index.js | 4 ++-- 5 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 examples/snippets/Makefile diff --git a/docs/layers/project/toolbox.mdx b/docs/layers/project/toolbox.mdx index d1eff6e8a..70f742c22 100644 --- a/docs/layers/project/toolbox.mdx +++ b/docs/layers/project/toolbox.mdx @@ -8,7 +8,10 @@ import Intro from '@site/src/components/Intro'; import ActionCard from '@site/src/components/ActionCard'; import PrimaryCTA from '@site/src/components/PrimaryCTA'; import DismissibleDialog from '@site/src/components/DismissibleDialog'; +import CodeBlock from '@theme/CodeBlock'; +import CollapsibleText from '@site/src/components/CollapsibleText'; import PartialDockerfile from '@site/examples/snippets/components/docker/infra-acme/Dockerfile'; +import PartialMakefile from '@site/examples/snippets/Makefile'; import Note from '@site/src/components/Note'; @@ -34,12 +37,16 @@ Geodesic is a powerful Linux toolbox container designed to optimize DevOps workf ## Building the Toolbox Image -Build the Geodesic infrastructure container. This is a container that has all the tools for building the app. It's built from the `Dockerfile` using a `Makefile`. We customize this `Dockerfile` for your organization, but please see the following example for reference. +Build the Geodesic infrastructure container. This is a container that has all the tools for building the app. It's built from the `Dockerfile` using a `Makefile`. We customize both for your organization, but please see the following examples for reference. {PartialDockerfile} + + {PartialMakefile} + + The standard `Makefile` includes a number of commands. In order to build the initial, complete Geodesic image, run the following: ```bash @@ -50,7 +57,7 @@ On future builds, use `make run` to use the cached image. :::tip Alias -We install a wrapper script with `make all` to your chosen namespace in the `Makefile`. For example, simply enter for given namespace to start your Geodesic container once built: +We install a wrapper script with `make all` to your chosen namespace. For example, simply enter for given namespace to start your Geodesic container once built: ```bash acme diff --git a/docusaurus.config.js b/docusaurus.config.js index 898392f0c..969211a5a 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -77,9 +77,7 @@ async function createConfig() { disableInDev: false, } ], - [ - 'custom-loaders', {} - ], + path.resolve(__dirname, 'plugins/custom-loaders'), metadataPlugin, [ "posthog-docusaurus", diff --git a/examples/snippets/Makefile b/examples/snippets/Makefile new file mode 100644 index 000000000..be81ddb2c --- /dev/null +++ b/examples/snippets/Makefile @@ -0,0 +1 @@ +# placeholder until example is created diff --git a/plugins/custom-loaders/index.js b/plugins/custom-loaders/index.js index f24608f94..1240810f6 100644 --- a/plugins/custom-loaders/index.js +++ b/plugins/custom-loaders/index.js @@ -30,7 +30,7 @@ module.exports = function (context, options) { use: 'raw-loader', }, { - test: /^Dockerfile$/i, // Matches files named exactly 'Dockerfile' (case-insensitive) + test: /(?:Dockerfile|Makefile)$/i, use: 'raw-loader', }, ], diff --git a/plugins/dynamicRedirects/index.js b/plugins/dynamicRedirects/index.js index e70fb8ff2..35b01bb37 100644 --- a/plugins/dynamicRedirects/index.js +++ b/plugins/dynamicRedirects/index.js @@ -35,7 +35,7 @@ async function loadRedirects(allContent) { } }); - console.debug('Loaded redirects:', redirects); + // console.debug('Loaded redirects:', redirects); return redirects; } @@ -60,7 +60,7 @@ function redirectsPlugin(context, options) { redirects, }); - console.debug('Global data set with redirects.'); + // console.debug('Global data set with redirects.'); }, }; }