mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-07-30 13:48:07 +02:00
Avoid unhealthy container when Frigate is stopping (#18021)
This commit is contained in:
parent
ac8e647b92
commit
52d94231c7
@ -260,7 +260,7 @@ ENTRYPOINT ["/init"]
|
|||||||
CMD []
|
CMD []
|
||||||
|
|
||||||
HEALTHCHECK --start-period=300s --start-interval=5s --interval=15s --timeout=5s --retries=3 \
|
HEALTHCHECK --start-period=300s --start-interval=5s --interval=15s --timeout=5s --retries=3 \
|
||||||
CMD curl --fail --silent --show-error http://127.0.0.1:5000/api/version || exit 1
|
CMD test -f /dev/shm/.frigate-is-stopping && exit 0; curl --fail --silent --show-error http://127.0.0.1:5000/api/version || exit 1
|
||||||
|
|
||||||
# Frigate deps with Node.js and NPM for devcontainer
|
# Frigate deps with Node.js and NPM for devcontainer
|
||||||
FROM deps AS devcontainer
|
FROM deps AS devcontainer
|
||||||
|
@ -25,4 +25,7 @@ elif [[ "${exit_code_service}" -ne 0 ]]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# used by the docker healthcheck
|
||||||
|
touch /dev/shm/.frigate-is-stopping
|
||||||
|
|
||||||
exec /run/s6/basedir/bin/halt
|
exec /run/s6/basedir/bin/halt
|
||||||
|
@ -138,5 +138,9 @@ function migrate_db_from_media_to_config() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# remove leftover from last run, not normally needed, but just in case
|
||||||
|
# used by the docker healthcheck
|
||||||
|
rm -f /dev/shm/.frigate-is-stopping
|
||||||
|
|
||||||
migrate_addon_config_dir
|
migrate_addon_config_dir
|
||||||
migrate_db_from_media_to_config
|
migrate_db_from_media_to_config
|
||||||
|
Loading…
Reference in New Issue
Block a user