1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2025-07-13 11:54:34 +00:00

Allow passing DHPARAM_BITS via env, lower bits to 256 for unit tests

This commit is contained in:
Steve Kamerman
2017-01-12 14:55:25 -05:00
parent dffc0c47cf
commit 7d253dd0f3
3 changed files with 10 additions and 5 deletions

View File

@ -1,10 +1,12 @@
#!/bin/bash -e
# The first argument is the bit depth of the dhparam, or 2048 if unspecified
DHPARAM_BITS=${1:-2048}
# If a dhparam file is not available, use the pre-generated one and generate a new one in the background.
# Note that /etc/nginx/dhparam is a volume, so this dhparam will persist restarts.
PREGEN_DHPARAM_FILE="/app/dhparam.pem.default"
DHPARAM_FILE="/etc/nginx/dhparam/dhparam.pem"
DHPARAM_BITS="2048"
GEN_LOCKFILE="/tmp/dhparam_generating.lock"
# The hash of the pregenerated dhparam file is used to check if the pregen dhparam is already in use