mbox series

[layerindex-web,0/3] dockersetup.py: tests and "docker compose" support

Message ID 20261018214847.69431-1-tim.orling@konsulko.com
Headers show
Series dockersetup.py: tests and "docker compose" support | expand

Message

Tim Orling Oct. 18, 2026, 9:48 p.m. UTC
This series applies on top of "Docker: environment files for dev,
staging and production".

Patch 1 moves the code dockersetup.py ran at module level into main(),
so its functions can be imported and tested. There is no change in
behaviour.

Patch 2 adds tests for the files dockersetup.py writes: the .env.local.*
files, docker-compose.yml, the proxy settings and the nginx SSL
configuration. The Docker image doesn't contain dockersetup.py, so these
tests are skipped by docker/run-tests.sh and run by a separate CI job on
the host, which needs only pytest and PyYAML.

Patch 3 makes dockersetup.py use the "docker compose" plugin that
current Docker installs provide, falling back to the standalone
docker-compose command.

Tested with tests/test_dockersetup.py and docker/run-tests.sh. I have
not run a complete dockersetup.py installation with these changes.

Tim Orling (3):
  dockersetup.py: move the script body into main()
  tests: add tests for the files dockersetup.py writes
  dockersetup.py: use "docker compose" when it is available

 .github/workflows/ci.yml  |  13 +
 dockersetup.py            | 554 ++++++++++++++++++++------------------
 tests/test_dockersetup.py | 183 +++++++++++++
 3 files changed, 487 insertions(+), 263 deletions(-)
 create mode 100644 tests/test_dockersetup.py


base-commit: e6040597ae0f614581de241fe78f20e34dae13ac
prerequisite-patch-id: 0cfb656e605b0ec4a84298986850c958648f94bf
prerequisite-patch-id: cf25fa25d9d94e47af321358b41c451717173512
prerequisite-patch-id: a3d6bb81b18633b51f922cc20a99b84ac423393b
prerequisite-patch-id: e1c00c40927a7db84488f2ce1b4ed40f3aa14aa0