···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` |
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+| `GLOB_DOT` | - | `false` | Allow glob patterns, outside of ENV pattern, to find files/folders that start with `.` |
209210| `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 |
210211| `IMAGE_REGISTRY_PROVIDER` | - | | Name of Image Registry to use |
211212| `IMAGE_REGISTRY_ACCOUNT` | - | | Image Registry account to use |
+8
docsite/src/components/QuickstartCompose.tsx
···2626const doc = parseDocument(ComposeExample);
2727const proxyCollection = parseDocument(SocketProxyExample);
28282929+const DOT_FOLDER_REGEX = new RegExp(/(?:^|[\/\\])\.\S/);
3030+2931interface ComposeStateData {
3032 autoUpdate?: boolean
3133 pollUpdate?: boolean
···131133 const hostS = new Scalar(`HOST_PARENT_PATH=${hostPath}`);
132134 hostS.commentBefore = `# Same as mounted directory above`
133135 seq.add(hostS);
136136+137137+ if(DOT_FOLDER_REGEX.test(hostPath)) {
138138+ const dotS = new Scalar(`GLOB_DOT=true`);
139139+ dotS.commentBefore = `# Forces glob to not ignore dot folders`
140140+ seq.add(dotS);
141141+ }
134142135143 const stacksFromS = new Scalar(`STACKS_FROM=${composeState.stacksFrom}`);
136144 stacksFromS.commentBefore = '# Determines what sources to generate Stacks from'
···1717import { exportToSync } from './exporters/exportToApiSync.js';
1818import { getDefaultKomodoApi } from './common/utils/komodo.js';
1919import { StackBuilder } from './builders/stack/stackBuilder.js';
2020-import { parseDirectoryConfig } from './common/utils/io.js';
2020+import { parseDirectoryConfig, pathHasDotFolder } from './common/utils/io.js';
2121import { DirectoryConfig, DirectoryConfigValues } from './common/infrastructure/atomic.js';
22222323dayjs.extend(utc)
···56565757 getDefaultKomodoApi(logger);
58585959- let dirData: [DirectoryConfigValues, DirectoryConfig];
6060- try {
6161- dirData = await parseDirectoryConfig();
6262- logger.info(`Mount Dir : ${dirData[0].mountVal} -> Resolved: ${dirData[1].mount}`);
6363- logger.info(`Host Dir : ${dirData[0].hostVal} -> Resolved: ${dirData[1].host}`);
6464- logger.info(`Scan Dir : ${dirData[0].scanVal} -> Resolved: ${dirData[1].scan}`);
6565- } catch (e) {
6666- throw new Error('Could not parse required directories', {cause: e});
6767- }
6868-6959 const importOptions: CommonImportOptions = {
7060 server: process.env.SERVER_NAME,
7161 imageRegistryProvider: process.env.IMAGE_REGISTRY_PROVIDER,
···7464 pollForUpdate: isUndefinedOrEmptyString(process.env.POLL_FOR_UPDATE) ? undefined : parseBool(process.env.POLL_FOR_UPDATE),
7565 komodoEnvName: process.env.KOMODO_ENV_NAME,
7666 composeFileGlob: process.env.COMPOSE_FILE_GLOB,
6767+ allowGlobDot: isUndefinedOrEmptyString(process.env.GLOB_DOT) ? undefined : parseBool(process.env.GLOB_DOT),
7768 envFileGlob: process.env.ENV_FILE_GLOB,
7869 folderGlob: isUndefinedOrEmptyString(process.env.FOLDER_GLOB) ? undefined : process.env.FOLDER_GLOB.trim(),
7970 ignoreFolderGlob: isUndefinedOrEmptyString(process.env.FOLDER_IGNORE_GLOB) ? undefined : process.env.FOLDER_IGNORE_GLOB.trim(),
8071 };
7272+7373+ let dirData: [DirectoryConfigValues, DirectoryConfig];
7474+ try {
7575+ dirData = await parseDirectoryConfig(undefined);
7676+ logger.info(`Mount Dir : ${dirData[0].mountVal} -> Resolved: ${dirData[1].mount}`);
7777+ logger.info(`Host Dir : ${dirData[0].hostVal} -> Resolved: ${dirData[1].host}`);
7878+ logger.info(`Scan Dir : ${dirData[0].scanVal} -> Resolved: ${dirData[1].scan}`);
7979+ } catch (e) {
8080+ throw new Error('Could not parse required directories', {cause: e});
8181+ }
8282+8383+ if(pathHasDotFolder(dirData[1].host) && importOptions.allowGlobDot !== true) {
8484+ logger.warn(`It looks like your Host Dir has a dot folder in its path and the env GLOB_DOT is not true/set. Komodo Import may not be able to match your paths because of this. If results are not as expected try setting GLOB_DOT=true`);
8585+ }
8686+ if(pathHasDotFolder(dirData[1].scan) && dirData[1].host !== dirData[1].scan && importOptions.allowGlobDot !== true) {
8787+ logger.warn(`It looks like your Scan Dir has a dot folder in its path and the env GLOB_DOT is not true/set. Komodo Import may not be able to match your paths because of this. If results are not as expected try setting GLOB_DOT=true`);
8888+ }
8989+81908291 if (importOptions.server === undefined || importOptions.server.trim() === '') {
8392 logger.error('ENV SERVER_NAME must be set');