diff --git a/Dockerfile b/Dockerfile
index fcba1fc388..5fbacf2744 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -97,7 +97,6 @@ RUN mkdir -p /var/www/.npm && \
# Copy Apache site-available config files into the image.
COPY ./docker/cdash-site.conf /etc/apache2/sites-available/cdash-site.conf
-COPY ./docker/cdash-site-ssl.conf /etc/apache2/sites-available/cdash-site-ssl.conf
# Change apache config to listen on port 8080 instead of port 80
RUN sed -i 's/Listen 80/Listen 8080/g' /etc/apache2/ports.conf
@@ -111,8 +110,7 @@ RUN a2dissite 000-default && \
# Enable https site if we're not doing a development build.
RUN if [ "$DEVELOPMENT_BUILD" != '1' ]; then \
a2enmod ssl && \
- a2enmod socache_shmcb && \
- a2ensite cdash-site-ssl; \
+ a2enmod socache_shmcb; \
fi
# Assign www-data ownership of apache2 configuration files
@@ -316,6 +314,7 @@ ENTRYPOINT ["/bin/bash", "/cdash/docker/docker-entrypoint.sh"]
###############################################################################
FROM cdash-non-root-intermediate AS cdash
+HEALTHCHECK --interval=5s --timeout=1s CMD ["/bin/bash", "/cdash/docker/healthcheck.sh"]
CMD ["start-website"]
###############################################################################
diff --git a/docker/cdash-site-ssl.conf b/docker/cdash-site-ssl.conf
deleted file mode 100755
index eab2446e18..0000000000
--- a/docker/cdash-site-ssl.conf
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
- DocumentRoot "/cdash/public"
- ServerName localhost
- ErrorLog "/var/log/apache2/error.log"
- CustomLog "/var/log/apache2/access.log" combined
- SSLEngine on
- SSLCertificateFile /var/www/my-cert.pem
- SSLCertificateKeyFile /var/www/my-cert.key
-
- AllowOverride All
- Require all granted
-
-
-
diff --git a/docker/cdash-site.conf b/docker/cdash-site.conf
index 71604bfb25..04238dcf2c 100755
--- a/docker/cdash-site.conf
+++ b/docker/cdash-site.conf
@@ -1,10 +1,28 @@
-
-
- AllowOverride All
- Require all granted
-
- DocumentRoot "/cdash/public"
- ServerName localhost
- ErrorLog "/var/log/apache2/error.log"
- CustomLog "/var/log/apache2/access.log" common
-
+
+
+ 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
+
+ AllowOverride All
+ Require all granted
+
+
+
+
+
+
+ AllowOverride All
+ Require all granted
+
+ DocumentRoot "/cdash/public"
+ ServerName localhost
+ ErrorLog "/var/log/apache2/error.log"
+ CustomLog "/var/log/apache2/access.log" common
+
+
+
diff --git a/docker/docker-compose.production.yml b/docker/docker-compose.production.yml
index f850048feb..0b4c760c9c 100644
--- a/docker/docker-compose.production.yml
+++ b/docker/docker-compose.production.yml
@@ -3,10 +3,10 @@ services:
env_file:
- ../.env
ports:
- - 443:443
+ - 443:8080
volumes:
- - "${SSL_CERTIFICATE_FILE}:/var/www/my-cert.pem"
- - "${SSL_CERTIFICATE_KEY_FILE}:/var/www/my-cert.key"
+ - "${SSL_CERTIFICATE_FILE}:/var/www/cdash.pem"
+ - "${SSL_CERTIFICATE_KEY_FILE}:/var/www/cdash.key"
worker:
env_file:
- ../.env
diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml
index 5045a6a799..205f03147f 100644
--- a/docker/docker-compose.yml
+++ b/docker/docker-compose.yml
@@ -11,11 +11,6 @@ services:
BASE_IMAGE: ${BASE_IMAGE-debian}
environment:
DB_HOST: database
- healthcheck:
- test: curl -s -o /dev/null -w "%{http_code}" http://cdash:8080/ping | grep 200 > /dev/null
- interval: 5s
- timeout: 10s
- retries: 20
depends_on:
database:
condition: service_healthy
diff --git a/docker/healthcheck.sh b/docker/healthcheck.sh
new file mode 100644
index 0000000000..a09dbfb469
--- /dev/null
+++ b/docker/healthcheck.sh
@@ -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
diff --git a/docs/docker.md b/docs/docker.md
index 6abbbbd7c4..f0c64db352 100644
--- a/docs/docker.md
+++ b/docs/docker.md
@@ -67,8 +67,8 @@ To set up a CDash production instance using docker compose, follow these steps:
* `cp .env.example .env`
* Edit `.env` and modify the following lines:
- `APP_URL=https://`
- - `SSL_CERTIFICATE_FILE=`
- - `SSL_CERTIFICATE_KEY_FILE=`
+ - `SSL_CERTIFICATE_FILE=`
+ - `SSL_CERTIFICATE_KEY_FILE=`
- `NUM_WORKERS=`
* For postgres only, edit `docker/docker-compose.postgres.yml` and uncomment the `worker` section.
* Run this command to start your CDash containers: