-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The Nginx generates a TLS Certificate on every start if there is the environment variable is not set. You can add your own certificate by mounting it to /etc/nginx/ssl/ and setting GENERATE_TLS_CERTIFICATE to false. You can activate the TLS configuration fo nginx with the environment variable USE_TLS. Hardening on the TLS Configuration of nginx. * Generate TLS Certificate * add TLS1.3 * add Docker.md and link into nginx conf * change Default Values and Docker.md
- Loading branch information
Showing
6 changed files
with
60 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,23 @@ | ||
#!/bin/sh | ||
#!/bin/bash | ||
|
||
umask 0002 | ||
if [ "${GENERATE_TLS_CERTIFICATE}" == "True" ] | ||
then | ||
openssl req \ | ||
-x509 \ | ||
-nodes \ | ||
-days 365 \ | ||
-newkey rsa:4096 \ | ||
-keyout /etc/nginx/ssl/nginx.key \ | ||
-out /etc/nginx/ssl/nginx.crt \ | ||
-subj "/C=DE/ST=City/L=City/O=Global Security/OU=IT Department/CN=nginx" | ||
|
||
fi | ||
echo "uwsgi_pass ${DD_UWSGI_PASS};" > /run/uwsgi_pass | ||
echo "server ${DD_UWSGI_HOST}:${DD_UWSGI_PORT};" > /run/uwsgi_server | ||
exec nginx -g "daemon off;" | ||
if [ "${USE_TLS}" == "True" ] | ||
then | ||
exec nginx -c /etc/nginx/nginx_TLS.conf -g "daemon off;" | ||
else | ||
exec nginx -g "daemon off;" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters