-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify Docker SSL handling (#2227)
CDash currently requires SSL/TLS by default when using our production image. While useful for Docker Compose-based systems, this is a major pain point for k8s systems which handle TLS termination at ingress. See #2179, for example. This PR aims to ease these pains by conditionally enabling SSL/TLS if certificates are provided, in preparation for upcoming work to better support k8s-based deployments. Fixes #2179. --------- Co-authored-by: Zack Galbreath <zack.galbreath@kitware.com>
- Loading branch information
1 parent
c807a63
commit 4bdca5b
Showing
7 changed files
with
42 additions
and
38 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 was deleted.
Oops, something went wrong.
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,10 +1,28 @@ | ||
<VirtualHost *:8080> | ||
<Directory "/cdash/public"> | ||
AllowOverride All | ||
Require all granted | ||
</Directory> | ||
DocumentRoot "/cdash/public" | ||
ServerName localhost | ||
ErrorLog "/var/log/apache2/error.log" | ||
CustomLog "/var/log/apache2/access.log" common | ||
</VirtualHost> | ||
<IfFile "/var/www/cdash.pem"> | ||
<VirtualHost *:8080> | ||
DocumentRoot "/cdash/public" | ||
ServerName localhost | ||
ErrorLog "/var/log/apache2/error.log" | ||
CustomLog "/var/log/apache2/access.log" combined | ||
SSLEngine on | ||
SSLCertificateFile /var/www/cdash.pem | ||
SSLCertificateKeyFile /var/www/cdash.key | ||
<Directory "/cdash/public"> | ||
AllowOverride All | ||
Require all granted | ||
</Directory> | ||
</VirtualHost> | ||
</IfFile> | ||
<IfFile !"/var/www/cdash.pem"> | ||
<VirtualHost *:8080> | ||
<Directory "/cdash/public"> | ||
AllowOverride All | ||
Require all granted | ||
</Directory> | ||
DocumentRoot "/cdash/public" | ||
ServerName localhost | ||
ErrorLog "/var/log/apache2/error.log" | ||
CustomLog "/var/log/apache2/access.log" common | ||
</VirtualHost> | ||
</IfFile> | ||
|
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Ping both the http and https routes, and fail if neither of them is successful | ||
curl -s -o /dev/null -w "%{http_code}" http://cdash:8080/ping | grep 200 > /dev/null || \ | ||
curl -s -o /dev/null -w "%{http_code}" https://cdash:8080/ping | grep 200 > /dev/null || exit 1 |
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