dennisro 6 years ago
parent
commit
db27f79933
2 changed files with 6 additions and 3 deletions
  1. 1 2
      data/services/nginx/containers.sh
  2. 5 1
      data/services/nginx/nginx.sh

+ 1 - 2
data/services/nginx/containers.sh

@@ -7,10 +7,9 @@ nginx_dockerbunker() {
 		-p 80:80 -p 443:443 \
 		-v "${BASE_DIR}/data/web":/var/www/html:ro \
 		-v "${SERVICES_DIR}/nginx/nginx.conf":/etc/nginx/nginx.conf:ro \
+		-v "${SERVICES_DIR}/nginx/includes":/etc/nginx/includes \
 		-v "${CONF_DIR}/nginx/ssl":/etc/nginx/ssl \
 		-v "${CONF_DIR}/nginx/conf.d":/etc/nginx/conf.d \
-		-v "${SERVICES_DIR}/nginx/ssl/dhparam.pem":/etc/nginx/ssl/dhparam.pem:ro \
-		-v "${SERVICES_DIR}/nginx/includes":/etc/nginx/includes \
 	${IMAGES[service]} >/dev/null
 	exit_response
 }

+ 5 - 1
data/services/nginx/nginx.sh

@@ -18,10 +18,14 @@ setup() {
 
 	echo -e "\n\e[1mNo nginx container found\e[0m"
 	echo -e "\n\e[3m\xe2\x86\x92 Setup nginx\e[0m"
+
 	docker_pull
 
 	[[ ! $(docker network ls -q --filter name=^${NETWORK}$) ]] \
-		&& docker network create $NETWORK >/dev/null \
+		&& docker network create $NETWORK >/dev/null
+
+	[[ ! -d "${CONF_DIR}"/nginx/ssl ]] \
+		&& cp -r "${SERVICES_DIR}"/nginx/ssl "${CONF_DIR}"/nginx
 
 	[[ ! -d "${BASE_DIR}"/data/web ]] && mkdir "${BASE_DIR}"/data/web