2 posts tagged

opencart

часть моего скрипта entrypoint.sh для инсталляции opencart

#!/bin/bash
if ! test -f /.INSTALLED; then
  while ! nc -z $DB_PORT_3306_TCP_ADDR $DB_PORT_3306_TCP_PORT; do sleep 3; done
  /usr/local/bin/install_opencart.sh
  touch /.INSTALLED
fi

в Dockerfile нужно добавить

apt-get install -y netcat
dockeropencart
Dec 15, 2015, 13:25

Opencart nginx rewrite rules

rewrite ^/sitemap.xml$ /index.php?route=feed/google_sitemap last;
    rewrite ^/googlebase.xml$ /index.php?route=feed/google_base last;
    rewrite ^/download/(.*) /index.php?route=error/not_found last;
    if (!-f $request_filename) {
        set $rule_3 1$rule_3;
    }
    if (!-d $request_filename) {
        set $rule_3 2$rule_3;
    }
    if ($uri !~ ".*.(ico|gif|jpg|jpeg|png|js|css)") {
        set $rule_3 3$rule_3;
    }
    if ($rule_3 = "321") {
        rewrite ^/([^?]*) /index.php?_route_=$1 last;
    }
nginxopencart