Trying to enable notification server: docker error

Hi,

I want to enable the Notification Server and followed the official documentation on a rather fresh setup. Here’s the result:

/opt/seafile# docker compose down && docker compose up -d
[+] Running 7/7
 ✔ Container notification-server  Removed                                                0.0s
 ✔ Container seafile-caddy        Removed                                                0.4s
 ✔ Container seadoc               Removed                                               10.5s
 ✔ Container seafile              Removed                                                2.6s
 ✔ Container seafile-redis        Removed                                               10.3s
 ✔ Container seafile-mysql        Removed                                                0.5s
 ✔ Network seafile-net            Removed                                                0.2s
[+] Running 7/7
 ✔ Network seafile-net            Created                                                0.1s
 ✔ Container seafile-redis        Started                                                0.9s
 ✔ Container seafile-caddy        Started                                                0.9s
 ✔ Container seafile-mysql        Healthy                                                7.2s
 ✔ Container seadoc               Started                                                6.4s
 ✘ Container seafile              Error                                                  7.0s
 ✔ Container notification-server  Created                                                0.1s
dependency failed to start: container seafile has no healthcheck configured

My setup is a docker-based install that I started fresh on 13.0.7 and is now up-to-date. I try to keep it as close to the official documentation as possible. It also uses the provided caddy composefile. (My .env specifies the default 13.0-latest where applicable.)

In order to enable the notification server I did exactly as documented: download the additional compose file, add it in COMPOSE_FILE (does the order matter?), set ENABLE_NOTIFICATION_SERVER=true.

What is this health check all about? And how can I fix it?

Noteworthy: setting the ENABLE_ variable to false again results in the same error message. Only removing the reference to notification-server.yml fixes the issue again. I also tried configuring NOTIFICATION_SERVER_URL but this didn’t help either.

Any help would be appreciated.

The current notification-server.yml.j2 file says that the seafile container has to have a “healthcheck” defined, because it depends on that check reporting healthy before it gets started. That is this section on the notification-server.yml:

    depends_on:
...
      seafile:
        condition: service_healthy

When I set up the notification server on my seafile, that section wasn’t there. Also new in one of the recent new versions is that required health check in the seafile-server.yml :

    healthcheck:
      test: ["CMD-SHELL", "curl -f http://localhost:80 || exit 1"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 10s

So you have a new version of the notification-server.yml, but an older version of the seafile-server.yml, and they aren’t compatible. Unfortunately, changes to the official versions of these yml files are not listed in the change log (nor anywhere else I have been able to find), so it would probably be a good idea to just download new versions and diff against the ones you have already as part of your upgrade procedure.

@daniel.pan Can I make this a request to get changes to the docker yml and env files documented in the changelog? It would help keep us from accidentally running in an untested/unsupported configuration.

Thank you, that’s it!

I wouldn’t have expected such an incompatible change in a subminor revision (13.0.x).

Then again I (accidentally) started this server instance on 13.0 when it was still in beta. So maybe that change was before 13.0 was properly declared stable.

I think 13.0 was showing up either as “13.0” or “latest” in the official documentation (without any “beta” suffix or similar hint) when it was not yet released. Only afterwords I noticed that the download page listed 12.x as the latest stable release. It pains me to say this, but documentation has always been one of the weaker points of an otherwise great software product.

Thanks for the suggestion. We will add changes of YML files in the changelog.