Skip to content

Commit

Permalink
feat(entrypoint): allow defining worker_processes (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChandonPierre authored Dec 27, 2023
1 parent cd0cbc6 commit f6e79f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ ENV DEBUG_HUB="false"
ENV DEBUG_NGINX="false"
# Enable slow caching tier; this allows caching in a secondary cache path on e.g a larger slower disk; for known URIs defined in SLOW_TIER_URIS
ENV SLOW_TIER_ENABLED="false"
# Statically define worker_processes; defaults to auto
ENV WORKER_PROCESSES="auto"

# Manifest caching tiers. Disabled by default, to mimick 0.4/0.5 behaviour.
# Setting it to true enables the processing of the ENVs below.
Expand Down
3 changes: 3 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,9 @@ else
echo "Upstream SSL certificate verification is DISABLED."
fi

# Set worker processes if provided
sed -i "s/worker_processes auto;/worker_processes ${WORKER_PROCESSES};/g" /etc/nginx/nginx.conf

echo "Testing nginx config..."
${NGINX_BIN} -t

Expand Down

0 comments on commit f6e79f2

Please sign in to comment.