github moghtech/komodo v1.19.1
Komodo v1.19.1

latest release: v1.19.2
11 days ago

Changelog

🚨 In order to use config_files, Periphery should also be updated to v1.19.1
❗️In addition to ghcr.io, images are now also being published to moghtech/komodo-* (Docker Hub)

Stack config_files 🦎

One of the most common requests was to allow in UI editing of .env files on server / in repo. But really, there's not much difference between .env files and any config file which a Stack may be dependent on.

This release adds the ability to configure all config files Stacks depend on, such as json / yaml app config files, and edit the files from the Komodo UI. Just add the relative path to the files (from the Run Directory) to the Stack "Config Files".

Users which are already using "Additional Env File" feature will find, with no change, that they can now see / edit all their additional env files from the UI. The only difference is that "Additional Env Files" will also be included in the docker compose up command (with --env-file flag), while "Config Files" will not.

The UI editors support syntax highlighting for a couple of common formats, such as toml, yaml, json, ini, and shell / .env. It will be challenging to add support for all the various formats used, so I won't personally accept requests to add more. The support is set up for extension though, please raise a PR adding support for additional syntax highlighting you would like and I am happy to review and merge it.

Deploy Stack If Changed 🦎

The biggest issue with Deploy Stack If Changed up to v1.19.1 was that it would only Redeploy if one of the compose files changed. If the commit is only to config file, these changes would be missed.

Now in v1.19.1, "Config Files" and "Additional Env Files" will also be tracked and diffed for changes. This means changes made only to a config / additional env file can also trigger deploy using Deploy Stack If Changed.

Any change made to a compose file or additional env file will always lead to a full Redeploy. However users are able to configure what kind of behavior diffs to config files leads to, either globally for the Stack or at the service level. For example, you can set diffs in a config file to only restart a specific service or services.

Action Example 🦎

If you configure Stacks with all dependent config_files, you can create an Action like this:

const { REPO } = ARGS as { REPO: string };

if (!REPO) {
  throw "Must pass REPO arg with linked repo name";
}

const repo_id = (
  await komodo.read("ListRepos", { query: { names: [REPO] } })
)[0].id;
const stacks = (
  await komodo.read("ListStacks", {
    query: { specific: { linked_repos: [repo_id] } },
  })
)
  .filter((s) => s.info.state === Types.StackState.Running)
  .map((s) => s.name)
  .join("\n");

console.log("Deploying if changed:\n");
console.log(stacks);
console.log();

await komodo.execute("BatchDeployStackIfChanged", { pattern: stacks });

It is re-usable in multiple Procedures, which can wrap the Action an hardcode the actual Repo.
You then setup webhooks for the Procedure on push, or can schedule the Procedure to run at polling intervals.

Community Contributions 🦎

This last week saw a ton of end-to-end feature development in community contributions, and I wanted to highlight them here:

Resource

  • Build: Push images to Multiple registries / organizations
    • Using this to now publish images to moghtech/komodo-* (docker.io)
  • Action / Procedure: You can now configure static Action Args using the Procedure Config UI

Misc

  • New execute API -- SendAlert
    • Broadcast custom alert messages from within Actions / Procedures

Don't miss a new komodo release

NewReleases is sending notifications on new releases.