Closed tamas-boczan closed 5 months ago
I note you're using Compose v2.26.1 whereas with Portainer 2.19.5 we ship with v2.20.2 of Compose. I can also see a mention of a fix around the required engine version for the start_interval
option in the Compose v2.24.1 release notes so perhaps this was fixed in between the version that Portainer 2.19.5 ships with and the version you're running locally.
Our STS release, Portainer 2.20.2, ships with a newer version of Compose (v2.26.1 in fact) - would it be possible for you to update to 2.20.2 and see if the problem persists? Take a backup before doing so of course!
It works! Thank you for the great instructions.
I didn't consider that Portainer might ship with its own Compose but it makes total sense. Upgrading to 2.20.2 makes start_interval
work as intended.
Thanks for following up, and glad this fixed it! We include the Compose binary with the release so that we can provide Compose functionality within Portainer without relying on the host to have it installed, and also to ensure we're working with a version of Compose that we've tested with. As we release new versions of Portainer we bump the version of the included binaries, so our next LTS release (2.21) will include this too.
Before you start please confirm the following.
Problem Description
docker-compose provides an option to periodically run a command which determines the health of the container. The intervals between health-checks are different during the startup period immediately after the container is started, and later.
start_period
sets how long the startup period lastsstart_interval
sets how often to run the healtcheck command during the start periodinterval
sets how often to run the command after the start period.Corresponding docs here.
I found that when I start stacks with portainer, the
start_interval
attribute is ignored, andinterval
is used even during the startup period, despite it working as expected when running docker-compose without portainer.Expected Behavior
When I start a container with a low
start_interval
value, and a highinterval
value, thestart_interval
value is used in the firststartup_period
seconds after the container is started.Actual Behavior
Portainer uses the
interval
value only, ignoringstart_interval
. When I directly run the stack withdocker compose
without Portainer, it works as intended.Steps to Reproduce
Minimal docker-compose example below. Container
second
starts whenfirst
becomes healthy. The health check test is set to always return that the container is healthy.Expected:
first
starts, thensecond
starts 1 second later. This happens when executed directly withdocker-compose up
. Actual: When executed with Portainer,second
starts 60 seconds afterfirst
. It's ignored that during thestart_period
, health checks should happen everystart_interval
second.Portainer logs or screenshots
Portainer version
2.19.5
Portainer Edition
Community Edition (CE)
Platform and Version
Docker 26.1.0 | Docker Compose v2.26.1
OS and Architecture
Debian 12 | ARM64
Browser
No response
What command did you use to deploy Portainer?
No response
Additional Information
No response
EDIT: typos