Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Interpolation in Compose Files #81

Open
Koli0842 opened this issue May 24, 2024 · 4 comments
Open

Support for Interpolation in Compose Files #81

Koli0842 opened this issue May 24, 2024 · 4 comments
Labels
blocked Waiting on something else to resolve enhancement New feature or request
Milestone

Comments

@Koli0842
Copy link

I am trying to create systemd unit files for my Immich deployment from their provided docker-compose file, in which an env_file is specified and some variables are referenced by the ${VAR_NAME} syntax. Looks like podlet does not attempt to resolve them, resulting in errors like

Error:
   0: error converting compose file
   1: error reading compose file
   2: File `docker-compose.yml` is not a valid compose file
   3: services.immich-server.image: invalid image tag: image tag contains invalid character '$', tags must only contain ASCII letters (a-z, A-Z), digits (0-9), dots (.), underscores (_), and dashes (-) at line 16 column 12

While I am not sure systemd supports loading an env file and resolve variables within the unit files, it could already be a step forward to resolve the variables within podlet and have the unit files generated with static values at the time of running the command, along with perhaps a warning to the user that further changes to the env_file will not get automatically picked up by systemd units

@k9withabone
Copy link
Member

I think what you are looking for is interpolation. As mentioned in the README, this is not yet supported by Podlet. It's on my list of things to do for the compose_spec library, see k9withabone/compose_spec_rs#3.

The env_file field of a Compose service is already supported. It is translated to the EnvironmentFile= Quadlet option.

@Koli0842
Copy link
Author

That is correct, sorry for my redundancy!

@k9withabone k9withabone changed the title Support for env_file in docker-compose files Support for Interpolation in Compose Files May 25, 2024
@k9withabone k9withabone added enhancement New feature or request blocked Waiting on something else to resolve labels May 25, 2024
@k9withabone k9withabone added this to the v0.3.1 milestone May 25, 2024
@akostadinov
Copy link

IMHO the implementation should include adding support to quadlet. Because otherwise one would have to remember runnig podlet on change of environment which will be frustrating.

@k9withabone
Copy link
Member

the implementation should include adding support to quadlet.

You should create an issue in the Podman repo as Quadlet is developed there.

@k9withabone k9withabone modified the milestones: v0.3.1, v0.3.2 Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Waiting on something else to resolve enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants