From 72b7111519bad40831cdb25c268b311953365f28 Mon Sep 17 00:00:00 2001 From: Bas Meeuwissen Date: Fri, 20 Dec 2024 16:53:24 +0100 Subject: [PATCH] #564: updated docs --- documentation/docs/.vitepress/config.ts | 1 + documentation/docs/deploy/environments.md | 4 +-- documentation/docs/deploy/resources.md | 34 +++++++++++++++++++++++ documentation/docs/deploy/segmentation.md | 4 +-- 4 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 documentation/docs/deploy/resources.md diff --git a/documentation/docs/.vitepress/config.ts b/documentation/docs/.vitepress/config.ts index f0350b2a..b834173f 100644 --- a/documentation/docs/.vitepress/config.ts +++ b/documentation/docs/.vitepress/config.ts @@ -52,6 +52,7 @@ export default defineConfig({ text: 'DEPLOY', items: [ { text: 'Segmentation', link: '/deploy/segmentation' }, + { text: 'Resources', link: '/deploy/resources' }, { text: 'Environments', link: '/deploy/environments' }, { text: 'Load balancing', link: '/deploy/load-balancing' }, { text: 'Health checks', link: '/deploy/health-checks' }, diff --git a/documentation/docs/deploy/environments.md b/documentation/docs/deploy/environments.md index a82ac2e5..cf8025d5 100644 --- a/documentation/docs/deploy/environments.md +++ b/documentation/docs/deploy/environments.md @@ -2,8 +2,8 @@ layout: doc prev: - text: Segmentation - link: /deploy/segmentation + text: Resources + link: /deploy/resources next: text: Load balancing diff --git a/documentation/docs/deploy/resources.md b/documentation/docs/deploy/resources.md new file mode 100644 index 00000000..e43fc8c8 --- /dev/null +++ b/documentation/docs/deploy/resources.md @@ -0,0 +1,34 @@ +--- +layout: doc + +prev: + text: Segmentation + link: /deploy/segmentation + +next: + text: Environments + link: /deploy/environments + +--- + +# Resources + +Unsegmented files are not shared between different segments. This is a powerful feature that allows you to create isolated segments that can be deployed independently. To enable different segments to share state, i.e. a database connection, Jitar uses a resource system. + +## Resource files + +Jitar will search for resource files in the project directory. The resource files are named `*.resource.json`. Each file defines the `module` that should be used as a resource. It's not possible to define a specific function or class from a module as a resource. + +The file has the following structure. + +```json +// app.resource.json +[ + "./integrations/authentication/module", + "./integrations/database/module", + "./integrations/filestore/module", + "./integrations/notification/module" +] +``` + +It's possible to define multiple resource files within a project. This is useful in a monorepo setup where different modules might be managed by different teams. \ No newline at end of file diff --git a/documentation/docs/deploy/segmentation.md b/documentation/docs/deploy/segmentation.md index c1a25b53..aa1d3d83 100644 --- a/documentation/docs/deploy/segmentation.md +++ b/documentation/docs/deploy/segmentation.md @@ -6,8 +6,8 @@ prev: link: /develop/debugging next: - text: Environments - link: /deploy/environments + text: Resources + link: /deploy/resources ---