File tree Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -10,4 +10,8 @@ RUN wget -nv https://github.com/outeredge/edge-docker-magento/releases/download/
1010 sed -i '/$relativePath = $request->getPathInfo();/a $relativePath = ltrim(ltrim($relativePath, "media"), "/");' /var/www/pub/get.php && \
1111 chmod +x /var/www/bin/magento && \
1212 cp /var/www/nginx.conf.sample /etc/nginx/magento_default.conf && \
13- chown -R edge:edge /var/www
13+ sed -i '/^#/d' /etc/nginx/magento_default.conf && \
14+ sed -i "/fastcgi_backend/a \
15+ fastcgi_param MAGE_MODE \$ MAGE_MODE if_not_empty; \
16+ fastcgi_param MAGE_RUN_CODE \$ MAGE_RUN_CODE if_not_empty;" /etc/nginx/magento_default.conf && \
17+ chown -R edge:edge /var/www
Original file line number Diff line number Diff line change @@ -4,12 +4,11 @@ if [ ! -z "$ADDITIONAL_STORES" ]; then
44 while IFS=' ,' read -ra HOSTS; do
55 for i in " ${HOSTS[@]} " ; do
66 IFS=' :' read -ra HOST <<< " $i"
7-
87 cp /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/${HOST[0]} .conf
9- sed -i " /listen/a server_name ${HOST[1]} ;" /etc/nginx/conf.d/${HOST[0]} .conf
10- sed -i " /listen/a fastcgi_param MAGE_RUN_CODE ${HOST[0]} ;" /etc/nginx/conf.d/${HOST[0]} .conf
8+ sed -i " /listen/a server_name ${HOST[1]} ;" /etc/nginx/conf.d/${HOST[0]} .conf
119 sed -i ' s/ reuseport//g' /etc/nginx/conf.d/${HOST[0]} .conf
1210 sed -i ' s/ default_server//g' /etc/nginx/conf.d/${HOST[0]} .conf
11+ sed -i " /set \$ MAGE_RUN_CODE/c\set \$ MAGE_RUN_CODE ${HOST[0]} ;" /etc/nginx/conf.d/${HOST[0]} .conf
1312 done
1413 done <<< " $ADDITIONAL_STORES"
1514fi
Original file line number Diff line number Diff line change @@ -2,10 +2,9 @@ server {
22 listen 80 default_server reuseport;
33
44 set $MAGE_ROOT /var/www;
5- {% if MAGE_MODE is defined and MAGE_MODE %}
6- set $MAGE_MODE {{ MAGE_MODE }};
7- {% endif %}
8-
9- include magento_*.conf;
5+ set $MAGE_MODE "{% if MAGE_MODE is defined %} {{ MAGE_MODE }}{% endif %} ";
6+ set $MAGE_RUN_CODE "{% if MAGE_RUN_CODE is defined %} {{ MAGE_RUN_CODE }}{% endif %} ";
7+
8+ include magento_default.conf;
109 include security.conf;
1110}
You can’t perform that action at this time.
0 commit comments