Photo by CHUTTERSNAP on Unsplash

Compose Generator — Update 1.5.0

If you haven’t read about Compose Generator yet, visit the introduction article here. This particular article shows which features / improvements were added in version 1.5.0 of Compose Generator.

Apart from optimization and bugfixes, there are a few new features to discuss in the following parts.

Watchtower integration

This update adds support for auto-updating of Docker images, using Watchtower. The requirement for that is, that the tag of the Docker image does not change with the update. If you set the tag latest you should be good to go!

Compose Generator asks you about Watchtower

Compose Generator asks you if you want to enable Watchtower after selecting the other service templates. It will ask you which services you want to enable Watchtower for. Any selected service will get the com.centurylabs.watchtower.enable label.

If Watchtower is enabled. The compose file contains an additional service:

companion-watchtower:
command:
- --interval
- "30"
depends_on:
database-postgres:
condition: service_started
db-admin-adminer:
condition: service_started
frontend-accent:
condition: service_started
frontend-angular:
condition: service_started
image: containrrr/watchtower:latest
restart: unless-stopped
volumes:
- type: bind
source: /var/run/docker.sock
target: /var/run/docker.sock

Major performance optimization for CCom

Compose Generator internally uses the CCom compiler toolchain to evaluate conditional sections and conditional statements, based on JSON input. CCom offers a CLI, which Compose Generator called previously. This CLI executable enriches the user input and then calls the compiler executable with all required inputs. After the last update we executed several benchmarks for CCom, which have shown that this additional executable fork costs a lot of performance.
As Compose Generator uses CCom very often (~20 times even if only one template was selected), CCom can be optimized quite a bit by calling the CCom compiler executable directly without going via the CLI.

Further reading about Compose Generator

The key concept behind Compose Generator is, that it is durable and extensible. Therefore it is possible to create own predefined service templates and add them to the list of selectable services. If you do so, feel free to hand it in as a community contribution on GitHub!

There will be more upcoming articles regarding in-depth information about creating predefined service templates and all available cli subcommands!

Thank you for your interest and for reading this article.
If you want to learn more about Compose Generator, please visit the official documentation at www.compose-generator.com and the open source project on GitHub.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Marc Auberer

Marc Auberer

C++ Compiler Developer at SAP. Passionate software developer and OpenSource enthusiast.