Skip to content

Commit

Permalink
Add CodeBlock and Makefile for Geodesic toolbox setup
Browse files Browse the repository at this point in the history
  • Loading branch information
milldr committed Sep 23, 2024
1 parent 78d0cfd commit 8d22a1e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
11 changes: 9 additions & 2 deletions docs/layers/project/toolbox.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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';

<Intro>
Expand All @@ -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.

<CollapsibleText type="medium">
<CodeBlock title="Dockerfile">{PartialDockerfile}</CodeBlock>
</CollapsibleText>

<CollapsibleText type="medium">
<CodeBlock title="Makefile">{PartialMakefile}</CodeBlock>
</CollapsibleText>

The standard `Makefile` includes a number of commands. In order to build the initial, complete Geodesic image, run the following:

```bash
Expand All @@ -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
Expand Down
4 changes: 1 addition & 3 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ async function createConfig() {
disableInDev: false,
}
],
[
'custom-loaders', {}
],
path.resolve(__dirname, 'plugins/custom-loaders'),
metadataPlugin,
[
"posthog-docusaurus",
Expand Down
1 change: 1 addition & 0 deletions examples/snippets/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# placeholder until example is created
2 changes: 1 addition & 1 deletion plugins/custom-loaders/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
],
Expand Down
4 changes: 2 additions & 2 deletions plugins/dynamicRedirects/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async function loadRedirects(allContent) {
}
});

console.debug('Loaded redirects:', redirects);
// console.debug('Loaded redirects:', redirects);
return redirects;
}

Expand All @@ -60,7 +60,7 @@ function redirectsPlugin(context, options) {
redirects,
});

console.debug('Global data set with redirects.');
// console.debug('Global data set with redirects.');
},
};
}
Expand Down

0 comments on commit 8d22a1e

Please sign in to comment.