From 438207df22ec11960a5c9af5d20177abedefa503 Mon Sep 17 00:00:00 2001 From: kmaxi Date: Wed, 16 Oct 2024 23:14:18 +0200 Subject: [PATCH] Use https --- Dockerfile | 4 ++++ docker-compose.yml | 3 +++ ssl.conf | 16 ++++++++++++++++ 3 files changed, 23 insertions(+) create mode 100644 ssl.conf diff --git a/Dockerfile b/Dockerfile index 0ff9cd4..dbd5288 100644 --- a/Dockerfile +++ b/Dockerfile @@ -52,5 +52,9 @@ COPY ./liquibase /var/www/html/liquibase COPY start.sh /start.sh RUN chmod +x /start.sh +COPY ssl.conf /etc/apache2/sites-available/ssl.conf +RUN a2ensite ssl.conf + + # Use the start script as the entry point CMD ["/start.sh"] diff --git a/docker-compose.yml b/docker-compose.yml index 106eaa1..e996c80 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,6 +5,7 @@ services: image: ${DOCKER_IMAGE:-kmaxi/vow-website:latest} ports: - "80:80" + - "443:443" environment: - WEBSITE_DB_HOST=website - WEBSITE_DB_NAME=website @@ -20,6 +21,8 @@ services: - adminer volumes: - dynamic_data:/var/www/html/dynamic + - /etc/letsencrypt/live/voicesofwynn.com:/etc/letsencrypt/live/voicesofwynn.com:ro + - /etc/letsencrypt/archive/voicesofwynn.com:/etc/letsencrypt/archive/voicesofwynn.com:ro env_file: - .env diff --git a/ssl.conf b/ssl.conf new file mode 100644 index 0000000..ccdad45 --- /dev/null +++ b/ssl.conf @@ -0,0 +1,16 @@ + + ServerName voicesofwynn.com + DocumentRoot /var/www/html + + SSLEngine on + SSLCertificateFile /etc/letsencrypt/live/voicesofwynn.com/fullchain.pem + SSLCertificateKeyFile /etc/letsencrypt/live/voicesofwynn.com/privkey.pem + + + AllowOverride All + Require all granted + + + ErrorLog ${APACHE_LOG_DIR}/error.log + CustomLog ${APACHE_LOG_DIR}/access.log combined +