containrrr / watchtower

A process for automating Docker container base image updates.
https://containrrr.dev/watchtower/
Apache License 2.0
19.16k stars 853 forks source link

Notification Template not allowed in compose file #2042

Open wwhite59 opened 14 hours ago

wwhite59 commented 14 hours ago

Describe the bug

Whenever I try using a notification template in my compose file I get errors that the yaml is missing a ":" character. I tried my original compose file which works without the custom template as well as creating a new compose file from example https://containrrr.dev/watchtower/notifications/#report_templates

Steps to reproduce

  1. Go to 'https://containrrr.dev/watchtower/notifications/#report_templates'
  2. Copy the 'docker-compose' example into a new compose file in omv
  3. Try 'docker up' on the newly added compose file
  4. See following error:
    
    Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export LANGUAGE=; docker compose --file '/srv/dev-disk-by-uuid-7efde501-e730-44bf-8702-af3d5872713c/docker/compose/watchtower1/watchtower1.yml' --file "/srv/dev-disk-by-uuid-7efde501-e730-44bf-8702-af3d5872713c/docker/compose/watchtower1/compose.override.yml" --env-file '/srv/dev-disk-by-uuid-7efde501-e730-44bf-8702-af3d5872713c/docker/compose/global.env' --env-file '/srv/dev-disk-by-uuid-7efde501-e730-44bf-8702-af3d5872713c/docker/compose/watchtower1/watchtower1.env' up -d  2>&1': yaml: line 14: could not find expected ':'

OMV\ExecException: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export LANGUAGE=; docker compose --file '/srv/dev-disk-by-uuid-7efde501-e730-44bf-8702-af3d5872713c/docker/compose/watchtower1/watchtower1.yml' --file "/srv/dev-disk-by-uuid-7efde501-e730-44bf-8702-af3d5872713c/docker/compose/watchtower1/compose.override.yml" --env-file '/srv/dev-disk-by-uuid-7efde501-e730-44bf-8702-af3d5872713c/docker/compose/global.env' --env-file '/srv/dev-disk-by-uuid-7efde501-e730-44bf-8702-af3d5872713c/docker/compose/watchtower1/watchtower1.env' up -d 2>&1': yaml: line 14: could not find expected ':' in /usr/share/openmediavault/engined/rpc/compose.inc:970 Stack trace:

0 /usr/share/php/openmediavault/rpc/serviceabstract.inc(622): OMVRpcServiceCompose->{closure}()

1 /usr/share/openmediavault/engined/rpc/compose.inc(937): OMV\Rpc\ServiceAbstract->execBgProc()

2 [internal function]: OMVRpcServiceCompose->doCommand()

3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(122): call_user_func_array()

4 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod()

5 /usr/sbin/omv-engined(544): OMV\Rpc\Rpc::call()

6 {main}


### Expected behavior

Watchtower starting with the settings from the example 

### Screenshots

_No response_

### Environment

- Platform: OpenMediaVault (debian 12)
- Architecture: x64
- Docker Version: docker-ce 5:27.3.1-1~debian.12~bookworm

### Your logs

```text
None as Watchtower doesn't start in the first place

Additional context

No response

github-actions[bot] commented 14 hours ago

Hi there! 👋🏼 As you're new to this repo, we'd like to suggest that you read our code of conduct as well as our contribution guidelines. Thanks a bunch for opening your first issue! 🙏