Skip to content

Commit cb28dcd

Browse files
committed
docs: Update readme to use docs site
1 parent 0450649 commit cb28dcd

File tree

1 file changed

+13
-291
lines changed

1 file changed

+13
-291
lines changed

README.md

Lines changed: 13 additions & 291 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,7 @@ Generate TOML [Sync Resources](https://komo.do/docs/sync-resources) for [Komodo]
88

99
**🚧 VERY alpha development!**
1010

11-
- [Overview](#overview)
12-
- [Usage](#usage)
13-
- [Generate "Files On Server" Stacks](#generate-files-on-server-stacks)
14-
- [File Pattern Behavior](#file-pattern-behavior)
15-
- [Using Sync Resources](#using-sync-resources)
16-
- [Generate TOML](#generate-toml)
17-
- [Create Sync Resource](#create-sync-resource)
18-
- [Verify Sync Changes](#verify-sync-changes)
19-
- [Execute Sync](#execute-sync)
20-
- [Remove Sync (Optional)](#remove-sync-optional)
21-
- [Example/Demo](#exampledemo)
22-
- [Writing Generated TOML to File](#writing-generated-toml-to-file)
11+
Generate TOML [Sync Resources](https://komo.do/docs/sync-resources) for [Komodo](https://komo.do) from your existing Docker Compose projects. The missing import tool for onboarding Komodo!
2312

2413
## Overview
2514

@@ -28,296 +17,29 @@ Komodo Import is a small docker container that takes some user-provided configur
2817
Current functionality:
2918

3019
* [x] Generate TOML
31-
* [x] To Docker Logs
32-
* [x] To File
20+
* [x] [To Docker Logs](https://foxxmd.github.io/komodo-import/docs/usage/overview#console)
21+
* [x] [To File](https://foxxmd.github.io/komodo-import/docs/usage/overview#file)
3322
* [x] Generate Toml For...
3423
* [x] Stack
35-
* [x] "Files On Server" Stack types
24+
* [x] ["Files On Server"](https://foxxmd.github.io/komodo-import/docs/usage/overview#files-on-server) Stack types
3625
* [ ] Git Repo
3726
* [x] Import directly with Komodo API
38-
* [x] Create/modify Resource Sync
27+
* [x] [Create/modify Resource Sync](https://foxxmd.github.io/komodo-import/docs/usage/overview#api-sync)
3928
* [ ] Create/modify Stacks
4029
* [ ] Create/modify Deployments
41-
42-
## Usage
43-
44-
Use the example [`compose.yaml`](./compose.yaml) stack to configure and run Komodo Import. **All configuration is done using Environmental Variables.**
45-
46-
Refer to the below "Generate ..." sections to see how to configure Komodo Import to genrate specific types of Stacks.
47-
48-
**See the [Example Demo](#exampledemo) for a concrete example of configuring and using Komodo Import.**
49-
50-
### Generate "Files On Server" Stacks
51-
52-
If you are using plain, non git-based folders containing `*compose.yaml` style docker compose projects this is the import you want to use. AKA migrating from [dockge](https://github.com/louislam/dockge).
53-
54-
<details>
55-
56-
<summary>Configuration</summary>
57-
58-
59-
60-
| ENV | Required | Default | Description |
61-
| :------------------------ | ------------ | ------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------- |
62-
| `SERVER_NAME` | ☑️ | | The name of the Komodo [Server](https://komo.do/docs/resources#server) where a Stack is located |
63-
| `HOST_PARENT_PATH` | ☑️ | | The parent directory on the **host** where stack folders are located. Used for generating Stack Run Directory |
64-
| `COMPOSE_FILE_GLOB` | - | | A [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 |
65-
| `ENV_FILE_GLOB` | - | | A [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 |
66-
| `KOMODO_ENV_NAME` | `.komodoenv` | | If existing .env files are found then this name will be used for the .env that Komodo writes using its own Environment section |
67-
| `IMAGE_REGISTRY_PROVIDER` | - | | Name of Image Registry to use |
68-
| `IMAGE_REGISTRY_ACCOUNT` | - | | Image Registry account to use |
69-
| `POLL_FOR_UPDATE` | - | false | Poll for newer images? |
70-
| `AUTO_UPDATE` | - | false | Auto Update stack? |
71-
| `KOMODO_URL` | - | | Komodo Server URL for use with creating/modifying Resource Sync directly |
72-
| `API_KEY` | - | | Komodo API Key |
73-
| `API_SECRET` | - | | Komodo API Secret |
74-
| `EXISTING_SYNC` | - | append | Behavior if Resource Sync already exists. One of `append` or `overwrite` |
75-
| `SYNC_NAME` | - | komodo-import | Name of Sync to create/modify |
76-
77-
78-
</details>
79-
80-
### File Pattern Behavior
81-
82-
Komodo Import looks for necessary config files by searching the top-level project folder and all of its sub-folders.
83-
84-
* Compose Files
85-
* Default pattern
86-
* Looks for `compose.y(a)ml` and `docker-compose.y(a)ml`
87-
* Files may have interim names like `compose.dev.yaml`
88-
* Can be overridden with `COMPOSE_FILE_GLOB` env
89-
* Will prioritize `compose.yaml` over `docker-compose.yaml`
90-
* Will choose the file with the shortest path EX
91-
* Prioritizes `./compose.yaml` over `./aFolder/compose.yaml`
92-
* .env Files
93-
* Default pattern
94-
* Adds all `.env` files found at top-level or sub-folders
95-
* Can be overridden with `ENV_FILE_GLOB` env
96-
* If a `.env` file is found then configures Komodo to write it's own Environment section to `.komodoenv` instead of `.env`
97-
* Komodo env name can be overridden with `KOMODO_ENV_NAME`
98-
99-
## Using Sync Resources
100-
101-
To use the TOML generated by this tool you will need to create a [Sync Resource](https://komo.do/docs/sync-resources), then use that to **Execute a Sync** which will create the Stack/Resources/etc in Komodo.
102-
103-
Follow the steps below:
104-
105-
### Generate TOML
106-
107-
Generate TOML with Komodo Import.
108-
109-
### Create Sync Resource
110-
111-
* In your Komodo dashboard navigiate to **Syncs** -> **New Resource Sync**
112-
* Create a Sync with whatever name you want
113-
* In the Sync details page **Choose Mode** -> **UI Defined**
114-
* ⚠️ Disable **Delete Unmatched Resources** ⚠️
115-
* If this is **not** disabled you may delete all other Resources in Komodo! Double check this!
116-
* Add the Komodo Import TOML to **Resoure Files** section
117-
* **Save**
118-
119-
### Verify Sync Changes
120-
121-
Your Sync should now be in a **Pending** state (check the top header). If it's not click the **Refresh** button to update.
122-
123-
Switching to the **Pending** tab now shows all of the actions Komodo will take to make it **match what is in the generated TOML.** This should generally *only* be "Update Stack" or "Create Stack" actions.
124-
125-
Verify that all of the actions are what you desire. If something is missing it can be updated by modifying the contents in **Resoure Files** in the **Config** tab.
126-
127-
### Execute Sync
12830

129-
Click the **Execute Sync** button to perform **all** the actions under **Pending**. Alternatively, use the **Execute Change** button next to each individual Action.
31+
## Quick Start
13032

131-
### Remove Sync (Optional)
33+
[See the **Quick Start Guide**](https://foxxmd.github.io/komodo-import/docs/quickstart)
13234

133-
After Syncing is done you can safely **Delete** the Sync you created for use with Komodo Import.
35+
## Installation
13436

135-
You may now want to create a proper [bi-directional, git-backed Sync](https://blog.foxxmd.dev/posts/migrating-to-komodo/#resource-sync) so your entire Komodo configuration is backed up and restorable.
37+
[See the **Installation** documentation](https://foxxmd.github.io/komodo-import/docs/installation)
13638

137-
## Example/Demo
138-
139-
<details>
140-
141-
* You have Komodo already setup
142-
* You have installed [Periphery](https://komo.do/docs/connect-servers) on a machine
143-
* The Komodo Server name is `my-cool-server`
144-
* The machine is currently using dockge and has all of its compose projects located at `/home/myUser/homelab` like...
145-
* `/home/myUser/homelab/immich`
146-
* `/home/myUser/homelab/plex`
147-
* etc...
148-
149-
Using the [example `compose.yaml`](./compose.yaml) you modify it to fill in the required configuration:
150-
151-
```yaml
152-
services:
153-
komodo-import:
154-
image: foxxmd/komodo-import:latest
155-
volumes:
156-
## ParentDirectory:FILES_ON_SERVER_DIR
157-
- /home/myUser/homelab:/filesOnServer:ro
158-
environment:
159-
- TZ=America/New_York
160-
## Komodo Server name to use for generated Stacks
161-
- SERVER_NAME=my-cool-server
162-
## ParentDirectory on the host use as Stack Run Directory prefix
163-
- HOST_PARENT_PATH=/home/myUser/homelab
164-
restart: no
165-
```
166-
167-
```shell
168-
$ docker compose up --no-log-prefix
169-
[2025-08-11 14:06:19.080 -0400] INFO : [Init] Debug Mode: NO
170-
[2025-08-11 14:06:19.094 -0400] INFO : [App] Version: 0.1.0
171-
[2025-08-11 14:06:19.095 -0400] INFO : [App] Files On Server Dir ENV: /filesOnServer -> Resolved: /filesOnServer
172-
[2025-08-11 14:06:19.096 -0400] INFO : [App] [Files On Server] Processing Stacks for 6 folders:
173-
/filesOnServer/compose.yaml
174-
/filesOnServer/immich
175-
/filesOnServer/jellyfin
176-
/filesOnServer/octoprint
177-
/filesOnServer/plex
178-
/filesOnServer/uptime-kuma
179-
[2025-08-11 14:06:19.096 -0400] INFO : [App] [Files On Server] Compose File Glob: **/{compose,docker-compose}*.y?(a)ml
180-
[2025-08-11 14:06:19.097 -0400] INFO : [App] [Files On Server] Env Glob: **/.env
181-
[2025-08-11 14:06:19.097 -0400] INFO : [App] [Files On Server] [compose] Found Stack 'compose' at dir /filesOnServer/compose.yaml
182-
[2025-08-11 14:06:19.103 -0400] WARN : [App] [Files On Server] [compose] Did not find any files patterns matching compose glob
183-
[2025-08-11 14:06:19.103 -0400] INFO : [App] [Files On Server] [compose] Stack config complete
184-
[2025-08-11 14:06:19.104 -0400] INFO : [App] [Files On Server] [immich] Found Stack 'immich' at dir /filesOnServer/immich
185-
[2025-08-11 14:06:19.107 -0400] INFO : [App] [Files On Server] [immich] Found 1 files matching compose glob:
186-
docker/docker-compose.yaml
187-
[2025-08-11 14:06:19.107 -0400] INFO : [App] [Files On Server] [immich] Using file(s): docker/docker-compose.yaml
188-
[2025-08-11 14:06:19.108 -0400] INFO : [App] [Files On Server] [immich] Stack config complete
189-
[2025-08-11 14:06:19.108 -0400] INFO : [App] [Files On Server] [jellyfin] Found Stack 'jellyfin' at dir /filesOnServer/jellyfin
190-
[2025-08-11 14:06:19.109 -0400] INFO : [App] [Files On Server] [jellyfin] Found 3 files matching compose glob:
191-
compose.yaml
192-
docker-compose.yaml
193-
docker/docker-compose.yaml
194-
[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
195-
[2025-08-11 14:06:19.111 -0400] INFO : [App] [Files On Server] [jellyfin] Found 1 env files matching pattern **/.env:
196-
.env
197-
[2025-08-11 14:06:19.111 -0400] INFO : [App] [Files On Server] [jellyfin] Using .komodoEnv for Komodo-written env file
198-
[2025-08-11 14:06:19.111 -0400] INFO : [App] [Files On Server] [jellyfin] Stack config complete
199-
[2025-08-11 14:06:19.111 -0400] INFO : [App] [Files On Server] [octoprint] Found Stack 'octoprint' at dir /filesOnServer/octoprint
200-
[2025-08-11 14:06:19.112 -0400] WARN : [App] [Files On Server] [octoprint] Did not find any files patterns matching compose glob
201-
[2025-08-11 14:06:19.112 -0400] INFO : [App] [Files On Server] [octoprint] Stack config complete
202-
[2025-08-11 14:06:19.113 -0400] INFO : [App] [Files On Server] [plex] Found Stack 'plex' at dir /filesOnServer/plex
203-
[2025-08-11 14:06:19.114 -0400] INFO : [App] [Files On Server] [plex] Found 1 files matching compose glob:
204-
compose.yaml
205-
[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
206-
[2025-08-11 14:06:19.115 -0400] INFO : [App] [Files On Server] [plex] Stack config complete
207-
[2025-08-11 14:06:19.115 -0400] INFO : [App] [Files On Server] [uptime-kuma] Found Stack 'uptime-kuma' at dir /filesOnServer/uptime-kuma
208-
[2025-08-11 14:06:19.116 -0400] INFO : [App] [Files On Server] [uptime-kuma] Found 1 files matching compose glob:
209-
compose.yaml
210-
[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
211-
[2025-08-11 14:06:19.117 -0400] INFO : [App] [Files On Server] [uptime-kuma] Found 1 env files matching pattern **/.env:
212-
.env
213-
[2025-08-11 14:06:19.117 -0400] INFO : [App] [Files On Server] [uptime-kuma] Using .komodoEnv for Komodo-written env file
214-
[2025-08-11 14:06:19.117 -0400] INFO : [App] [Files On Server] [uptime-kuma] Stack config complete
215-
[2025-08-11 14:06:19.118 -0400] INFO : [App] [Files On Server] Built Stack configs for 6 folders
216-
[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
217-
218-
✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️
219-
[[stack]]
220-
name = "compose"
221-
222-
[stack.config]
223-
server = "my-cool-server"
224-
run_directory = "/home/myUser/homelab/compose"
225-
files_on_host = true
226-
auto_update = false
227-
poll_for_updates = false
228-
229-
[[stack]]
230-
name = "immich"
231-
232-
[stack.config]
233-
server = "my-cool-server"
234-
run_directory = "/home/myUser/homelab/immich"
235-
files_on_host = true
236-
auto_update = false
237-
poll_for_updates = false
238-
file_paths = [ "docker/docker-compose.yaml" ]
239-
240-
[[stack]]
241-
name = "jellyfin"
242-
243-
[stack.config]
244-
server = "my-cool-server"
245-
run_directory = "/home/myUser/homelab/jellyfin"
246-
files_on_host = true
247-
auto_update = false
248-
poll_for_updates = false
249-
env_file_path = ".komodoEnv"
250-
additional_env_files = [ ".env" ]
251-
252-
[[stack]]
253-
name = "octoprint"
254-
255-
[stack.config]
256-
server = "my-cool-server"
257-
run_directory = "/home/myUser/homelab/octoprint"
258-
files_on_host = true
259-
auto_update = false
260-
poll_for_updates = false
261-
262-
[[stack]]
263-
name = "plex"
264-
265-
[stack.config]
266-
server = "my-cool-server"
267-
run_directory = "/home/myUser/homelab/plex"
268-
files_on_host = true
269-
auto_update = false
270-
poll_for_updates = false
271-
272-
[[stack]]
273-
name = "uptime-kuma"
274-
275-
[stack.config]
276-
server = "my-cool-server"
277-
run_directory = "/home/myUser/homelab/uptime-kuma"
278-
files_on_host = true
279-
auto_update = false
280-
poll_for_updates = false
281-
env_file_path = ".komodoEnv"
282-
additional_env_files = [ ".env" ]
283-
✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️
284-
[2025-08-11 14:06:19.119 -0400] INFO : [App] Done!
285-
```
286-
287-
Copy everything between ✂️ lines -- this is the contents used in the [**Using Sync Resources**](#using-sync-resources) section.
288-
289-
**TIP**
290-
291-
Use
292-
293-
```
294-
docker compose up --no-log-prefix
295-
```
296-
297-
to get output without the service name prefix, makes getting clear TOML output easier.
298-
299-
</details>
300-
301-
## Writing Generated TOML to File
302-
303-
Komodo Import will additionally 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.
304-
305-
Bind mount a folder into the container and set `OUTPUT_DIR` like in the example below:
306-
307-
<details>
39+
## Usage
30840

309-
<summary>File Output Example</summary>
41+
[See the **Usage** documentation](https://foxxmd.github.io/komodo-import/docs/usage/overview)
31042

311-
```yaml
312-
services:
313-
komodo-import:
314-
# ...
315-
environment:
316-
# ...
317-
- OUTPUT_DIR=/output
318-
volumes:
319-
# ...
320-
- /my/host/folder:/output
321-
```
43+
## License
32244

323-
</details>
45+
MIT

0 commit comments

Comments
 (0)