Commit Graph

1094 Commits

Author SHA1 Message Date
Povilas Kanapickas
e8db551379 Merge pull request #1285 from containers/dependabot/github_actions/actions/checkout-5
Bump actions/checkout from 4 to 5
2025-08-21 15:19:14 +03:00
Povilas Kanapickas
ffe2a29db7 Merge pull request #1283 from lisongmin/fix-stop-wrong-dependents-on-compose-down
fix: podman-compose down should not stop the upstream dependencies.
2025-08-21 15:18:36 +03:00
Povilas Kanapickas
5b0ee7c131 Merge pull request #1282 from mokibit/add-workflow_dispatch
tests: Add `workflow_dispatch` to allow manual execution of CI tests
2025-08-21 15:15:20 +03:00
dependabot[bot]
ee32ffe526 Bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-12 07:38:53 +00:00
Songmin Li
cd25efa779 Add integration test for compose down
Signed-off-by: Songmin Li <lisongmin@protonmail.com>
2025-08-10 23:40:56 +08:00
Songmin Li
967bced35b Fix dependency field selection in get_excluded() function
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>
2025-08-10 02:05:33 +08:00
Songmin Li
4aa11de6bf fix: podman-compose down should not stop the upstream dependencies.
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>
2025-08-09 23:30:20 +08:00
Monika Kairaityte
c26387d5ae tests: Add workflow_dispatch to allow manual execution of CI tests
Signed-off-by: Monika Kairaityte <monika@kibit.lt>
2025-08-07 17:22:39 +03:00
Povilas Kanapickas
f618ff3b6e Merge pull request #1279 from mokibit/add-volume-bind-create-host-path-option
Add volume bind `create_host_path` option
2025-07-25 14:07:31 +03:00
Monika Kairaityte
4f9b419865 tests: Add unit and integration tests for create_host_path
Signed-off-by: Monika Kairaityte <monika@kibit.lt>
2025-07-25 13:29:39 +03:00
Monika Kairaityte
36fad25f25 Implement volumes bind.create_host_path option
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>
2025-07-25 13:29:39 +03:00
Povilas Kanapickas
af7346baf6 Merge pull request #1278 from linux-root/compose-profiles-env
feat: Add support for COMPOSE_PROFILES environment variable
2025-07-24 14:43:06 +03:00
Watson Dinh
28ec08c753 feat: Add support for COMPOSE_PROFILES environment variable
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>
2025-07-23 15:48:39 -05:00
Povilas Kanapickas
036c0dcd18 Merge pull request #1267 from p12tic/release-docs
RELEASING: Add steps for uploading to Pypi
2025-07-07 17:30:09 +03:00
Povilas Kanapickas
83c0d30880 RELEASING: Add steps for uploading to Pypi
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2025-07-07 17:20:15 +03:00
Povilas Kanapickas
f7eeda1a3d Release 1.5.0
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
v1.5.0
2025-07-07 17:13:00 +03:00
Povilas Kanapickas
bf9d647c6b Merge pull request #1266 from p12tic/release
Release notes for 1.5.0
2025-07-07 13:39:24 +03:00
Povilas Kanapickas
3d3064c735 Release notes for 1.5.0
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2025-07-07 12:24:35 +03:00
Povilas Kanapickas
04b12e0240 Merge pull request #1264 from p12tic/network-routes
Add support to set --route of podman network create
2025-07-06 20:02:39 +03:00
Povilas Kanapickas
8113a16baf Add support to set --route of podman network create
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>
2025-07-06 19:53:01 +03:00
Povilas Kanapickas
c7bce311db tests: Extract get_minimal_net_desc() in network tests
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2025-07-06 19:52:57 +03:00
Povilas Kanapickas
853be4362d docs: Fix typo in x-podman.disable_dns
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2025-07-06 19:52:36 +03:00
Povilas Kanapickas
87d065de9e Merge pull request #1263 from uosis/no-recreate
Implement `up --no-recreate`
2025-07-06 13:46:37 +03:00
Uosis
7a0c6e791b implement 'up --no-recreate'
Signed-off-by: Uosis <uosisl+github@gmail.com>
2025-07-04 23:27:50 -06:00
Povilas Kanapickas
406596e1db Merge pull request #1259 from mokibit/push-non-zero-exit-code
Properly surface errors from `push` command
2025-07-03 15:10:37 +03:00
Monika Kairaityte
b3fd55047b tests/integration: Rename dir build_fail_multi
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>
2025-07-03 14:37:58 +03:00
Monika Kairaityte
c1ca9166c6 tests/integration: Add test for run command failure exit code
Test is added to confirm that `run` command forwards non-zero failure
exit code.

