Previously, get_excluded() determined the dependency field based on
args.command, but this caused issues during teardown actions where
`podman-compose up` would pass `command=up` while needing dependents
rather than dependencies.
This change introduces an explicit dep_field parameter to eliminate
the ambiguity and ensure correct dependency resolution.
Signed-off-by: Songmin Li <lisongmin@protonmail.com>
Say there is an app service depends on a db service,
when we run `podman-compose down app`, the db service should not be stopped.
Signed-off-by: Songmin Li <lisongmin@protonmail.com>
The `type:bind` volume option `create_host_path` is currently unsupported in `podman-compose`. This prevents users from disabling the automatic creation of host source directories, creating an incompatibility with `docker-compose` functionality.
Refer to the relevant `docker-compose` documentation:
https://docs.docker.com/reference/compose-file/services/#volumes
This commit implements the `create_host_path` option to:
- Achieve better alignment with `docker-compose` behavior
- Provide control over host directory creation
Signed-off-by: Monika Kairaityte <monika@kibit.lt>
This change implements support for the COMPOSE_PROFILES environment
variable, allowing users to specify active Compose profiles through their
environment.
The behavior is as follows:
- Profiles from COMPOSE_PROFILES (comma-separated) are activated.
- Both the environment variable and the --profile CLI flag can be used
together, with the resulting set of active profiles being the union of
both.
Signed-off-by: Watson Dinh <ping@w47s0n.com>
This is not present in the compose spec. However, netavark podman
network backend does support --route option, which is useful for various
kinds of things. It is very easy to expose it.
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
Renamed directory `build_fail_multi` to more appropriate
`commands_fail_exit_code` as more tests were added to other
commands:`push` and `run`. Names of tests were changed accordingly.
Signed-off-by: Monika Kairaityte <monika@kibit.lt>
Failure exit code for `push` command is not currently forwarded as exit
code for podman-compose.
With this PR, podman-compose stops pushing when the underlying podman
command fails and forwards its exit code.
Signed-off-by: Monika Kairaityte <monika@kibit.lt>
`podman-compose` currently does not support interpolating environment
variables in dictionary keys, despite the compose file specification
indicating this capability.
See the relevant compose-spec documentation:
https://github.com/compose-spec/compose-spec/blob/main/12-interpolation.md
This feature is useful in `labels` or `environment` sections, where keys
can be user-defined strings. To enable interpolation, an alternate equal
sign syntax must be used, e.g.:
services:
foo:
labels:
- "$VAR_NAME=label_value"
After this PR `podman-compose` will align more closely with the compose
file specification, allowing for the interpolation of environment
variables in dictionary keys.
Signed-off-by: Monika Kairaityte <monika@kibit.lt>
When running "podman-compose", the list of commands gets displayed.
The "systemd" command is an outlier, showing multiple lines, unintended
at this location.
This change moves the longer command description to its proper place,
that is, it gets shown when "podman-compose systemd --help" is
executed.
Signed-off-by: Cleber Rosa <crosa@redhat.com
Signed-off-by: Monika Kairaityte <monika@kibit.lt>
This commit allows compose file to directly use environment variable
values in "environment:" section when variables were set in `.env` file.
This functionality was missing, as docker-compose supports both: short
and variable interpolation syntax forms:
environment:
- FOO
and
environment:
- FOO=${FOO}
Relevant docker-compose documentation:
https://docs.docker.com/compose/how-tos/environment-variables/set-environment-variables/
podman-compose is more compatible with docker-compose after this change.
Signed-off-by: Monika Kairaityte <monika@kibit.lt>