mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-08 08:32:16 +01:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
030b358b0e | ||
|
|
4b1791d35c |
11
Makefile
11
Makefile
@@ -29,9 +29,7 @@ build: ## Build the Gotenberg's Docker image
|
|||||||
GOTENBERG_GRACEFUL_SHUTDOWN_DURATION=30s
|
GOTENBERG_GRACEFUL_SHUTDOWN_DURATION=30s
|
||||||
API_PORT=3000
|
API_PORT=3000
|
||||||
API_PORT_FROM_ENV=
|
API_PORT_FROM_ENV=
|
||||||
API_READ_TIMEOUT=30s
|
API_TIMEOUT=30s
|
||||||
API_PROCESS_TIMEOUT=30s
|
|
||||||
API_WRITE_TIMEOUT=30s
|
|
||||||
API_ROOT_PATH=/
|
API_ROOT_PATH=/
|
||||||
API_TRACE_HEADER=Gotenberg-Trace
|
API_TRACE_HEADER=Gotenberg-Trace
|
||||||
API_DISABLE_HEALTH_CHECK_LOGGING=false
|
API_DISABLE_HEALTH_CHECK_LOGGING=false
|
||||||
@@ -61,6 +59,7 @@ WEBHOOK_ERROR_DENY_LIST=
|
|||||||
WEBHOOK_MAX_RETRY=4
|
WEBHOOK_MAX_RETRY=4
|
||||||
WEBHOOK_RETRY_MIN_WAIT=1s
|
WEBHOOK_RETRY_MIN_WAIT=1s
|
||||||
WEBHOOK_RETRY_MAX_WAIT=30s
|
WEBHOOK_RETRY_MAX_WAIT=30s
|
||||||
|
WEBHOOK_CLIENT_TIMEOUT=30s
|
||||||
WEBHOOK_DISABLE=false
|
WEBHOOK_DISABLE=false
|
||||||
|
|
||||||
.PHONY: run
|
.PHONY: run
|
||||||
@@ -72,9 +71,7 @@ run: ## Start a Gotenberg container
|
|||||||
--gotenberg-graceful-shutdown-duration=$(GOTENBERG_GRACEFUL_SHUTDOWN_DURATION) \
|
--gotenberg-graceful-shutdown-duration=$(GOTENBERG_GRACEFUL_SHUTDOWN_DURATION) \
|
||||||
--api-port=$(API_PORT) \
|
--api-port=$(API_PORT) \
|
||||||
--api-port-from-env=$(API_PORT_FROM_ENV) \
|
--api-port-from-env=$(API_PORT_FROM_ENV) \
|
||||||
--api-read-timeout=$(API_READ_TIMEOUT) \
|
--api-timeout=$(API_TIMEOUT) \
|
||||||
--api-process-timeout=$(API_PROCESS_TIMEOUT) \
|
|
||||||
--api-write-timeout=$(API_WRITE_TIMEOUT) \
|
|
||||||
--api-root-path=$(API_ROOT_PATH) \
|
--api-root-path=$(API_ROOT_PATH) \
|
||||||
--api-trace-header=$(API_TRACE_HEADER) \
|
--api-trace-header=$(API_TRACE_HEADER) \
|
||||||
--api-disable-health-check-logging=$(API_DISABLE_HEALTH_CHECK_LOGGING) \
|
--api-disable-health-check-logging=$(API_DISABLE_HEALTH_CHECK_LOGGING) \
|
||||||
@@ -104,6 +101,7 @@ run: ## Start a Gotenberg container
|
|||||||
--webhook-max-retry=$(WEBHOOK_MAX_RETRY) \
|
--webhook-max-retry=$(WEBHOOK_MAX_RETRY) \
|
||||||
--webhook-retry-min-wait=$(WEBHOOK_RETRY_MIN_WAIT) \
|
--webhook-retry-min-wait=$(WEBHOOK_RETRY_MIN_WAIT) \
|
||||||
--webhook-retry-max-wait=$(WEBHOOK_RETRY_MAX_WAIT) \
|
--webhook-retry-max-wait=$(WEBHOOK_RETRY_MAX_WAIT) \
|
||||||
|
--webhook-client-timeout=$(WEBHOOK_CLIENT_TIMEOUT) \
|
||||||
--webhook-disable=$(WEBHOOK_DISABLE)
|
--webhook-disable=$(WEBHOOK_DISABLE)
|
||||||
|
|
||||||
.PHONY: build-tests
|
.PHONY: build-tests
|
||||||
@@ -147,5 +145,6 @@ release: ## Build the Gotenberg's Docker image for many platforms, then push it
|
|||||||
$(GOTENBERG_VERSION) \
|
$(GOTENBERG_VERSION) \
|
||||||
$(GOTENBERG_USER_GID) \
|
$(GOTENBERG_USER_GID) \
|
||||||
$(GOTENBERG_USER_UID) \
|
$(GOTENBERG_USER_UID) \
|
||||||
|
$(NOTO_COLOR_EMOJI_VERSION) \
|
||||||
$(PDFTK_VERSION) \
|
$(PDFTK_VERSION) \
|
||||||
$(DOCKER_REPOSITORY)
|
$(DOCKER_REPOSITORY)
|
||||||
|
|||||||
@@ -30,8 +30,8 @@ func init() {
|
|||||||
type API struct {
|
type API struct {
|
||||||
port int
|
port int
|
||||||
readTimeout time.Duration
|
readTimeout time.Duration
|
||||||
processTimeout time.Duration
|
|
||||||
writeTimeout time.Duration
|
writeTimeout time.Duration
|
||||||
|
timeout time.Duration
|
||||||
rootPath string
|
rootPath string
|
||||||
traceHeader string
|
traceHeader string
|
||||||
disableHealthCheckLogging bool
|
disableHealthCheckLogging bool
|
||||||
@@ -166,10 +166,20 @@ func (API) Descriptor() gotenberg.ModuleDescriptor {
|
|||||||
fs.Duration("api-read-timeout", time.Duration(30)*time.Second, "Set the maximum duration allowed to read a complete request, including the body")
|
fs.Duration("api-read-timeout", time.Duration(30)*time.Second, "Set the maximum duration allowed to read a complete request, including the body")
|
||||||
fs.Duration("api-process-timeout", time.Duration(30)*time.Second, "Set the maximum duration allowed to process a request")
|
fs.Duration("api-process-timeout", time.Duration(30)*time.Second, "Set the maximum duration allowed to process a request")
|
||||||
fs.Duration("api-write-timeout", time.Duration(30)*time.Second, "Set the maximum duration before timing out writes of the response")
|
fs.Duration("api-write-timeout", time.Duration(30)*time.Second, "Set the maximum duration before timing out writes of the response")
|
||||||
|
fs.Duration("api-timeout", time.Duration(30)*time.Second, "Set the time limit for requests")
|
||||||
fs.String("api-root-path", "/", "Set the root path of the API - for service discovery via URL paths")
|
fs.String("api-root-path", "/", "Set the root path of the API - for service discovery via URL paths")
|
||||||
fs.String("api-trace-header", "Gotenberg-Trace", "Set the header name to use for identifying requests")
|
fs.String("api-trace-header", "Gotenberg-Trace", "Set the header name to use for identifying requests")
|
||||||
fs.Bool("api-disable-health-check-logging", false, "Disable health check logging")
|
fs.Bool("api-disable-health-check-logging", false, "Disable health check logging")
|
||||||
|
|
||||||
|
var err error
|
||||||
|
err = multierr.Append(err, fs.MarkDeprecated("api-read-timeout", "use api-timeout instead"))
|
||||||
|
err = multierr.Append(err, fs.MarkDeprecated("api-process-timeout", "use api-timeout instead"))
|
||||||
|
err = multierr.Append(err, fs.MarkDeprecated("api-write-timeout", "use api-timeout instead"))
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
panic(fmt.Errorf("create deprecated flags for the api module: %v", err))
|
||||||
|
}
|
||||||
|
|
||||||
return fs
|
return fs
|
||||||
}(),
|
}(),
|
||||||
New: func() gotenberg.Module { return new(API) },
|
New: func() gotenberg.Module { return new(API) },
|
||||||
@@ -180,9 +190,9 @@ func (API) Descriptor() gotenberg.ModuleDescriptor {
|
|||||||
func (a *API) Provision(ctx *gotenberg.Context) error {
|
func (a *API) Provision(ctx *gotenberg.Context) error {
|
||||||
flags := ctx.ParsedFlags()
|
flags := ctx.ParsedFlags()
|
||||||
a.port = flags.MustInt("api-port")
|
a.port = flags.MustInt("api-port")
|
||||||
a.readTimeout = flags.MustDuration("api-read-timeout")
|
a.readTimeout = flags.MustDeprecatedDuration("api-read-timeout", "api-timeout")
|
||||||
a.processTimeout = flags.MustDuration("api-process-timeout")
|
a.writeTimeout = flags.MustDeprecatedDuration("api-write-timeout", "api-timeout")
|
||||||
a.writeTimeout = flags.MustDuration("api-write-timeout")
|
a.timeout = flags.MustDeprecatedDuration("api-process-timeout", "api-timeout")
|
||||||
a.rootPath = flags.MustString("api-root-path")
|
a.rootPath = flags.MustString("api-root-path")
|
||||||
a.traceHeader = flags.MustString("api-trace-header")
|
a.traceHeader = flags.MustString("api-trace-header")
|
||||||
a.disableHealthCheckLogging = flags.MustBool("api-disable-health-check-logging")
|
a.disableHealthCheckLogging = flags.MustBool("api-disable-health-check-logging")
|
||||||
@@ -274,7 +284,7 @@ func (a *API) Provision(ctx *gotenberg.Context) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Grace duration.
|
// Grace duration.
|
||||||
a.gcGraceDuration = a.readTimeout + a.processTimeout + a.writeTimeout
|
a.gcGraceDuration = a.timeout
|
||||||
|
|
||||||
mods, err = ctx.Modules(new(GarbageCollectorGraceDurationIncrementer))
|
mods, err = ctx.Modules(new(GarbageCollectorGraceDurationIncrementer))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -378,7 +388,9 @@ func (a *API) Start() error {
|
|||||||
a.srv.HideBanner = true
|
a.srv.HideBanner = true
|
||||||
a.srv.HidePort = true
|
a.srv.HidePort = true
|
||||||
a.srv.Server.ReadTimeout = a.readTimeout
|
a.srv.Server.ReadTimeout = a.readTimeout
|
||||||
a.srv.Server.WriteTimeout = a.writeTimeout
|
a.srv.Server.IdleTimeout = a.timeout
|
||||||
|
// See https://github.com/gotenberg/gotenberg/issues/396.
|
||||||
|
a.srv.Server.WriteTimeout = a.writeTimeout + a.writeTimeout
|
||||||
a.srv.HTTPErrorHandler = httpErrorHandler()
|
a.srv.HTTPErrorHandler = httpErrorHandler()
|
||||||
|
|
||||||
// Let's prepare the modules' routes.
|
// Let's prepare the modules' routes.
|
||||||
@@ -402,7 +414,6 @@ func (a *API) Start() error {
|
|||||||
latencyMiddleware(),
|
latencyMiddleware(),
|
||||||
rootPathMiddleware(a.rootPath),
|
rootPathMiddleware(a.rootPath),
|
||||||
traceMiddleware(a.traceHeader),
|
traceMiddleware(a.traceHeader),
|
||||||
timeoutsMiddleware(a.readTimeout, a.processTimeout, a.writeTimeout),
|
|
||||||
loggerMiddleware(a.logger, disableLoggingForPaths),
|
loggerMiddleware(a.logger, disableLoggingForPaths),
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -419,14 +430,14 @@ func (a *API) Start() error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hardTimeout := a.processTimeout + (time.Duration(5) * time.Second)
|
hardTimeout := a.timeout + (time.Duration(5) * time.Second)
|
||||||
|
|
||||||
// Add the modules' routes and their specific middlewares.
|
// Add the modules' routes and their specific middlewares.
|
||||||
for _, route := range a.routes {
|
for _, route := range a.routes {
|
||||||
var middlewares []echo.MiddlewareFunc
|
var middlewares []echo.MiddlewareFunc
|
||||||
|
|
||||||
if route.IsMultipart {
|
if route.IsMultipart {
|
||||||
middlewares = append(middlewares, contextMiddleware(a.processTimeout))
|
middlewares = append(middlewares, contextMiddleware(a.timeout))
|
||||||
|
|
||||||
for _, externalMultipartMiddleware := range externalMultipartMiddlewares {
|
for _, externalMultipartMiddleware := range externalMultipartMiddlewares {
|
||||||
middlewares = append(middlewares, externalMultipartMiddleware.Handler)
|
middlewares = append(middlewares, externalMultipartMiddleware.Handler)
|
||||||
@@ -447,7 +458,7 @@ func (a *API) Start() error {
|
|||||||
a.srv.GET(
|
a.srv.GET(
|
||||||
fmt.Sprintf("%s%s", a.rootPath, "health"),
|
fmt.Sprintf("%s%s", a.rootPath, "health"),
|
||||||
func() echo.HandlerFunc {
|
func() echo.HandlerFunc {
|
||||||
checks := append(a.healthChecks, health.WithTimeout(a.processTimeout))
|
checks := append(a.healthChecks, health.WithTimeout(a.timeout))
|
||||||
checker := health.NewChecker(checks...)
|
checker := health.NewChecker(checks...)
|
||||||
|
|
||||||
return echo.WrapHandler(health.NewHandler(checker))
|
return echo.WrapHandler(health.NewHandler(checker))
|
||||||
|
|||||||
@@ -386,7 +386,7 @@ func TestAPI_Provision(t *testing.T) {
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
}(),
|
}(),
|
||||||
expectGraceDuration: time.Duration(93) * time.Second,
|
expectGraceDuration: time.Duration(33) * time.Second,
|
||||||
expectErr: true,
|
expectErr: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -120,25 +120,6 @@ func traceMiddleware(header string) echo.MiddlewareFunc {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// timeoutsMiddleware sets the read, process and write timeouts in the
|
|
||||||
// echo.Context under "readTimeout", "processTimeout" and "writeTimeout".
|
|
||||||
//
|
|
||||||
// readTimeout := c.Get("readTimeout").(time.Duration)
|
|
||||||
// processTimeout := c.Get("processTimeout").(time.Duration)
|
|
||||||
// writeTimeout := c.Get("writeTimeout").(time.Duration)
|
|
||||||
func timeoutsMiddleware(readTimeout, processTimeout, writeTimeout time.Duration) echo.MiddlewareFunc {
|
|
||||||
return func(next echo.HandlerFunc) echo.HandlerFunc {
|
|
||||||
return func(c echo.Context) error {
|
|
||||||
c.Set("readTimeout", readTimeout)
|
|
||||||
c.Set("processTimeout", processTimeout)
|
|
||||||
c.Set("writeTimeout", writeTimeout)
|
|
||||||
|
|
||||||
// Call the next middleware in the chain.
|
|
||||||
return next(c)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// loggerMiddleware sets the logger in the echo.Context under "logger" and logs
|
// loggerMiddleware sets the logger in the echo.Context under "logger" and logs
|
||||||
// a synchronous request result.
|
// a synchronous request result.
|
||||||
//
|
//
|
||||||
@@ -218,14 +199,14 @@ func loggerMiddleware(logger *zap.Logger, disableLoggingForPaths []string) echo.
|
|||||||
//
|
//
|
||||||
// ctx := c.Get("context").(*api.Context)
|
// ctx := c.Get("context").(*api.Context)
|
||||||
// cancel := c.Get("cancel").(context.CancelFunc)
|
// cancel := c.Get("cancel").(context.CancelFunc)
|
||||||
func contextMiddleware(processTimeout time.Duration) echo.MiddlewareFunc {
|
func contextMiddleware(timeout time.Duration) echo.MiddlewareFunc {
|
||||||
return func(next echo.HandlerFunc) echo.HandlerFunc {
|
return func(next echo.HandlerFunc) echo.HandlerFunc {
|
||||||
return func(c echo.Context) error {
|
return func(c echo.Context) error {
|
||||||
logger := c.Get("logger").(*zap.Logger)
|
logger := c.Get("logger").(*zap.Logger)
|
||||||
|
|
||||||
// We create a context with a timeout so that underlying processes are
|
// We create a context with a timeout so that underlying processes are
|
||||||
// able to stop early and handle correctly a timeout scenario.
|
// able to stop early and handle correctly a timeout scenario.
|
||||||
ctx, cancel, err := newContext(c, logger, processTimeout)
|
ctx, cancel, err := newContext(c, logger, timeout)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
cancel()
|
cancel()
|
||||||
|
|
||||||
|
|||||||
@@ -222,47 +222,6 @@ func TestTraceMiddleware(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestTimeoutsMiddleware(t *testing.T) {
|
|
||||||
recorder := httptest.NewRecorder()
|
|
||||||
request := httptest.NewRequest(http.MethodGet, "/foo", nil)
|
|
||||||
|
|
||||||
srv := echo.New()
|
|
||||||
srv.HideBanner = true
|
|
||||||
srv.HidePort = true
|
|
||||||
|
|
||||||
c := srv.NewContext(request, recorder)
|
|
||||||
|
|
||||||
expectReadTimeout := time.Duration(1) * time.Second
|
|
||||||
expectProcessTimeout := time.Duration(2) * time.Second
|
|
||||||
expectWriteTimeout := time.Duration(3) * time.Second
|
|
||||||
|
|
||||||
err := timeoutsMiddleware(expectReadTimeout, expectProcessTimeout, expectWriteTimeout)(
|
|
||||||
func(c echo.Context) error {
|
|
||||||
return nil
|
|
||||||
},
|
|
||||||
)(c)
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
t.Fatalf("expected no error but got: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
actualReadTimeout := c.Get("readTimeout").(time.Duration)
|
|
||||||
actualProcessTimeout := c.Get("processTimeout").(time.Duration)
|
|
||||||
actualWriteTimeout := c.Get("writeTimeout").(time.Duration)
|
|
||||||
|
|
||||||
if actualReadTimeout != expectReadTimeout {
|
|
||||||
t.Errorf("expected '%s' but got '%s", expectReadTimeout, actualReadTimeout)
|
|
||||||
}
|
|
||||||
|
|
||||||
if actualProcessTimeout != expectProcessTimeout {
|
|
||||||
t.Errorf("expected '%s' but got '%s", expectProcessTimeout, actualProcessTimeout)
|
|
||||||
}
|
|
||||||
|
|
||||||
if actualWriteTimeout != expectWriteTimeout {
|
|
||||||
t.Errorf("expected '%s' but got '%s", actualWriteTimeout, expectWriteTimeout)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestLoggerMiddleware(t *testing.T) {
|
func TestLoggerMiddleware(t *testing.T) {
|
||||||
for i, tc := range []struct {
|
for i, tc := range []struct {
|
||||||
request *http.Request
|
request *http.Request
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ func webhookMiddleware(w Webhook) api.Middleware {
|
|||||||
|
|
||||||
client: &retryablehttp.Client{
|
client: &retryablehttp.Client{
|
||||||
HTTPClient: &http.Client{
|
HTTPClient: &http.Client{
|
||||||
Timeout: c.Get("writeTimeout").(time.Duration),
|
Timeout: w.clientTimeout,
|
||||||
},
|
},
|
||||||
RetryMax: w.maxRetry,
|
RetryMax: w.maxRetry,
|
||||||
RetryWaitMin: w.retryMinWait,
|
RetryWaitMin: w.retryMinWait,
|
||||||
|
|||||||
@@ -324,6 +324,7 @@ func TestWebhookMiddlewareAsynchronousProcess(t *testing.T) {
|
|||||||
maxRetry: 0,
|
maxRetry: 0,
|
||||||
retryMinWait: 0,
|
retryMinWait: 0,
|
||||||
retryMaxWait: 0,
|
retryMaxWait: 0,
|
||||||
|
clientTimeout: time.Duration(30) * time.Second,
|
||||||
disable: false,
|
disable: false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -397,7 +398,6 @@ func TestWebhookMiddlewareAsynchronousProcess(t *testing.T) {
|
|||||||
c.Set("traceHeader", "Gotenberg-Trace")
|
c.Set("traceHeader", "Gotenberg-Trace")
|
||||||
c.Set("trace", "foo")
|
c.Set("trace", "foo")
|
||||||
c.Set("startTime", time.Now())
|
c.Set("startTime", time.Now())
|
||||||
c.Set("writeTimeout", time.Duration(10)*time.Second)
|
|
||||||
|
|
||||||
ctx := &api.MockContext{Context: &api.Context{}}
|
ctx := &api.MockContext{Context: &api.Context{}}
|
||||||
ctx.SetLogger(zap.NewNop())
|
ctx.SetLogger(zap.NewNop())
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ type Webhook struct {
|
|||||||
maxRetry int
|
maxRetry int
|
||||||
retryMinWait time.Duration
|
retryMinWait time.Duration
|
||||||
retryMaxWait time.Duration
|
retryMaxWait time.Duration
|
||||||
|
clientTimeout time.Duration
|
||||||
disable bool
|
disable bool
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -55,7 +56,7 @@ func (Webhook) Descriptor() gotenberg.ModuleDescriptor {
|
|||||||
err = multierr.Append(err, fs.MarkDeprecated("api-disable-webhook", "use webhook-disable instead"))
|
err = multierr.Append(err, fs.MarkDeprecated("api-disable-webhook", "use webhook-disable instead"))
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(fmt.Errorf("create deprecated flags for webhook module: %v", err))
|
panic(fmt.Errorf("create deprecated flags for the webhook module: %v", err))
|
||||||
}
|
}
|
||||||
|
|
||||||
// New flags.
|
// New flags.
|
||||||
@@ -66,6 +67,7 @@ func (Webhook) Descriptor() gotenberg.ModuleDescriptor {
|
|||||||
fs.Int("webhook-max-retry", 4, "Set the maximum number of retries for the webhook feature")
|
fs.Int("webhook-max-retry", 4, "Set the maximum number of retries for the webhook feature")
|
||||||
fs.Duration("webhook-retry-min-wait", time.Duration(1)*time.Second, "Set the minimum duration to wait before trying to call the webhook again")
|
fs.Duration("webhook-retry-min-wait", time.Duration(1)*time.Second, "Set the minimum duration to wait before trying to call the webhook again")
|
||||||
fs.Duration("webhook-retry-max-wait", time.Duration(30)*time.Second, "Set the maximum duration to wait before trying to call the webhook again")
|
fs.Duration("webhook-retry-max-wait", time.Duration(30)*time.Second, "Set the maximum duration to wait before trying to call the webhook again")
|
||||||
|
fs.Duration("webhook-client-timeout", time.Duration(30)*time.Second, "Set the time limit for requests to the webhook")
|
||||||
fs.Bool("webhook-disable", false, "Disable the webhook feature")
|
fs.Bool("webhook-disable", false, "Disable the webhook feature")
|
||||||
|
|
||||||
return fs
|
return fs
|
||||||
@@ -84,6 +86,7 @@ func (w *Webhook) Provision(ctx *gotenberg.Context) error {
|
|||||||
w.maxRetry = flags.MustDeprecatedInt("api-webhook-max-retry", "webhook-max-retry")
|
w.maxRetry = flags.MustDeprecatedInt("api-webhook-max-retry", "webhook-max-retry")
|
||||||
w.retryMinWait = flags.MustDeprecatedDuration("api-webhook-retry-min-wait", "webhook-retry-min-wait")
|
w.retryMinWait = flags.MustDeprecatedDuration("api-webhook-retry-min-wait", "webhook-retry-min-wait")
|
||||||
w.retryMaxWait = flags.MustDeprecatedDuration("api-webhook-retry-min-wait", "webhook-retry-max-wait")
|
w.retryMaxWait = flags.MustDeprecatedDuration("api-webhook-retry-min-wait", "webhook-retry-max-wait")
|
||||||
|
w.clientTimeout = flags.MustDuration("webhook-client-timeout")
|
||||||
w.disable = flags.MustDeprecatedBool("api-disable-webhook", "webhook-disable")
|
w.disable = flags.MustDeprecatedBool("api-disable-webhook", "webhook-disable")
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
@@ -6,8 +6,9 @@ GOLANG_VERSION="$1"
|
|||||||
GOTENBERG_VERSION="$2"
|
GOTENBERG_VERSION="$2"
|
||||||
GOTENBERG_USER_GID="$3"
|
GOTENBERG_USER_GID="$3"
|
||||||
GOTENBERG_USER_UID="$4"
|
GOTENBERG_USER_UID="$4"
|
||||||
PDFTK_VERSION="$5"
|
NOTO_COLOR_EMOJI_VERSION="$5"
|
||||||
DOCKER_REPOSITORY="$6"
|
PDFTK_VERSION="$6"
|
||||||
|
DOCKER_REPOSITORY="$7"
|
||||||
|
|
||||||
GOTENBERG_VERSION="${GOTENBERG_VERSION//v}"
|
GOTENBERG_VERSION="${GOTENBERG_VERSION//v}"
|
||||||
SEMVER=( ${GOTENBERG_VERSION//./ } )
|
SEMVER=( ${GOTENBERG_VERSION//./ } )
|
||||||
@@ -23,6 +24,7 @@ docker buildx build \
|
|||||||
--build-arg GOTENBERG_VERSION="$GOTENBERG_VERSION" \
|
--build-arg GOTENBERG_VERSION="$GOTENBERG_VERSION" \
|
||||||
--build-arg GOTENBERG_USER_GID="$GOTENBERG_USER_GID" \
|
--build-arg GOTENBERG_USER_GID="$GOTENBERG_USER_GID" \
|
||||||
--build-arg GOTENBERG_USER_UID="$GOTENBERG_USER_UID" \
|
--build-arg GOTENBERG_USER_UID="$GOTENBERG_USER_UID" \
|
||||||
|
--build-arg NOTO_COLOR_EMOJI_VERSION="$NOTO_COLOR_EMOJI_VERSION" \
|
||||||
--build-arg PDFTK_VERSION="$PDFTK_VERSION" \
|
--build-arg PDFTK_VERSION="$PDFTK_VERSION" \
|
||||||
--platform linux/amd64 \
|
--platform linux/amd64 \
|
||||||
--platform linux/arm64 \
|
--platform linux/arm64 \
|
||||||
|
|||||||
Reference in New Issue
Block a user