Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Commit

Permalink
Ensure WORKERS is respected in syntect server image as env var (#59018)
Browse files Browse the repository at this point in the history
  • Loading branch information
daxmc99 authored Dec 15, 2023
1 parent 474813e commit e5e62a0
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions docker-images/syntax-highlighter/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,22 @@ oci_image(
name = "image",
base = "@wolfi_syntax_highlighter_base",
entrypoint = [
"/usr/local/bin/http-server-stabilizer",
"-listen=:9238",
"-prometheus-app-name=syntax_highlighter",
# The more workers, the more resilient syntect_server is to getting stuck on
# bad grammar/file combinations. If it happens with four workers, only 1/4th of
# requests will be affected for a short period of time. Each worker can require
# at peak around 1.1 GiB of memory.
"-workers=4",
"--",
"env",
"ROCKET_PORT={{.Port}}", # {{.Port}} is a templated variable used by http-server-stabilizer
"/syntect_server",
"/bin/sh",
"-c",
" ".join([
"/usr/local/bin/http-server-stabilizer",
"-listen=:9238",
"-prometheus-app-name=syntax_highlighter",
# The more workers, the more resilient syntect_server is to getting stuck on
# bad grammar/file combinations. If it happens with four workers, only 1/4th of
# requests will be affected for a short period of time. Each worker can require
# at peak around 1.1 GiB of memory.
"-workers=$WORKERS",
"--",
"env",
"ROCKET_PORT={{.Port}}", # {{.Port}} is a templated variable used by http-server-stabilizer
"/syntect_server",
]),
],
env = {
"ROCKET_ENV": "production",
Expand Down

0 comments on commit e5e62a0

Please sign in to comment.