containers / podman-compose

a script to run docker-compose.yml using podman
GNU General Public License v2.0
4.86k stars 465 forks source link

Allow providing default value for `--in-pod=` using environment variable #932

Closed uosis closed 2 weeks ago

uosis commented 2 months ago

With the new default of true, it is quite unergonomic and error prone to have to pass --in-pod= everywhere. This simple change allows providing default value using environment variable.

This should help mitigate https://github.com/containers/podman-compose/issues/795.

ggrandou commented 2 months ago

Instead of using an environment variable, how about adding a custom section in the compose file ? like:

services:
  my_app:
    userns_mode: keep-id
    [...]
x-podman:
  in-pod: false
p12tic commented 1 month ago

Instead of using an environment variable, how about adding a custom section in the compose file ? like:

Yes, I though the same. We should reduce the amount of implicit state.

mokibit commented 2 weeks ago

@uosis thanks for opening an issue. The issue was fixed in https://github.com/containers/podman-compose/pull/964 by adding a custom section in the compose file as @ggrandou suggested. @p12tic the problem can be closed.

uosis commented 2 weeks ago

Sounds good, thanks for a proper fix!