mirror of
https://github.com/nginx-proxy/docker-letsencrypt-nginx-proxy-companion
synced 2024-11-23 09:12:15 +01:00
Use a pregenerated dhparam.pem for tests
Letting the LE container generate its 2048 bits dhparam can consume up to five minutes.
This commit is contained in:
parent
c6eead0b44
commit
3d1ee4ee0b
8
test/setup/dhparam.pem
Normal file
8
test/setup/dhparam.pem
Normal file
@ -0,0 +1,8 @@
|
||||
-----BEGIN DH PARAMETERS-----
|
||||
MIIBCAKCAQEAzB2nIGzpVq7afJnKBm1X0d64avwOlP2oneiKwxRHdDI/5+6TpH1P
|
||||
F8ipodGuZBUMmupoB3D34pu2Qq5boNW983sm18ww9LMz2i/pxhSdB+mYAew+A6h6
|
||||
ltQ5pNtyn4NaKw1SDFkqvde3GNPhaWoPDbZDJhpHGblR3w1b/ag+lTLZUvVwcD8L
|
||||
jYS9f9YWAC6T7WxAxh4zvu1Z0I1EKde8KYBxrreZNheXpXHqMNyJYZCaY2Hb/4oI
|
||||
EL65qZq1GCWezpWMjhk6pOnV5gbvqfhoazCv/4OdRv6RoWOIYBNs9BmGho4AtXqV
|
||||
FYLdYDhOvN4aVs9Ir+G8ouwiRnix24+UewIBAg==
|
||||
-----END DH PARAMETERS-----
|
@ -39,3 +39,7 @@ case $SETUP in
|
||||
exit 1
|
||||
|
||||
esac
|
||||
|
||||
docker run --name helper --volumes-from $NGINX_CONTAINER_NAME busybox true
|
||||
docker cp ${TRAVIS_BUILD_DIR}/test/setup/dhparam.pem helper:/etc/nginx/certs
|
||||
docker rm -f helper
|
||||
|
@ -24,24 +24,6 @@ function run_le_container {
|
||||
}
|
||||
export -f run_le_container
|
||||
|
||||
# Wait for the /etc/nginx/certs/dhparam.pem file to exist in container $1
|
||||
function wait_for_dhparam {
|
||||
local name="${1:?}"
|
||||
local i=0
|
||||
sleep 1
|
||||
echo -n "Waiting for the $name container to generate a DH parameters file, this might take a while..."
|
||||
until docker exec "$name" [ -f /etc/nginx/certs/dhparam.pem ]; do
|
||||
if [ $i -gt 600 ]; then
|
||||
echo "DH parameters file was not generated under ten minutes by the $name container, timing out."
|
||||
exit 1
|
||||
fi
|
||||
i=$((i + 5))
|
||||
sleep 5
|
||||
done
|
||||
echo "Done."
|
||||
}
|
||||
export -f wait_for_dhparam
|
||||
|
||||
# Wait for the /etc/nginx/certs/$1/cert.pem file to exist inside container $2
|
||||
function wait_for_cert {
|
||||
local domain="${1:?}"
|
||||
|
Loading…
Reference in New Issue
Block a user