zoneminder-containers / zoneminder-base

An always up-to-date automatically building ZoneMinder container
101 stars 32 forks source link

nginx and zoneminder are not started automatically #50

Closed Simpler1 closed 1 year ago

Simpler1 commented 1 year ago

Up until the last week or so, when the zoneminder-base docker image was started with docker-compose up -d nginx and zoneminder would automatically start up.

I don't know if this is some configuration change from my docker-compose.yaml file or something with the zoneminder-base packages, but I now have to manually start both of these.

I've been using the specific nightly tags such as nightly-1161 and nightly-1170.

Simpler1 commented 1 year ago

After upgrading to docker 24.0.3 and using "docker compose" instead of "docker-compose", this now works.

Used instructions here: https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository

The obsolete "docker-compose" could not wait until the database container was ready before trying to start zoneminder.

alexyao2015 commented 1 year ago

It should start with or without the wait. The zoneminder container automatically waits for the database container. You just don't want the database shutting down before zoneminder.

Simpler1 commented 1 year ago

@alexyao2015 First, thank you for creating and maintaining this repository. It is very useful.

From: https://docs.docker.com/compose/startup-order/ "On startup, Compose does not wait until a container is “ready”, only until it’s running."

With the newer "docker compose" the healthcheck can be used to make sure the database is ready before starting ZoneMinder.

It's worthwhile to update the instructions to use Compose v2.

alexyao2015 commented 1 year ago

You don't need to make sure the db is ready. The container checks for that automatically.