File tree Expand file tree Collapse file tree 3 files changed +19
-16
lines changed Expand file tree Collapse file tree 3 files changed +19
-16
lines changed Original file line number Diff line number Diff line change 33
33
# Enable modsecurity in the server block of :80 and :443
34
34
# Can disable this (default) and add the modsec directives in each ___location block
35
35
if [ " ${MODSEC_ENABLE} " == " 1" ] || [ " ${MODSEC_ENABLE} " -eq 1 ]; then
36
- log " Enabling modsecurity in server block of port 80 and 443"
37
- sed -i " s|#<MODSEC_ON>|modsecurity on;|g" /etc/nginx/conf.d/default.conf
38
- sed -i " s|#<MODSEC_RULES>|modsecurity_rules_file /etc/nginx/modsec/main.conf;|g" /etc/nginx/conf.d/default.conf
36
+ message=" Enabling modsecurity in ROOT http block"
37
+ sed -i " s|#<MODSEC_ON>|modsecurity on;|g" /etc/nginx/nginx.conf
38
+ sed -i " s|#<MODSEC_RULES>|modsecurity_rules_file /etc/nginx/modsec/main.conf;|g" /etc/nginx/nginx.conf
39
+ # Enabled modsecurity in the server block of :81 (admin dashboard)
40
+ if [ " ${MODSEC_ADMIN_PANEL} " == " 0" ] || [ " ${MODSEC_ADMIN_PANEL} " -eq 0 ]; then
41
+ log " ${message} and DISABLING in Admin dashboard port 81"
42
+ sed -i " s|#<MODSEC_ON>|modsecurity off;|g" /etc/nginx/conf.d/production.conf
43
+ else
44
+ log " ${message} and Admin dashboard port 81"
45
+ fi
39
46
fi
40
- # Enabled modsecurity in the server block of :81 (admin dashboard)
41
- if [ " ${MODSEC_ADMIN_PANEL} " == " 1" ] || [ " ${MODSEC_ADMIN_PANEL} " -eq 1 ]; then
42
- log " Enabling modsecurity in server block of admin dashboard port 81"
43
- sed -i " s|#<MODSEC_ON>|modsecurity on;|g" /etc/nginx/conf.d/production.conf
44
- sed -i " s|#<MODSEC_RULES>|modsecurity_rules_file /etc/nginx/modsec/main.conf;|g" /etc/nginx/conf.d/production.conf
45
-
46
- fi
Original file line number Diff line number Diff line change 56
56
map $host $forward_scheme {
57
57
default http;
58
58
}
59
-
59
+ #<MODSEC_ON>
60
+ #<MODSEC_RULES>
60
61
# Real IP Determination
61
62
62
63
# Local subnets:
Original file line number Diff line number Diff line change @@ -19,13 +19,15 @@ export BUILD_VERSION=dev
19
19
export BUILD_COMMIT=
20
20
export BUILD_DATE=" $( date ' +%Y-%m-%d %T %Z' ) "
21
21
export SSL_CERTS_PATH=" /etc/ssl/certs/GTS_Root_R1.pem"
22
- echo -e " ${YELLOW} ❯❯❯ ${CYAN} Running ${RED} 'scripts/frontend-build'${RESET} "
23
- bash ./scripts/frontend-build
24
- echo -e " ${YELLOW} ❯❯❯ ${CYAN} Completed ${RED} 'frontend-build'${RESET} "
25
- # Build
22
+
23
+ # Build FrontEnd
24
+ # echo -e "${YELLOW}❯❯❯ ${CYAN}Running ${RED}'scripts/frontend-build'${RESET}"
25
+ # bash ./scripts/frontend-build
26
+ # echo -e "${YELLOW}❯❯❯ ${CYAN}Completed ${RED}'frontend-build'${RESET}"
27
+
28
+ # Build Final Image
26
29
echo -e " ${BLUE} ❯ ${CYAN} Building ${RED} LOCAL ${CYAN} Image [${DOCKER_IMAGE} ] with tag: ${YELLOW}${BASE_TAG}${CYAN} ...${RESET} "
27
30
docker build \
28
- \
29
31
--build-arg BUILD_VERSION=" ${BUILD_VERSION:- dev} " \
30
32
--build-arg BUILD_COMMIT=" ${BUILD_COMMIT:- notset} " \
31
33
--build-arg BUILD_DATE=" ${BUILD_DATE} " \
You can’t perform that action at this time.
0 commit comments