Signed-off-by: Monika Kairaityte <monika@kibit.lt>
2025-07-02 23:34:25 +03:00
Monika Kairaityte
256b51c8ee Properly surface errors from push command
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>
2025-07-02 23:34:24 +03:00
Povilas Kanapickas
2ed50b9538 Merge pull request #1258 from mokibit/add-env-var-interpolation-to-keys
Implement environment variable interpolation to YAML dictionary keys
2025-07-01 00:15:05 +03:00
Monika Kairaityte
e97d446a04 Implement environment variable interpolation to YAML dictionary keys
`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>
2025-06-30 23:54:27 +03:00
Povilas Kanapickas
9fe6e7f284 Merge pull request #1253 from whym/yaml-parse-error
Hide stack trace shown on YAML parse error by default
2025-06-30 16:06:11 +03:00
Yusuke Matsubara
764efd360c Hide stack trace shown on YAML parse error by default
Fixes https://github.com/containers/podman-compose/issues/1139

Signed-off-by: Yusuke Matsubara <whym@whym.org>
2025-06-30 15:33:25 +03:00
Povilas Kanapickas
b06224389e Merge pull request #1257 from astrojuanlu/migrate-pep-621
Migrate to PEP 621
2025-06-30 15:31:10 +03:00
Juan Luis Cano Rodríguez
0e37b31e45 Adapt release script
Signed-off-by: Juan Luis Cano Rodríguez <hello@juanlu.space>
2025-06-29 20:57:28 +02:00
Juan Luis Cano Rodríguez
3918f7e5f8 Add requires-python lower boundary
Signed-off-by: Juan Luis Cano Rodríguez <hello@juanlu.space>
2025-06-29 20:57:28 +02:00
Juan Luis Cano Rodríguez
d7cd02e3e9 Migrate to SPDX identifier for the license
Signed-off-by: Juan Luis Cano Rodríguez <hello@juanlu.space>
2025-06-29 20:57:28 +02:00
Juan Luis Cano Rodríguez
05f341b3c5 Python 2 is EOL
Signed-off-by: Juan Luis Cano Rodríguez <hello@juanlu.space>
2025-06-29 20:57:28 +02:00
Juan Luis Cano Rodríguez
f8d05babd7 Migrate to PEP 621
Signed-off-by: Juan Luis Cano Rodríguez <hello@juanlu.space>
2025-06-29 20:57:28 +02:00
Povilas Kanapickas
8eb55735e9 Merge pull request #1250 from mokibit/fix-formatting-systemd-cmd-help
Fix formatting of description and help of `systemd` command
2025-06-27 11:22:02 +03:00
Cleber Rosa
1c0c63aaf2 Fix formatting of description of systemd command
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>
2025-06-27 11:15:34 +03:00
Cleber Rosa
2f8dbdcd09 Remove assignment to variable that gets overriden and never used
Signed-off-by: Cleber Rosa <crosa@redhat.com>
Signed-off-by: Monika Kairaityte <monika@kibit.lt>
2025-06-26 20:54:54 +03:00
Povilas Kanapickas
e789d98bf0 Merge pull request #1249 from p12tic/update-contributing
Update CONTRIBUTING.md
2025-06-26 14:59:42 +03:00
Povilas Kanapickas
0de04b32bb CONTRIBUTING: Suggest contributors to split their commits
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2025-06-26 14:37:43 +03:00
Povilas Kanapickas
d864e195ce CONTRIBUTING: Update instructions on commit message
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2025-06-26 14:37:41 +03:00
Povilas Kanapickas
96ec9617f1 CONTRIBUTING: Update instructions for creating virtualenv
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2025-06-26 14:37:35 +03:00
Povilas Kanapickas
b48317c22b Merge pull request #1248 from mokibit/add-short-syntax-for-env-variables
Implement short syntax for env variables in compose.yml "environment:"
2025-06-26 14:21:52 +03:00
Monika Kairaityte
0cbf70a4e9 Implement short syntax for env variables in compose.yml "environment:"
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>
2025-06-26 12:40:39 +03:00
Povilas Kanapickas
7105198ae1 Merge pull request #1247 from whym/log-formatter-bug
Fixes #1237: Remove unnecessary 'or "text"'
2025-06-25 22:45:13 +03:00
Yusuke Matsubara
8f9f6d0657 Remove unnecessary 'or "text"'
Fixes #1237

Signed-off-by: Yusuke Matsubara <whym@whym.org>
2025-06-25 21:53:34 +09:00
Povilas Kanapickas
61392e9cba Merge pull request #1243 from mokibit/fix-dockerfile-definition
Fix dockerfile definition if directory name ends with ".git"
2025-06-17 19:53:15 +03:00