mirror of
https://github.com/yusing/godoxy.git
synced 2026-01-14 15:43:37 +01:00
[PR #34] [MERGED] feat: Add optional StartEndpoint support for idle watcher #144
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/yusing/godoxy/pull/34
Author: @polds
Created: 1/8/2025
Status: ✅ Merged
Merged: 1/8/2025
Merged by: @yusing
Base:
v0.8← Head:feat/idle-watcher-path📝 Commits (1)
c6a37ccfeat: Add optional StartEndpoint support for idle watcher📊 Changes
5 files changed (+116 additions, -37 deletions)
View changed files
📝
internal/docker/container.go(+22 -20)📝
internal/docker/idlewatcher/types/config.go(+33 -10)➕
internal/docker/idlewatcher/types/config_test.go(+47 -0)📝
internal/docker/idlewatcher/waker_http.go(+6 -0)📝
internal/docker/labels.go(+8 -7)📄 Description
Optionally allow a user to specify a “warm-up” endpoint to start the container, returning a 403 if the endpoint isn’t hit and the container has been stopped.
This can help prevent bots from starting random containers, or allow health check systems to run some probes. Or potentially lock the start endpoints behind a different authentication mechanism, etc.
Sample service showing this:
Hitting
/on this service when the container is down:Hitting
/startwhen the container is down:🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.