···11+version: '3.7'
22+services:
33+ app:
44+ #volumes:
55+ # # Add local mounts here
66+ # - /home/myUser/homelab:/filesOnServer
+44
.devcontainer/compose.yml
···11+version: '3.7'
22+services:
33+ # Update this to the name of the service you want to work with in your docker-compose.yml file
44+ app:
55+ extends:
66+ file: compose.mounts.yml
77+ service: app
88+ # Uncomment if you want to override the service's Dockerfile to one in the .devcontainer
99+ # folder. Note that the path of the Dockerfile and context is relative to the *primary*
1010+ # docker-compose.yml file (the first in the devcontainer.json "dockerComposeFile"
1111+ # array). The sample below assumes your primary file is in the root of your project.
1212+ #
1313+ # build:
1414+ # context: .
1515+ # dockerfile: .devcontainer/Dockerfile
1616+1717+ image: mcr.microsoft.com/devcontainers/javascript-node:1-20-bookworm
1818+1919+ volumes:
2020+ # Update this to wherever you want VS Code to mount the folder of your project
2121+ - ..:/workspaces:cached
2222+ command: sleep infinity
2323+2424+ # Uncomment the next four lines if you will use a ptrace-based debugger like C++, Go, and Rust.
2525+ # cap_add:
2626+ # - SYS_PTRACE
2727+ # security_opt:
2828+ # - seccomp:unconfined
2929+3030+ # Overrides default command so things don't shut down after the process ends.
3131+ #command: sleep infinity
3232+ socket-proxy:
3333+ image: lscr.io/linuxserver/socket-proxy:latest
3434+ environment:
3535+ - CONTAINERS=1
3636+ - INFO=1
3737+ - POST=0
3838+ - PING=1
3939+ - VERSION=1
4040+ volumes:
4141+ - /var/run/docker.sock:/var/run/docker.sock:ro
4242+ read_only: true
4343+ tmpfs:
4444+ - /run
+7-1
.devcontainer/devcontainer.json
···33{
44 "name": "Node.js",
55 // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
66- "image": "mcr.microsoft.com/devcontainers/javascript-node:1-20-bookworm",
66+ "dockerComposeFile": [
77+ "compose.yml"
88+ ],
99+1010+ "service": "app",
1111+1212+ "workspaceFolder": "/workspaces",
713814 // Features to add to the dev container. More info: https://containers.dev/features.
915 // "features": {},
···88 NODE_ENV="production" \
99 IS_DOCKER=true \
1010 COLORED_STD=true \
1111- FILES_ON_SERVER_DIR=/filesOnServer
1111+ MOUNT_DIR=/filesOnServer
12121313FROM base as builder
1414
+7-12
compose.yaml
···22 komodo-import:
33 image: foxxmd/komodo-import:latest
44 volumes:
55- ## ParentDirectory:FILES_ON_SERVER_DIR
66- - ./myprojects:/filesOnServer
77-88- ## optional, TOML is saved to file here when OUTPUT_DIR env is present
99- #- ./output:/output
55+ ## Mount the parent directory where all subfolders are compose projects
66+ - /home/myUser/homelab:/filesOnServer
107 environment:
1111- - TZ=America/New_York
88+ ## Same as host directory mounted above
99+ - HOST_DIR=/home/myUser/homelab
1010+ ## where stacks are generated from. 'dir' or 'compose'
1111+ - STACKS_FROM=dir
1212 ## Komodo Server name to use for generated Stacks
1313 - SERVER_NAME=my-cool-server
1414- ## ParentDirectory on the host use as Stack Run Directory prefix
1515- - HOST_PARENT_PATH=/my/cool/path
16141715 ## optional
1818- #- FILES_ON_SERVER_DIR=/filesOnServer
1616+ #- TZ=America/New_York
1917 #- IMAGE_REGISTRY_PROVIDER=
2018 #- IMAGE_REGISTRY_ACCOUNT=
2119 #- AUTO_UPDATE=false
···2321 #- KOMODO_ENV_NAME=
2422 #- COMPOSE_FILE_GLOB=
2523 #- ENV_FILE_GLOB=
2626-2727- ## only saves to file if this ENV is present
2828- #- OUTPUT_DIR=/output
2924 restart: no
+15
docsite/docs/help.mdx
···11+---
22+title: 'Help and FAQ'
33+---
44+55+## Where To Start?
66+77+If you are overwhelmed by the docs or not sure where to begin you should try out the [**Quickstart** guide](../quickstart). It uses step-by-step questions with interactive fields/buttons to help customize Komodo Import for your machine.
88+99+## Further Help with Komodo Import
1010+1111+If the [**Quickstart** guide](../quickstart) and [Usage docs](../usage/overview) do not cover what you want to do with Komodo Import or you do not fully understand how to use it please search the repository's [Github Discussions](https://github.com/FoxxMD/komodo-import/discussions) and if your question is not answered then [open a New Discussion](https://github.com/FoxxMD/komodo-import/discussions/new/choose).
1212+1313+## Found a Bug or Error?
1414+1515+If Komodo Import is not behaving as you expect it to or is outputting errors that break functionality please search [Github Issues](https://github.com/FoxxMD/komodo-import/issues) and [open a New Issue](https://github.com/FoxxMD/komodo-import/issues/new) if you cannot find a solution to your problem.
+22-157
docsite/docs/installation/installation.mdx
···77import TabItem from '@theme/TabItem';
88import CodeBlock from '@theme/CodeBlock';
99import ComposeStack from '!!raw-loader!../../../compose.yaml';
1010+import ConsoleOutput from '../../src/components/QuickStartSnippets/consoleOutput.mdx'
1111+import TreeDirectory from '../../src/components/snippets/_directoryTree.mdx'
10121113## Docker
1214···45474648:::tip
47494848-See the [**Quick Start Guide**](../quickstart.mdx) for another guided docker-compose example
5050+Use the [**Quick Start Guide**](../quickstart.mdx) for an interactive setup!
49515052:::
5153···5456* You have [Komodo](https://komo.do/) already setup
5557* You have installed [Periphery](https://komo.do/docs/connect-servers) on a machine
5658 * The Komodo Server name for this machine is `my-cool-server`
5757- * The machine is currently using dockge and has all of its compose projects located at `/home/myUser/homelab` like...
5858- * `/home/myUser/homelab/immich`
5959- * `/home/myUser/homelab/plex`
6060- * etc...
5959+ * The machine is currently using dockge and its projects directory looks like this:
61606262-<Tabs groupId="runType" queryString>
6363- <TabItem value="docker" label="Docker">
6464- ```bash
6565- docker run --name komodo-import -e "SERVER_NAME=my-cool-server" -e "HOST_PARENT_PATH=/home/myUser/homelab" -v /home/myUser/homelab:/filesOnServer foxxmd/komodo-import
6666- ```
6767- </TabItem>
6868- <TabItem value="docker-compose" label="Docker Compose">
6969- See [`docker-compose.yml`](#docker) sample above for more options and annotations.
6161+<TreeDirectory/>
70627171- ```yaml title="docker-compose.yml"
7272- services:
7373- komodo-import:
7474- image: foxxmd/komodo-import:latest
7575- volumes:
7676- ## ParentDirectory:FILES_ON_SERVER_DIR
7777- - /home/myUser/homelab:/filesOnServer:ro
7878- environment:
7979- - TZ=America/New_York
8080- ## Komodo Server name to use for generated Stacks
8181- - SERVER_NAME=my-cool-server
8282- ## ParentDirectory on the host use as Stack Run Directory prefix
8383- - HOST_PARENT_PATH=/home/myUser/homelab
8484- restart: no
8585- ```
8686- ```shell
8787- docker compose up --no-log-prefix
8888- ```
8989- </TabItem>
9090-</Tabs>
9191-9292-<details>
9393-9494-<summary>Output</summary>
9595-9696-```shell
9797-[2025-08-11 14:06:19.080 -0400] INFO : [Init] Debug Mode: NO
9898-[2025-08-11 14:06:19.094 -0400] INFO : [App] Version: 0.1.0
9999-[2025-08-11 14:06:19.095 -0400] INFO : [App] Files On Server Dir ENV: /filesOnServer -> Resolved: /filesOnServer
100100-[2025-08-11 14:06:19.096 -0400] INFO : [App] [Files On Server] Processing Stacks for 6 folders:
101101-/filesOnServer/compose.yaml
102102-/filesOnServer/immich
103103-/filesOnServer/jellyfin
104104-/filesOnServer/octoprint
105105-/filesOnServer/plex
106106-/filesOnServer/uptime-kuma
107107-[2025-08-11 14:06:19.096 -0400] INFO : [App] [Files On Server] Compose File Glob: **/{compose,docker-compose}*.y?(a)ml
108108-[2025-08-11 14:06:19.097 -0400] INFO : [App] [Files On Server] Env Glob: **/.env
109109-[2025-08-11 14:06:19.097 -0400] INFO : [App] [Files On Server] [compose] Found Stack 'compose' at dir /filesOnServer/compose.yaml
110110-[2025-08-11 14:06:19.103 -0400] WARN : [App] [Files On Server] [compose] Did not find any files patterns matching compose glob
111111-[2025-08-11 14:06:19.103 -0400] INFO : [App] [Files On Server] [compose] Stack config complete
112112-[2025-08-11 14:06:19.104 -0400] INFO : [App] [Files On Server] [immich] Found Stack 'immich' at dir /filesOnServer/immich
113113-[2025-08-11 14:06:19.107 -0400] INFO : [App] [Files On Server] [immich] Found 1 files matching compose glob:
114114-docker/docker-compose.yaml
115115-[2025-08-11 14:06:19.107 -0400] INFO : [App] [Files On Server] [immich] Using file(s): docker/docker-compose.yaml
116116-[2025-08-11 14:06:19.108 -0400] INFO : [App] [Files On Server] [immich] Stack config complete
117117-[2025-08-11 14:06:19.108 -0400] INFO : [App] [Files On Server] [jellyfin] Found Stack 'jellyfin' at dir /filesOnServer/jellyfin
118118-[2025-08-11 14:06:19.109 -0400] INFO : [App] [Files On Server] [jellyfin] Found 3 files matching compose glob:
119119-compose.yaml
120120-docker-compose.yaml
121121-docker/docker-compose.yaml
122122-[2025-08-11 14:06:19.110 -0400] INFO : [App] [Files On Server] [jellyfin] Using file: compose.yaml but not writing to file_paths since this is the Komodo default
123123-[2025-08-11 14:06:19.111 -0400] INFO : [App] [Files On Server] [jellyfin] Found 1 env files matching pattern **/.env:
124124-.env
125125-[2025-08-11 14:06:19.111 -0400] INFO : [App] [Files On Server] [jellyfin] Using .komodoEnv for Komodo-written env file
126126-[2025-08-11 14:06:19.111 -0400] INFO : [App] [Files On Server] [jellyfin] Stack config complete
127127-[2025-08-11 14:06:19.111 -0400] INFO : [App] [Files On Server] [octoprint] Found Stack 'octoprint' at dir /filesOnServer/octoprint
128128-[2025-08-11 14:06:19.112 -0400] WARN : [App] [Files On Server] [octoprint] Did not find any files patterns matching compose glob
129129-[2025-08-11 14:06:19.112 -0400] INFO : [App] [Files On Server] [octoprint] Stack config complete
130130-[2025-08-11 14:06:19.113 -0400] INFO : [App] [Files On Server] [plex] Found Stack 'plex' at dir /filesOnServer/plex
131131-[2025-08-11 14:06:19.114 -0400] INFO : [App] [Files On Server] [plex] Found 1 files matching compose glob:
132132-compose.yaml
133133-[2025-08-11 14:06:19.114 -0400] INFO : [App] [Files On Server] [plex] Using file: compose.yaml but not writing to file_paths since this is the Komodo default
134134-[2025-08-11 14:06:19.115 -0400] INFO : [App] [Files On Server] [plex] Stack config complete
135135-[2025-08-11 14:06:19.115 -0400] INFO : [App] [Files On Server] [uptime-kuma] Found Stack 'uptime-kuma' at dir /filesOnServer/uptime-kuma
136136-[2025-08-11 14:06:19.116 -0400] INFO : [App] [Files On Server] [uptime-kuma] Found 1 files matching compose glob:
137137-compose.yaml
138138-[2025-08-11 14:06:19.116 -0400] INFO : [App] [Files On Server] [uptime-kuma] Using file: compose.yaml but not writing to file_paths since this is the Komodo default
139139-[2025-08-11 14:06:19.117 -0400] INFO : [App] [Files On Server] [uptime-kuma] Found 1 env files matching pattern **/.env:
140140-.env
141141-[2025-08-11 14:06:19.117 -0400] INFO : [App] [Files On Server] [uptime-kuma] Using .komodoEnv for Komodo-written env file
142142-[2025-08-11 14:06:19.117 -0400] INFO : [App] [Files On Server] [uptime-kuma] Stack config complete
143143-[2025-08-11 14:06:19.118 -0400] INFO : [App] [Files On Server] Built Stack configs for 6 folders
144144-[2025-08-11 14:06:19.119 -0400] INFO : [App] Copy the text between the scissors to use as the *Resource File* contents within your Resource Sync
145145-146146-✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️
147147-[[stack]]
148148-name = "compose"
149149-150150-[stack.config]
151151-server = "my-cool-server"
152152-run_directory = "/home/myUser/homelab/compose"
153153-files_on_host = true
154154-auto_update = false
155155-poll_for_updates = false
156156-157157-[[stack]]
158158-name = "immich"
159159-160160-[stack.config]
161161-server = "my-cool-server"
162162-run_directory = "/home/myUser/homelab/immich"
163163-files_on_host = true
164164-auto_update = false
165165-poll_for_updates = false
166166-file_paths = [ "docker/docker-compose.yaml" ]
167167-168168-[[stack]]
169169-name = "jellyfin"
170170-171171-[stack.config]
172172-server = "my-cool-server"
173173-run_directory = "/home/myUser/homelab/jellyfin"
174174-files_on_host = true
175175-auto_update = false
176176-poll_for_updates = false
177177-env_file_path = ".komodoEnv"
178178-additional_env_files = [ ".env" ]
179179-180180-[[stack]]
181181-name = "octoprint"
182182-183183-[stack.config]
184184-server = "my-cool-server"
185185-run_directory = "/home/myUser/homelab/octoprint"
186186-files_on_host = true
187187-auto_update = false
188188-poll_for_updates = false
189189-190190-[[stack]]
191191-name = "plex"
192192-193193-[stack.config]
194194-server = "my-cool-server"
195195-run_directory = "/home/myUser/homelab/plex"
196196-files_on_host = true
197197-auto_update = false
198198-poll_for_updates = false
199199-200200-[[stack]]
201201-name = "uptime-kuma"
202202-203203-[stack.config]
204204-server = "my-cool-server"
205205-run_directory = "/home/myUser/homelab/uptime-kuma"
206206-files_on_host = true
207207-auto_update = false
208208-poll_for_updates = false
209209-env_file_path = ".komodoEnv"
210210-additional_env_files = [ ".env" ]
211211-✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️
212212-[2025-08-11 14:06:19.119 -0400] INFO : [App] Done!
6363+```yaml title="docker-compose.yml"
6464+services:
6565+ komodo-import:
6666+ image: foxxmd/komodo-import:latest
6767+ volumes:
6868+ - /home/myUser/homelab:/filesOnServer:ro
6969+ environment:
7070+ - TZ=America/New_York
7171+ ## Komodo Server name to use for generated Stacks
7272+ - SERVER_NAME=my-cool-server
7373+ ## ParentDirectory on the host use as Stack Run Directory prefix
7474+ - HOST_DIR=/home/myUser/homelab
7575+ ## generate stacks from mounted directory subfolders
7676+ - STACKS_FROM=dir
7777+ restart: no
21378```
21479215215-</details>
8080+<ConsoleOutput/>
2168121782## Local Installation
21883···23297#### Usage Examples
2339823499```shell
235235-SERVER_NAME=my-server HOST_PARENT_PATH=/my/parent/folder node src/index.js
100100+SERVER_NAME=my-cool-server STACKS_FROM=dir MOUNT_DIR=/my/parent/folder node src/index.js
236101```
+23-150
docsite/docs/quickstart.mdx
···5566import Tabs from '@theme/Tabs';
77import TabItem from '@theme/TabItem';
88+import QuickstartCompose from "../src/components/QuickstartCompose";
8999-## Scenario
1010+## Prerequisites
10111112* You have Komodo already setup
1213* You have installed [Periphery](https://komo.do/docs/connect-servers) on a machine
1314 * The Komodo [Server](https://komo.do/docs/resources#server) name is `my-cool-server`
1414- * The machine is currently using dockge and has all of its compose projects located in one folder like this:
15151616-```
1717-.
1818-└── /home/myUser/homelab/
1919- ├── immich/
2020- │ └── compose.yaml
2121- ├── plex/
2222- │ └── docker-compose.yaml
2323- └── uptime-kuma/
2424- └── compose.yaml
2525-```
2626-2727-You want to import all of the existing compose projects into Komodo as [Files On Server](../usage/overview#files-on-server) [Stacks](https://komo.do/docs/resources#stack) attached to `my-cool-server`.
1616+## Create Your Scenario
28172929-:::tip
3030-3131-Using git repositories instead of plain folders? Check out the [Git Repo Stack docs](../usage/overview#git-repo)
3232-3333-:::
1818+**Follow the directions below, select your options, and fill in all fields to generate a customized Docker Compose file for your specific scenario.**
34193535-## Create Docker Compose File
2020+<QuickstartCompose/>
36213737-Use the [example `compose.yaml` file from the repository](https://github.com/FoxxMD/komodo-import/blob/main/compose.yaml) as a starting point.
2222+## Generate Stacks
38233939-* Bind `/home/myUser/homelab/` into the container at `/filesOnServer` so Komodo Import can scan the parent folder (this is the same for plain folder and git repo stack methods)
4040-* Define `HOST_PARENT_PATH=/home/myUser/homelab` so Komodo Import knows how to create Run Directory in a Komodo Stack correctly
2424+Run the customized `compose.yaml` from above with `docker compose` to generate Komodo Stacks from existing projects on your machine!
41254242-```yaml
4343-services:
4444- komodo-import:
4545- image: foxxmd/komodo-import:latest
4646- volumes:
4747- ## ParentDirectory:FILES_ON_SERVER_DIR
4848- - /home/myUser/homelab:/filesOnServer
4949-5050- ## optional, TOML is saved to file here when OUTPUT_DIR env is present
5151- #- ./output:/output
5252- environment:
5353- - TZ=America/New_York
5454- ## Komodo Server name to use for generated Stacks
5555- - SERVER_NAME=my-cool-server
5656- ## ParentDirectory on the host use as Stack Run Directory prefix
5757- - HOST_PARENT_PATH=/home/myUser/homelab
5858- restart: no
2626+```bash
2727+# in the same directory as compose.yaml...
2828+docker compose up --no-log-prefix
5929```
60306161-## Choose Desired Output
3131+How the Stacks will be generated is determined by what you chose in **Step 4**. Refer to the expandable **Examples** in that step.
62326363-<Tabs groupId="output" queryString>
6464-<TabItem value="console" label="Console">
6565- This [Output](../usage/overview#outputs) renders the Sync Resource TOML to docker logs. Run komodo-import with `--no-log-prefix` to get the generated TOML output for a Sync Resource.
3333+## Next Steps
66346767- ```shell
6868- docker compose up --no-log-prefix
6969- ```
7070- ```
7171- [2025-08-11 14:06:19.080 -0400] INFO : [Init] Debug Mode: NO
7272-[2025-08-11 14:06:19.094 -0400] INFO : [App] Version: 0.1.0
7373-[2025-08-11 14:06:19.095 -0400] INFO : [App] Files On Server Dir ENV: /filesOnServer -> Resolved: /filesOnServer
7474-[2025-08-11 14:06:19.096 -0400] INFO : [App] [Files On Server] Processing Stacks for 2 folders:
7575-/filesOnServer/immich
7676-/filesOnServer/plex
7777-/filesOnServer/uptime-kuma
7878-[2025-08-11 14:06:19.096 -0400] INFO : [App] [Files On Server] Compose File Glob: **/{compose,docker-compose}*.y?(a)ml
7979-[2025-08-11 14:06:19.097 -0400] INFO : [App] [Files On Server] Env Glob: **/.env
8080-[2025-08-11 14:06:19.097 -0400] INFO : [App] [Files On Server] [compose] Found Stack 'compose' at dir /filesOnServer/compose.yaml
8181-[2025-08-11 14:06:19.103 -0400] WARN : [App] [Files On Server] [compose] Did not find any files patterns matching compose glob
8282-[2025-08-11 14:06:19.103 -0400] INFO : [App] [Files On Server] [compose] Stack config complete
3535+There are many more options (environmental variables) that can be used to customize how Stacks are generated, all found in [Usage](../usage/overview#stacks) docs. Some customizations that might interest you:
83368484-...
8585-8686-[2025-08-11 14:06:19.118 -0400] INFO : [App] [Files On Server] Built Stack configs for 3 folders
8787-[2025-08-11 14:06:19.119 -0400] INFO : [App] Copy the text between the scissors to use as the *Resource File* contents within your Resource Sync
3737+* [Common Stack options](../usage/overview#stack-configuration)
3838+ * Set image registry provider/account
3939+ * Set defaults for polling for new images (`POLL_FOR_UPDATE`) and auto updating (`AUTO_UPDATE`)
4040+ * Set what compose files (`COMPOSE_FILE_GLOB`) and .env files (`ENV_FILE_GLOB`) to include, per Stack
4141+* For **Directory** generated stacks...
4242+ * Include (`FOLDER_GLOB`) or exclude (`FOLDER_IGNORE_GLOB`) folders based on patterns
4343+* Configure Komodo Import to use the [Komodo API](../usage/overview#komodo-api) for better integration
4444+ * Uses existing Linked Repos for Git Based Stacks
4545+ * Automatically configures Git Based Stacks to use existing, private Git Provider if git URL domains match
88468989-✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️
9090-9191-[[stack]]
9292-name = "immich"
9393-9494-[stack.config]
9595-server = "my-cool-server"
9696-run_directory = "/home/myUser/homelab/immich"
9797-files_on_host = true
9898-auto_update = false
9999-poll_for_updates = false
100100-file_paths = [ "docker/docker-compose.yaml" ]
101101-102102-[[stack]]
103103-name = "plex"
104104-105105-[stack.config]
106106-server = "my-cool-server"
107107-run_directory = "/home/myUser/homelab/plex"
108108-files_on_host = true
109109-auto_update = false
110110-poll_for_updates = false
111111-112112-[[stack]]
113113-name = "uptime-kuma"
114114-115115-[stack.config]
116116-server = "my-cool-server"
117117-run_directory = "/home/myUser/homelab/uptime-kuma"
118118-files_on_host = true
119119-auto_update = false
120120-poll_for_updates = false
121121-env_file_path = ".komodoEnv"
122122-additional_env_files = [ ".env" ]
123123-✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️
124124-[2025-08-11 14:06:19.119 -0400] INFO : [App] Done!
125125-```
126126-127127-Now, [manually create a Sync Resource](../usage/resourceSync#create-sync-resource) and Execute to import your projects.
128128-129129-Or, use [Sync Api](./?output=sync-api#choose-desired-output) output instead to directly write the Sync Resource to Komodo.
130130-</TabItem>
131131-<TabItem value="sync-api" label="Sync API">
132132-133133-This [Output](../usage/overview#outputs) writes the Sync Resource directly to your Komodo instance (but does not execute it!)
134134-135135-Create an [API Key and Secret](../usage/overview#api-sync) in Komodo, then add it to your Komodo Import `compose.yaml`:
136136-137137-```yaml
138138-services:
139139- komodo-import:
140140- image: foxxmd/komodo-import:latest
141141- volumes:
142142- ## ParentDirectory:FILES_ON_SERVER_DIR
143143- - /home/myUser/homelab:/filesOnServer
144144-145145- ## optional, TOML is saved to file here when OUTPUT_DIR env is present
146146- #- ./output:/output
147147- environment:
148148- - TZ=America/New_York
149149- ## Komodo Server name to use for generated Stacks
150150- - SERVER_NAME=my-cool-server
151151- ## ParentDirectory on the host use as Stack Run Directory prefix
152152- - HOST_PARENT_PATH=/home/myUser/homelab
153153-154154- - KOMODO_URL=http://192.168.0.101:9120
155155- - API_KEY=K-3A6btIPZYeBuD5ebSa9uD5ebuD5ebHIjYxT5sc
156156- - API_SECRET=S-qnaXD1frutYlfC2ZYlfCSzqiYlfC1WYlfCVR34Yj4
157157- restart: no
158158-```
159159-160160-Run komodo-import to create the Sync Resource
161161-162162-```shell
163163-$ docker compose up --no-log-prefix
164164-...
165165-[2025-08-11 17:46:54.030 -0400] INFO : [App] [Sync API] Using 'komodo-import' as Sync Name
166166-[2025-08-11 17:46:54.032 -0400] VERBOSE: [App] [Sync API] KOMODO_URL: http://192.168.0.101:9120 | Normalized: http://192.168.0.101:9120/
167167-[2025-08-11 17:46:54.411 -0400] INFO : [App] [Sync API] Resource Sync created.
168168-[2025-08-11 17:46:54.411 -0400] INFO : [App] [Sync API] Resource Sync URL: http://192.168.0.101:9120/resource-syncs/689a41a04ed1b642f3053f57
169169-```
170170-171171-Then continue to [verifying the Sync Resource](../usage/resourceSync#verify-sync-changes) in Komodo and Executing it to import your projects.
172172-173173-</TabItem>
174174-</Tabs>4747+Additionally, review the [Sync Resource](../usage/resourceSync) guide to learn how to use them for creating Stacks in Komodo.
+254-164
docsite/docs/usage/overview.mdx
···88import CodeBlock from '@theme/CodeBlock';
99import AIOExample from "../../src/components/AIOExample";
1010import FileExample from "../../src/components/FileExample";
1111+import TreeDirectory from '../../src/components/snippets/_directoryTree.mdx'
1212+import TreeCompose from '../../src/components/snippets/_composeTree.mdx'
1313+import ComposeExample from '../../src/components/snippets/_composeExample.mdx'
11141215## Key Concepts
1316···3437These are where and how KI puts the Resources created from [Inputs](#inputs):
35383639* Log to output (docker logs, node console)
3737-* Log to file
3840* Export to Komodo API (create Resource Sync, etc.)
39414042## Inputs
···43454446KI can create Komodo [Stack](https://komo.do/docs/resources#stack) Resources from existing resources on your machine.
45474646-##### Common Stack Configuration
4848+It will automatically detect what type of Stack to create based on the presence of git folders/data:
4949+5050+* Komodo **Files On Server** Stack => compose project/folder without a `.git` folder
5151+* Komodo **Git Repo** Stacks => compose project/folder with a `.git` folder or with a parent folder containing a `.git` folder
5252+5353+#### Stack Sources
5454+5555+KI can generate Stacks from existing projects on your machine using one of two methods:
5656+5757+<Tabs groupId="stacksFrom" queryString>
5858+ <TabItem value="dir" label="Directory">
5959+ For **Directory** (`STACKS_FROM=dir`), Komodo Import will try to generate Stacks from each immediate **subfolder** inside the directory mounted into the container.
6060+6161+6262+ <details>
6363+6464+ <summary>Example</summary>
6565+6666+ <TreeDirectory/>
6767+6868+ Using `STACKS_FROM=dir` with [host directory](#host-directory) `/home/myUser/homelab` would produce Stacks for `immich` `plex` and `uptime-kuma`.
6969+7070+ </details>
7171+7272+ </TabItem>
7373+ <TabItem value="compose" label="Compose Projects">
7474+ For **Compose Projects** (`STACKS_FROM=compose`), Komodo Import will try to generate Stacks from existing projects on your machine that were created with `docker compose up`.
7575+7676+ <details>
7777+7878+ <summary>Example</summary>
47794848-These environmental variables are applicable to all Stack types below.
8080+ <ComposeExample/>
49815050-<details>
8282+ * Using `STACKS_FROM=dir` with [host directory](#host-directory) `/home/myUser` would produce Stacks for `immich` `plex` and `project1`.
8383+ * It **would not** generate a Stack for `owncloud` since it was not created with `docker compose up` yet.
8484+8585+ </details>
8686+8787+ To use **Compose Projects** you must give Komodo Import access to Docker. This can be done by mounting `docker.sock` into the container or connecting it to a proxy service like [docker-socket-proxy](https://github.com/Tecnativa/docker-socket-proxy).
8888+8989+ <details>
9090+9191+ <summary>Using `socket-proxy` (recommended)</summary>
9292+9393+ Add a socket-proxy service to your compose file and set the env `DOCKER_HOST` so Komodo Import knows how to connect to Docker:
9494+9595+ ```yaml title="compose.yaml"
9696+ services:
9797+ komodo-import:
9898+ # ...
9999+ environment:
100100+ # ...
101101+ # add to existing environment
102102+ - DOCKER_HOST=tcp://socket-proxy:2375
103103+ socket-proxy:
104104+ image: lscr.io/linuxserver/socket-proxy:latest
105105+ environment:
106106+ - CONTAINERS=1
107107+ - INFO=1
108108+ - POST=0
109109+ - PING=1
110110+ - VERSION=1
111111+ volumes:
112112+ - /var/run/docker.sock:/var/run/docker.sock:ro
113113+ read_only: true
114114+ tmpfs:
115115+ - /run
116116+ ```
117117+ </details>
511185252-<summary>Environmental Variables</summary>
119119+ <details>
531205454-| ENV | Required | Default | Description |
5555-| :------------------------ | :------- | -------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------- |
5656-| `SERVER_NAME` | ☑️ | | The name of the Komodo [Server](https://komo.do/docs/resources#server) where a Stack is located |
5757-| `HOST_PARENT_PATH` | ☑️ | | The parent directory on the **host** where stack folders are located. |
5858-| `WRITE_ENV` | - | `false` | Write the contents of found .env files to Komodo **Environment**. Likely want this as `true`. |
5959-| `FOLDER_GLOB` | - | `*` | The [glob](https://github.com/isaacs/node-glob?tab=readme-ov-file#glob-primer) pattern to use for finding folders in the top-level folder given to Komodo Import |
6060-| `FOLDER_IGNORE_GLOB` | - | | The [glob](https://github.com/isaacs/node-glob?tab=readme-ov-file#glob-primer) pattern to use to ignore folders in the top-level folder given to Komodo Import |
6161-| `COMPOSE_FILE_GLOB` | - | `**/{compose,docker-compose}*.y?(a)ml` | The [glob](https://github.com/isaacs/node-glob?tab=readme-ov-file#glob-primer) pattern to use for finding files for **Files Paths** in Stack config |
6262-| `ENV_FILE_GLOB` | - | `**/.env` | The [glob](https://github.com/isaacs/node-glob?tab=readme-ov-file#glob-primer) pattern to use for finding files for **Additional Env Files** in Stack config |
6363-| `KOMODO_ENV_NAME` | - | `.komodoenv` | If existing .env files are found, and `WRITE_ENV=false`, then this name will be used for the .env that Komodo writes using its own Environment section |
6464-| `IMAGE_REGISTRY_PROVIDER` | - | | Name of Image Registry to use |
6565-| `IMAGE_REGISTRY_ACCOUNT` | - | | Image Registry account to use |
6666-| `POLL_FOR_UPDATE` | - | | Poll for newer images? |
6767-| `AUTO_UPDATE` | - | | Auto Update stack? |
121121+ <summary>Mounting `docker.sock`</summary>
681226969-</details>
123123+ Mount `/var/run/docker.sock` as a volume into the container:
701247171-#### Files On Server
125125+ ```yaml title="compose.yaml"
126126+ services:
127127+ komodo-import:
128128+ # ...
129129+ volumes:
130130+ # ...
131131+ # add to existing volumes
132132+ - /var/run/docker.sock:/var/run/docker.sock:ro
133133+ ```
134134+ </details>
135135+ </TabItem>
136136+</Tabs>
721377373-Use existing, non git-based [Docker Compose projects](https://docs.docker.com/compose/how-tos/project-name/) (`compose.yaml`) as **Files On Server** mode Komodo Stacks.
138138+#### Host Directory
741397575-KI will generate multiple Stacks from all folders within the given folder. This is similar to how [dockge](https://github.com/louislam/dockge) works.
140140+The directory on the **Host** machine that should be mounted into the Komodo Import container depends on which [Stack Source](#stack-sources) you are using.
761417777-<details>
142142+* The host directory should be mounted to `/filesOnServer` in the container.
143143+* **The host directory should also be set for `HOST_DIR` env.**
781447979-<summary>Example</summary>
145145+<Tabs groupId="stacksFrom" queryString>
146146+ <TabItem value="dir" label="Directory">
147147+ For **Directory** (`STACKS_FROM=dir`) use the **parent folder** containing all of the immediate **subfolders** that should be generated as Stacks.
801488181-If your folder structure looks like this
149149+ <details>
821508383-```
8484-.
8585-└── /home/myUser/homelab/
8686- ├── immich/
8787- │ └── compose.yaml
8888- ├── plex/
8989- │ └── docker-compose.yaml
9090- └── uptime-kuma/
9191- └── compose.yaml
9292-```
151151+ <summary>Example</summary>
931529494-and you use `/home/myUser/homelab/` with KI then it will output stacks for
153153+ <TreeDirectory/>
951549696-* **immich** with Run Directory `/home/myUser/homelab/immich`
9797-* **plex** with Run Directory `/home/myUser/homelab/plex`
9898-* **uptime-kuma** with Run Directory `/home/myUser/homelab/uptime-kuma`
155155+ Directory should be `home/myUser/homelab`:
99156100100-</details>
157157+ ```yaml title="compose.yaml"
158158+ services:
159159+ komodo-import:
160160+ # ...
161161+ volumes:
162162+ - /home/myUser/homelab:/filesOnServer
163163+ environment:
164164+ - HOST_DIR=/home/myUser/homelab
165165+ ```
166166+ </details>
101167102102-###### Project Files Detection {#project-file-detection}
168168+ </TabItem>
169169+ <TabItem value="compose" label="Compose Projects">
170170+ For **Compose Projects** (`STACKS_FROM=compose`) use the closest **parent folder** that contains all discovered compose project Config Files (`docker compose ls`).
103171104104-Komodo Import makes some reasonable assumptions about which `compose.yaml` and `.env` files you want to use within each project's folder. These can be overriden using the `*_GLOB` environmental varibales from the [Configuration](#fos-config) below.
172172+ <details>
105173106106-<details>
174174+ <summary>Example</summary>
107175108108-<summary>File Detection and Behavior Details</summary>
176176+ <TreeCompose/>
109177110110-* Compose Files
111111- * Default pattern
112112- * Looks for `compose.y(a)ml` and `docker-compose.y(a)ml`
113113- * Files may have interim names like `compose.dev.yaml`
114114- * Can be overridden with `COMPOSE_FILE_GLOB` env
115115- * Will prioritize `compose.yaml` over `docker-compose.yaml`
116116- * Will choose the file with the shortest path EX
117117- * Prioritizes `./compose.yaml` over `./aFolder/compose.yaml`
118118-* .env Files
119119- * Default pattern
120120- * Adds all `.env` files found at top-level or sub-folders
121121- * Can be overridden with `ENV_FILE_GLOB` env
122122- * If a `.env` file is found then configures Komodo to write it's own Environment section to `.komodoenv` instead of `.env`
123123- * Komodo env name can be overridden with `KOMODO_ENV_NAME`
178178+ Directory should be `/home/myUser` because projects are found under both `localDev` and `homeLab`:
124179125125-Komodo Import will **log** which files it detects and indicate which ones it will use for each project. These can be manually modified in the generated TOML, [API Sync Resource](#api-sync), or after creating the Stack in Komodo.
180180+ ```yaml itle="compose.yaml"
181181+ services:
182182+ komodo-import:
183183+ # ...
184184+ volumes:
185185+ - /home/myUser:/filesOnServer
186186+ environment:
187187+ - HOST_DIR=/home/myUser
188188+ ```
189189+ </details>
190190+ </TabItem>
191191+</Tabs>
126192127127-</details>
193193+#### Stack Configuration
128194129129-##### Configuration {#fos-config}
195195+The configuration and behaviors below are applicable to all Stacks:
130196131197<details>
132198133199<summary>Environmental Variables</summary>
134200135135-Use the [**Common Stack Configuration environmental variables**](#common-stack-configuration)
201201+| ENV | Required | Default | Description |
202202+| :------------------------ | :------- | -------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------- |
203203+| `SERVER_NAME` | ☑️ | | The name of the Komodo [Server](https://komo.do/docs/resources#server) where a Stack is located |
204204+| `STACKS_FROM` | ☑️ | `dir` | What [**Stack Sources**](#stack-sources) to generate Stacks from? `dir` or `compose` |
205205+| `HOST_DIR` | ☑️ | | The parent directory on the **host** that mounted into the Komodo Import container |
206206+| `WRITE_ENV` | - | `true` | Write the contents of found .env files to Komodo **Environment**. Likely want this as `true`. |
207207+| `COMPOSE_FILE_GLOB` | - | `**/{compose,docker-compose}*.y?(a)ml` | The [glob](https://github.com/isaacs/node-glob?tab=readme-ov-file#glob-primer) pattern to use for finding files for **Files Paths** in Stack config |
208208+| `ENV_FILE_GLOB` | - | `**/.env` | The [glob](https://github.com/isaacs/node-glob?tab=readme-ov-file#glob-primer) pattern to use for finding files for **Additional Env Files** in Stack config |
209209+| `KOMODO_ENV_NAME` | - | `.komodoenv` | If existing .env files are found, and `WRITE_ENV=false`, then this name will be used for the .env that Komodo writes using its own Environment section |
210210+| `IMAGE_REGISTRY_PROVIDER` | - | | Name of Image Registry to use |
211211+| `IMAGE_REGISTRY_ACCOUNT` | - | | Image Registry account to use |
212212+| `POLL_FOR_UPDATE` | - | | Poll for newer images? |
213213+| `AUTO_UPDATE` | - | | Auto Update stack? |
136214137215</details>
138216139139-For [docker](../../installation#docker) usage the folder with your projects should be mounted to `/filesOnServer` in the container.
217217+<details markdown="1">
140218141141-#### Git Repo
219219+<summary>Compose File Detection</summary>
142220143143-Use existing, **git repository** folders containing [Docker Compose projects](https://docs.docker.com/compose/how-tos/project-name/) (`compose.yaml`) as **Git Repo** mode Komodo Stacks.
221221+* Default pattern
222222+ * Looks for `compose.y(a)ml` and `docker-compose.y(a)ml`
223223+ * Files may have interim names like `compose.dev.yaml`
224224+ * Can be overridden with `COMPOSE_FILE_GLOB` env for non-compose project stack sources
225225+* Will prioritize `compose.yaml` over `docker-compose.yaml`
226226+* Will choose the file with the shortest path EX
227227+ * Prioritizes `./compose.yaml` over `./aFolder/compose.yaml`
144228145145-KI will generate multiple Stacks from all folders within the given folder. Each folder detected as a git repository will have all required fields in a Git Repo Komodo Stack configured based on information from the local repository.
229229+Komodo Import will **log** which files it detects and indicate which ones it will use for each project.
230230+231231+:::note
232232+233233+When using [Compose Projects Stack Source](./?stacksFrom=compose#stack-sources) compose files are automatically parsed from the running projects.
234234+235235+:::
236236+237237+</details>
238238+239239+<details>
240240+241241+<summary>`.env` File Detection</summary>
242242+243243+* Default pattern
244244+ * Adds all `.env` files found at top-level or sub-folders
245245+ * Can be overridden with `ENV_FILE_GLOB` env
246246+* If a `.env` file is found and `WRITE_ENV=false` then a Stack is configured to write it's own Environment section to `.komodoenv` instead of `.env`
247247+ * Komodo env name can be overridden with `KOMODO_ENV_NAME`
248248+249249+Komodo Import will **log** which files it detects and indicate which ones it will use for each project.
250250+251251+</details>
252252+253253+254254+There is additional configuration available depending on the [Stack Source](#stack-sources):
255255+256256+<Tabs groupId="stacksFrom" queryString>
257257+ <TabItem value="dir" label="Directory">
258258+259259+ * The `_GLOB` patterns are for matching folder names within the parent folder, not full directory paths
260260+ * The default pattern matches all folder names except those starting with a `.`
261261+262262+| ENV | Required | Default | Description |
263263+| :------------------- | :------- | ------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------- |
264264+| `FOLDER_GLOB` | - | `*` | The [glob](https://github.com/isaacs/node-glob?tab=readme-ov-file#glob-primer) pattern to use for finding folders in the top-level folder given to Komodo Import |
265265+| `FOLDER_IGNORE_GLOB` | - | | The [glob](https://github.com/isaacs/node-glob?tab=readme-ov-file#glob-primer) pattern to use to ignore folders in the top-level folder given to Komodo Import |
266266+267267+ </TabItem>
268268+ <TabItem value="compose" label="Compose Projects">
269269+270270+ * The `_GLOB` patterns are for matching **full directory paths**, not just a single folder name
271271+ * The default pattern matches all directories except those that have any folder starting with a `.`
272272+ * Komodo Import will **always** ignore projects created by Komodo itself (projects found in `/etc/komodo` or `/home/USER/komodo`)
273273+274274+| ENV | Required | Default | Description |
275275+| :------------------------- | :------- | ------- | :---------------------------------------------------------------------------------------------------------------------------------------------------- |
276276+| `COMPOSE_FILE_GLOB` | - | `**/**` | The [glob](https://github.com/isaacs/node-glob?tab=readme-ov-file#glob-primer) pattern to use for matching a project's **full directory** on the host |
277277+| `COMPOSE_FILE_IGNORE_GLOB` | - | | The [glob](https://github.com/isaacs/node-glob?tab=readme-ov-file#glob-primer) pattern to use to ignore a project's **full directory** on the host |
278278+279279+ </TabItem>
280280+</Tabs>
281281+282282+#### Git Repo Stacks
283283+284284+If a parsed folder (or parent of it) contains a `.git` folder and it has a valid tracked branch + remote, then it will generate a **Git Repo Stack**.
146285147286<details>
148287149149-<summary>How Repository Parsing Works</summary>
288288+<summary>How Git Repository Parsing Works</summary>
150289151290* A folder is only built as a Git Repo stack if...
152152- * It contains a valid `.git` folder
291291+ * It contains a valid `.git` folder or a parent folder contains a `.git` folder
153292 * The git repo has a valid remote
154293 * The current checked out local branch is tracking a remote branch
155155- * If any of the above are not true then the folder is instead parsed as a [Files On Server](#files-on-server) Stack
156156-* Additionally, if [**Komodo API is configured**](#komodo-api) then...
157157- * If Komodo has a [Repo](https://komo.do/docs/resources#repo) Resource that matches the remote, then the Git Repo Stack uses a Linked Repo
158158- * If Komodo has a Git Provider matching the remote URL domain then that is used, along with the Git Provider user (private git is automatically detected)
294294+ * If any of the above are not true then the folder is instead parsed as a Files On Server Stack
159295160296</details>
161297···182318 └── compose.yaml
183319```
184320185185-You run Komodo Import with the `homelab` directory:
186186-187187-`docker run ... -e "HOST_PARENT_PATH=/home/myUser/homelab" -v /home/myUser/homelab:/filesOnServer foxxmd/komodo-import`
188188-189321* **immich** is created as a Git Repo Stack with
190322 * Git Provider: `git.mydomain.com`
191323 * Repo: `myUser/immich`
···196328 * Run Directory: `/home/myUser/homelab/uptime-kuma`
197329</details>
198330199199-###### Monorepos
331331+Additionally, if [**Komodo API is configured**](#komodo-api) then...
200332201201-Komodo Import can also handle **monorepos.** Mount the top-level repository folder to the usual `/filesOnServer` location and it will automatically treat sub-folders as Git Repo Stacks using the top-level repository.
333333+* If Komodo has a [Repo](https://komo.do/docs/resources#repo) Resource that matches the remote, then the Git Repo Stack uses a Linked Repo
334334+* If Komodo has a Git Provider matching the remote URL domain then that is used, along with the Git Provider user (private git is automatically detected)
202335203203-<details>
336336+###### Monorepos
204337205205-<summary>Example</summary>
338338+Komodo Import also handles **monorepos** IE one git repository with many folders containing projects. The only requirement to ensure this works is that the git repo "root" directory must be [mounted into Komodo Import.](#host-directory)
206339207207-You have a repository at `https://git.mydomain.com/myUser/homelab` and each folder in the repo is a different stack.
340340+<Tabs groupId="stacksFrom" queryString>
341341+ <TabItem value="dir" label="Directory">
208342209209-Your folder structure (on the host machine) looks like this:
343343+ For [**Directory** Stack Source](./?stacksFrom=dir#stack-sources) use the root git repository directory as the [host directory](#host-directory).
210344211211-```
212212-/home/myUser/homelab
213213-├── .git
214214-├── immich
215215-│ └── compose.yaml
216216-├── plex
217217-│ └── docker-compose.yaml
218218-└── uptime-kuma
219219- └── compose.yaml
220220-```
345345+ <details>
221346222222-You run Komodo Import with the `homelab` directory:
347347+ <summary>Example</summary>
223348224224-`docker run ... -v /home/myUser/homelab:/filesOnServer foxxmd/komodo-import`
225225-226226-* **immich** is created as a Git Repo Stack with
227227- * Git Provider: `git.mydomain.com`
228228- * Repo: `myUser/homelab`
229229- * Run Directory: `immich`
230230-* **plex** is created as a Git Repo Stack with
231231- * Git Provider: `git.mydomain.com`
232232- * Repo: `myUser/homelab`
233233- * Run Directory: `plex`
234234-* **uptime-kuma** is created as a Files On Server Stack
235235- * Git Provider: `git.mydomain.com`
236236- * Repo: `myUser/homelab`
237237- * Run Directory: `uptime-kuma`
238238-239239-</details>
240240-241241-<details>
242242-243243-<summary>Nested Monorepo</summary>
244244-245245-If your stack folders are not the immediate sub-folders in your repository then specify the _relative directory from git root_ as `GIT_STACKS_DIR` to specify what parent folder to use:
349349+ ```
350350+ /home/myUser/homelab
351351+ ├── .git
352352+ ├── immich
353353+ │ └── compose.yaml
354354+ ├── plex
355355+ │ └── docker-compose.yaml
356356+ └── uptime-kuma
357357+ └── compose.yaml
358358+ ```
246359247247-```
248248-/home/myUser/homelab
249249-├── .git
250250-├── myStacks
251251-│ ├── immich
252252-│ │ └── compose.yaml
253253-│ ├── plex
254254-│ │ └── docker-compose.yaml
255255-│ └── uptime-kuma
256256-│ └── compose.yaml
257257-└── somethingElse
258258-```
360360+ Use `/home/myUser/homelab` as the [host directory](#host-directory) because it contains `.git` folder.
259361260260-Use `GIT_STACKS_DIR=myStacks` with the above example.
362362+ </details>
261363262262-</details>
364364+ If the directory containing your projects is not the root directory then use the ENV `SCAN_DIR` to set the path to use for projects _relative_ to the [host directory](#host-directory):
263365264264-#### Configuration
366366+ <details>
265367368368+ <summary>Example</summary>
266369267267-<details>
370370+ ```
371371+ /home/myUser/homelab
372372+ ├── .git
373373+ ├── myStacks <---- parent folder containing projects
374374+ │ ├── immich
375375+ │ │ └── compose.yaml
376376+ │ ├── plex
377377+ │ │ └── docker-compose.yaml
378378+ │ └── uptime-kuma
379379+ │ └── compose.yaml
380380+ └── somethingElse
381381+ ```
268382269269-<summary>Environmental Variables</summary>
383383+ * Use `/home/myUser/homelab` as the [host directory](#host-directory) because it contains `.git` folder
384384+ * Use `SCAN_DIR=myStacks` -- the folder Komodo Import will parse projects from, _relative_ to the host directory `/home/myUser/homelab`
385385+ </details>
270386271271-Combine with [**Common Stack Configuration environmental variables**](#common-stack-configuration)
387387+ </TabItem>
388388+ <TabItem value="compose" label="Compose Projects">
272389273273-| ENV | Required | Default | Description |
274274-| :--------------- | :------- | ------- | :---------------------------------------------------------------------------- |
275275-| `GIT_STACKS_DIR` | - | | Set sub-folder to use for stacks when generating from a [monorepo](#monorepo) |
390390+ Komodo Import will automatically determine if a project is in a monorepo by scanning all parent directories for `.git` folder. Just make sure the mounted [host directory](#host-directory) contains the monorepo folder at some level.
276391277277-</details>
392392+ </TabItem>
393393+</Tabs>
278394279395## Outputs
280396···336452| `SYNC_NAME` | - | komodo-import | Name of Sync to create/modify |
337453338454</details>
339339-340340-### File
341341-342342-Komodo Import will attempt to write the generated output to a `.toml` file if the ENV `OUTPUT_DIR` is present. This should be the *directory* (not file) that the generated file should be written to.
343343-344344-Bind mount a folder into the container and set `OUTPUT_DIR` like in the example below:
345345-346346-<details>
347347-348348-<summary>File Output Example</summary>
349349-350350-```yaml
351351-services:
352352- komodo-import:
353353- # ...
354354- environment:
355355- # ...
356356- - OUTPUT_DIR=/output
357357- volumes:
358358- # ...
359359- - /my/host/folder:/output
360360-```
361361-362362-</details>
363363-364364-Use this with [manually creating Sync Resources](../resourceSync#create-sync-resource)
365455366456## Komodo API
367457
+2-2
docsite/docs/usage/resourceSync.mdx
···1818Komodo Import gives you the TOML representation of Resources not yet in Komodo. You can use this to bulk "create" Resources that connect to your existing compose projects, container, etc, by **Executing** a Sync Resource created with Komodo Import.
19192020:::tip
2121-**If you are copy-pasting [console Output](../overview#console) or [file Output](../overview#file)** then proceed to [Create Sync Resource](#create-sync-resource) to **manually** create a Sync Resource from the TOML Komodo Import generated for you.
2121+**If you are copy-pasting [console Output](../overview#console)** then proceed to [**Create Sync Resource**](#create-sync-resource) to manually create a Sync Resource from the TOML Komodo Import generated for you.
2222:::
23232424:::tip
2525-**If you used [API Output](../overview#api-sync)** then find the Sync Resource KI made for you and skip to [Verify Sync Changes](#verify-sync-changes).
2525+**If you used [API Output](../overview#api-sync)** then find the Sync Resource KI made for you and skip to [**Verify Sync Changes**](#verify-sync-changes).
2626:::
27272828### Create Sync Resource
+30-1
docsite/docusaurus.config.ts
···8787 'docusaurus-theme-github-codeblock'
8888 ],
8989 plugins: [
9090+9191+ // Custom plugin to modify Webpack config
9292+ function myPlugin(context, options) {
9393+ return {
9494+ name: 'custom-webpack-plugin',
9595+ configureWebpack(config, isServer, utils, content) {
9696+ return {
9797+ module: {
9898+ rules: [
9999+ {
100100+ resourceQuery: /raw/,
101101+ type: "asset/source",
102102+ },
103103+ ],
104104+ },
105105+ };
106106+ },
107107+ };
108108+ },
109109+ [
110110+ '@docusaurus/plugin-ideal-image',
111111+ {
112112+ quality: 70,
113113+ max: 1030, // max resized image's size.
114114+ min: 640, // min resized image's size. if original is lower, use that size.
115115+ steps: 2, // the max number of images generated between min and max (inclusive)
116116+ disableInDev: false,
117117+ },
118118+ ],
90119 ],
91120 themeConfig:
92121 {
···152181 prism: {
153182 theme: themes.themes.github,
154183 darkTheme: themes.themes.dracula,
155155- additionalLanguages: ['json','json5','typescript', 'docker', 'bash', 'ini']
184184+ additionalLanguages: ['json','json5','typescript', 'docker', 'bash', 'ini','yaml']
156185 },
157186 colorMode: {
158187 defaultMode: 'dark',
···11+import React, { ReactNode, CSSProperties } from 'react';
22+import clsx from 'clsx';
33+import Link from '@docusaurus/Link';
44+55+// Define the Button type to control the props that can be passed to the Button component.
66+export type ButtonProps = {
77+ // The size prop can be one of the following values: 'sm', 'lg', 'small', 'medium', 'large', or null.
88+ // We'll convert 'small' to 'sm' and 'large' to 'lg' in the component. 'medium' will be considered null.
99+ size?: 'sm' | 'lg' | 'small' | 'medium' | 'large' | null;
1010+ // The outline prop is a boolean that determines if the button should be an outline button.
1111+ outline?: boolean;
1212+ // The variant prop is a string that determines the color of the button.
1313+ // It can be one of the following values: 'primary', 'secondary', 'danger', 'warning', 'success', 'info', 'link', or any other string.
1414+ // The default value is 'primary'.
1515+ variant: 'primary' | 'secondary' | 'danger' | 'warning' | 'success' | 'info' | 'link' | string;
1616+ // The block prop is a boolean that determines if the button should be a block-level button.
1717+ block?: boolean;
1818+ // The disabled prop is a boolean that determines if the button should be disabled.
1919+ disabled?: boolean;
2020+ // The className prop is a string that allows you to add custom classes to the button.
2121+ className?: string;
2222+ // The style prop is an object that allows you to add custom styles to the button.
2323+ style?: CSSProperties;
2424+ // The link prop is a string that determines the URL the button should link to.
2525+ link: string;
2626+ // The label prop is a string that determines the text of the button.
2727+ label: string;
2828+ onClick?: () => any
2929+}
3030+3131+// Button component that accepts the specified props.
3232+export default function Button ({
3333+ size = null,
3434+ outline = false,
3535+ variant = 'primary',
3636+ block = false,
3737+ disabled = false,
3838+ className,
3939+ style = {},
4040+ link,
4141+ label,
4242+ onClick = () => null
4343+}: ButtonProps) {
4444+ // Map the size prop values to corresponding CSS classes.
4545+ const sizeMap = {
4646+ sm: 'sm',
4747+ small: 'sm',
4848+ lg: 'lg',
4949+ large: 'lg',
5050+ medium: null,
5151+ };
5252+ const buttonSize = size ? sizeMap[size] : '';
5353+ const sizeClass = buttonSize ? `button--${buttonSize}` : '';
5454+ const outlineClass = outline ? 'button--outline' : '';
5555+ const variantClass = variant ? `button--${variant}` : '';
5656+ const blockClass = block ? 'button--block' : '';
5757+ const disabledClass = disabled ? 'disabled' : '';
5858+ // If the button is disabled, set the destination to null.
5959+ const destination = disabled ? null : link;
6060+ return (
6161+ <Link to={destination}>
6262+ <button
6363+ className={clsx(
6464+ 'button',
6565+ sizeClass,
6666+ outlineClass,
6767+ variantClass,
6868+ blockClass,
6969+ disabledClass,
7070+ className
7171+ )}
7272+ style={style}
7373+ role='button'
7474+ aria-disabled={disabled}
7575+ onClick={(e) => {
7676+ e.preventDefault();
7777+ onClick()
7878+ }}
7979+ >
8080+ {label}
8181+ </button>
8282+ </Link>
8383+ );
8484+}
+82
docsite/src/components/ButtonGroup.tsx
···11+import React, { ReactNode, CSSProperties } from 'react';
22+import clsx from 'clsx';
33+import Link from '@docusaurus/Link';
44+import Button, { ButtonProps } from './Button';
55+66+const leftButton = {
77+ borderRadius: 'var(--ifm-button-border-radius) 0 0 var(--ifm-button-border-radius)'
88+}
99+1010+const rightButton = {
1111+ borderRadius: '0 var(--ifm-button-border-radius) var(--ifm-button-border-radius) 0'
1212+}
1313+1414+const middleButton = {
1515+ borderRadius: '0'
1616+}
1717+1818+// Define the Button type to control the props that can be passed to the Button component.
1919+type ButtonGroup = {
2020+ options: [string, string][]
2121+ value?: string
2222+ defaultValue?: string
2323+ // The size prop can be one of the following values: 'sm', 'lg', 'small', 'medium', 'large', or null.
2424+ // We'll convert 'small' to 'sm' and 'large' to 'lg' in the component. 'medium' will be considered null.
2525+ size?: 'sm' | 'lg' | 'small' | 'medium' | 'large' | null;
2626+2727+ variant: 'primary' | 'secondary' | 'danger' | 'warning' | 'success' | 'info' | 'link' | string;
2828+ // The block prop is a boolean that determines if the button should be a block-level button.
2929+ block?: boolean;
3030+ // The disabled prop is a boolean that determines if the button should be disabled.
3131+ disabled?: boolean;
3232+ // The className prop is a string that allows you to add custom classes to the button.
3333+ className?: string;
3434+ // The style prop is an object that allows you to add custom styles to the button.
3535+ style?: CSSProperties;
3636+ onChange?: (val: string) => any
3737+}
3838+3939+// Button component that accepts the specified props.
4040+export default function ButtonGroup ({
4141+ size = null,
4242+ variant = 'primary',
4343+ block = false,
4444+ disabled = false,
4545+ className,
4646+ style,
4747+ options,
4848+ value,
4949+ defaultValue,
5050+ onChange = () => null
5151+}: ButtonGroup) {
5252+5353+ if(options === undefined || options.length === 0) {
5454+ return null;
5555+ }
5656+5757+ const buttons = options.map((opt, index) => {
5858+ const props: ButtonProps = {
5959+ style: middleButton,
6060+ outline: true,
6161+ size,
6262+ variant,
6363+ label: opt[1],
6464+ link: '#',
6565+ onClick: () => onChange(opt[0])
6666+ };
6767+ if(index === 0) {
6868+ props.style = leftButton;
6969+ } else if(index === options.length - 1) {
7070+ props.style = rightButton;
7171+ }
7272+7373+ if((value ?? defaultValue) === opt[0]) {
7474+ props.outline = false;
7575+ }
7676+7777+ return <Button key={index} {...props}/>
7878+7979+ });
8080+8181+ return <span>{buttons}</span>;
8282+}
···11+import Image from '@theme/IdealImage';
22+import syncExample from './sync-resource-file.png'
33+44+<details>
55+66+<summary>Komodo Example</summary>
77+88+```shell
99+docker compose up --no-log-prefix
1010+```
1111+```
1212+INFO : [Init] Debug Mode: NO
1313+INFO : [App] Version: 0.1.0
1414+INFO : [App] Files On Server Dir ENV: /filesOnServer -> Resolved: /filesOnServer
1515+INFO : [App] [Files On Server] Processing Stacks for 2 folders:
1616+/filesOnServer/immich
1717+/filesOnServer/plex
1818+/filesOnServer/uptime-kuma
1919+INFO : [App] [Files On Server] Compose File Glob: **/{compose,docker-compose}*.y?(a)ml
2020+INFO : [App] [Files On Server] Env Glob: **/.env
2121+INFO : [App] [Files On Server] [compose] Found Stack 'compose' at dir /filesOnServer/compose.yaml
2222+WARN : [App] [Files On Server] [compose] Did not find any files patterns matching compose glob
2323+INFO : [App] [Files On Server] [compose] Stack config complete
2424+2525+...
2626+2727+INFO : [App] [Files On Server] Built Stack configs for 3 folders
2828+INFO : [App] Copy the text between the scissors to use as the *Resource File* contents within your Resource Sync
2929+3030+...
3131+3232+INFO : [App] [Sync API] Using 'komodo-import' as Sync Name
3333+VERBOSE: [App] [Sync API] KOMODO_URL: http://192.168.0.101:9120 | Normalized: http://192.168.0.101:9120/
3434+INFO : [App] [Sync API] Resource Sync created.
3535+INFO : [App] [Sync API] Resource Sync URL: http://192.168.0.101:9120/resource-syncs/689a41a04ed1b642f3053f57
3636+```
3737+3838+The [Sync Resource](../usage/resourceSync#verify-sync-changes) is automatically created for you (but not executed!)
3939+4040+<Image img={syncExample}/>
4141+</details>
···20202121* Generate Resources from...
2222 * [x] Stack
2323- * [x] [Files On Server](./docs/usage/overview#files-on-server) Stacks from plain folders
2424- * [x] [Git-based](./docs/usage/overview#git-repo) Stacks from folders containing git repository
2323+ * [x] [Files On Server](./docs/usage/overview#stacks) Stacks from plain folders
2424+ * [x] [Git-based](./docs/usage/overview#git-repo-stacks) Stacks from folders containing git repository
2525+* [x] Use running [Docker Compose projects](./docs/usage/overview?stacksFrom=compose#stack-sources) or a [specific directory](./docs/usage/overview?stacksFrom=dir#stack-sources) of compose projects
2526* Generate To...
2627 * [x] TOML
2728 * [x] in [Docker Logs](./docs/usage/overview#console)
2828- * [x] in [File](./docs/usage/overview#file)
2929 * [x] Import directly with Komodo API
3030 * [x] [Create/modify Resource Sync](./docs/usage/overview#api-sync)
3131 * [ ] Create/modify Stacks
+7-7
example/compose.yaml
···11services:
22 komodo-import:
33- image: foxxmd/komodo-import:edge
33+ image: foxxmd/komodo-import:latest
44 volumes:
55- ## ParentDirectory:FILES_ON_SERVER_DIR
55+ ## The top-level folder compose projects on the host live in
66 - .:/filesOnServer
7788- ## optional, TOML is saved to file here
99- #- ./config:/config
108 environment:
1111- - TZ=America/New_York
99+ ## Same path as the host folder mounted above
1010+ - HOST_DIR=/my/cool/path
1211 ## Komodo Server name to use for generated Stacks
1312 - SERVER_NAME=my-cool-server
1414- ## ParentDirectory on the host use as Stack Run Directory prefix
1515- - HOST_PARENT_PATH=/my/cool/path
1313+1414+ - TZ=America/New_York
1515+1616 restart: no