mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-04 23:17:20 +08:00
refactor: unify database readiness lifecycle
This commit is contained in:
+1
-1
@@ -262,5 +262,5 @@ COPY --link --from=prepare_backend /app /app
|
||||
|
||||
EXPOSE 3000
|
||||
VOLUME [ "${CONFIG_DIR}" ]
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=60s --retries=3 CMD /usr/bin/curl -fsS "http://127.0.0.1:${PORT:-3001}/api/v1/system/global?token=moviepilot" >/dev/null || exit 1
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=60s --retries=3 CMD /usr/bin/curl -fsS "http://127.0.0.1:${PORT:-3001}/health/ready" >/dev/null || exit 1
|
||||
ENTRYPOINT [ "/usr/bin/tini", "-g", "--", "/entrypoint.sh" ]
|
||||
|
||||
@@ -66,7 +66,7 @@ function wait_backend_ready() {
|
||||
local backend_port="${PORT:-3001}"
|
||||
local web_port="${NGINX_PORT:-3000}"
|
||||
local timeout="${MOVIEPILOT_BACKEND_READY_TIMEOUT:-300}"
|
||||
local ready_url="http://127.0.0.1:${backend_port}/api/v1/system/global?token=moviepilot"
|
||||
local ready_url="http://127.0.0.1:${backend_port}/health/ready"
|
||||
local deadline
|
||||
if ! [[ "${timeout}" =~ ^[0-9]+$ ]] || [ "$((10#${timeout}))" -le 0 ]; then
|
||||
WARN "→ MOVIEPILOT_BACKEND_READY_TIMEOUT=${timeout} 无效,使用默认 300 秒。"
|
||||
|
||||
Reference in New Issue
Block a user