diff --git a/Makefile b/Makefile index c9f901a..fc52136 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,8 @@ PORT_HTTP ?= 8420 PORT_HTTPS ?= 8430 PORT = $(shell [[ \${PROTOCOL} == "http" ]] && echo \${PORT_HTTP} || echo \${PORT_HTTPS}) HTTPS = $(shell [[ \${PROTOCOL} == "http" ]] && echo 0 || echo 1) +HTTPS_CERT = $(shell [[ -f "https/cert.pem" ]] && echo || echo dummy/)cert.pem +HTTPS_KEY = $(shell [[ -f "https/key.pem" ]] && echo || echo dummy/)key.pem URL = ${PROTOCOL}://${HOSTNAME}:${PORT}/ PROJECT = $(shell [[ \${TARGET} == "prod" ]] && echo \${NAMESPACE}_chevereto || echo \${NAMESPACE}_chevereto-${TARGET}) @@ -32,6 +34,8 @@ LICENSE ?= $(shell stty -echo; read -p "Chevereto V4 License key: 🔑" license; DOCKER_COMPOSE = $(shell echo @CONTAINER_BASENAME=\${CONTAINER_BASENAME} \ PORT_HTTP=\${PORT_HTTP} \ PORT_HTTPS=\${PORT_HTTPS} \ + HTTPS_CERT=\${HTTPS_CERT} \ + HTTPS_KEY=\${HTTPS_KEY} \ HTTPS=\${HTTPS} \ TAG_BASENAME=\${TAG_BASENAME} \ VERSION=\${VERSION} \ diff --git a/default.yml b/default.yml index 62406ec..40819d2 100644 --- a/default.yml +++ b/default.yml @@ -41,10 +41,10 @@ services: - storage:/var/www/html/images/ - assets:/var/www/html/_assets/ - type: bind - source: ${PWD}/https/cert.pem + source: ${PWD}/https/${HTTPS_CERT} target: /etc/ssl/certs/cert.pem - type: bind - source: ${PWD}/https/key.pem + source: ${PWD}/https/${HTTPS_KEY} target: /etc/ssl/private/key.pem ports: - ${PORT_HTTP}:80 diff --git a/https/cert.pem b/https/dummy/cert.pem similarity index 100% rename from https/cert.pem rename to https/dummy/cert.pem diff --git a/https/key.pem b/https/dummy/key.pem similarity index 100% rename from https/key.pem rename to https/dummy/key.pem