Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trigger docker compose don't update file #546

Closed
kinouzero opened this issue Jan 6, 2025 · 4 comments · Fixed by #574
Closed

Trigger docker compose don't update file #546

kinouzero opened this issue Jan 6, 2025 · 4 comments · Fixed by #574

Comments

@kinouzero
Copy link

kinouzero commented Jan 6, 2025

Hi,

I don't understand why, on the version 7.2.0 this feature worked but when I switched to main version it stopped fully working.

The file isn't modified but the target container is updated with the new image, and no backup file is created.

Here my docker-compose :

wud:
    <<: [*basic, *extra-hosts, *network-zero, *restart-always]
    container_name: ${WUD_NAME}
    environment:
      TZ: ${TZ}
      WUD_AUTH_OIDC_AUTHENTIK_CLIENTID: ${WUD_AUTH_OIDC_AUTHENTIK_CLIENTID}
      WUD_AUTH_OIDC_AUTHENTIK_CLIENTSECRET: ${WUD_AUTH_OIDC_AUTHENTIK_CLIENTSECRET}
      WUD_AUTH_OIDC_AUTHENTIK_DISCOVERY: ${WUD_AUTH_OIDC_AUTHENTIK_DISCOVERY}
      WUD_AUTH_OIDC_AUTHENTIK_REDIRECT: ${FALSE}
      WUD_LOG_LEVEL: ${LOG_LEVEL}
      WUD_TRIGGER_DOCKERCOMPOSE_LOCAL_AUTO: ${FALSE}
      WUD_TRIGGER_DOCKERCOMPOSE_LOCAL_BACKUP: ${TRUE}
      WUD_TRIGGER_DOCKERCOMPOSE_LOCAL_FILE: ${WUD_TRIGGER_DOCKERCOMPOSE_LOCAL_FILE}
      WUD_TRIGGER_DOCKERCOMPOSE_LOCAL_PRUNE: ${TRUE}
      WUD_TRIGGER_SLACK_ZERO_CHANNEL: ${WUD_TRIGGER_SLACK_ZERO_CHANNEL}
      WUD_TRIGGER_SLACK_ZERO_TOKEN: ${WUD_TRIGGER_SLACK_ZERO_TOKEN}
      WUD_WATCHER_LOCAL_SOCKET: ${DIR_DOCKER_SOCKET}
      WUD_WATCHER_MQTT_HOST: ${MQTT_HOST}
    healthcheck:
      <<: *healthcheck-basic
      test: ['CMD', 'curl', '-f', 'http://localhost:3000/health']
    image: getwud/wud:main
    labels:
      <<: *label-wud-false
      wud.display.icon: 'sh-whats-up-docker'
      wud.display.name: 'Whats Up Docker'
    volumes:
      - ${DIR_APPDATA}/wud:/store
      - ${DIR_DOCKER_SOCKET}:${DIR_DOCKER_SOCKET}:ro
      - ${DIR_LOCALTIME}:${DIR_LOCALTIME}:ro
      - ${DIR_HOME}/.docker/compose:/compose

The docker-compose.yml file is well mounted in the container.

@setrin
Copy link

setrin commented Jan 12, 2025

I have the same issue.
Container is updated, but compose file stays the same. Deeper dive revealed that Docker compose supports only batch trigger, otherwise it triggers standalone Docker trigger which doesn't do anything the compose file.
My expectation is that manual trigger updates that one container it was triggered on, updates docker compose file and saves it as well.

@jrbarronumd
Copy link

@setrin - Does that mean you have it working with a batch trigger? I can't seem to get it to actually do anything. Only evidence I see of it at all is the manual button in the GUI, which as you said, only updates the container, not the compose file.

@setrin
Copy link

setrin commented Jan 21, 2025

Yes. When ..._AUTO is set to true, at some point it triggers automatically and that is a batch trigger, which updates containers as well as Docker-compose file.
I have a working POC for manual trigger, which updates container as well as docker-compose file. I will probably submit pull request shortly. Hopefully it will be officially released.

@fmartinou
Copy link
Collaborator

Hi,

You spotted the real problem 👍

Indeed, by default, the compose trigger only supports batch mode to avoid concurrent updates on the docker-compose.yml file.
That is the reason why manual triggers don't work as expected; I'll quickly fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants