Skip to content

Commit

Permalink
Merge 1.2.16 to Master
Browse files Browse the repository at this point in the history
  • Loading branch information
abantecart committed May 16, 2020
2 parents 080d1c6 + 551f527 commit 7a52b1b
Show file tree
Hide file tree
Showing 1,154 changed files with 37,983 additions and 9,616 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Expand Up @@ -14,10 +14,12 @@ php:
# aliased to a recent 5.6.x version
#- 5.6
# aliased to a recent 7.x version
- 7.1
- 7.2
# aliased to a recent hhvm version
#- hhvm

services: mysql

# optionally specify a list of environments, for example to test different RDBMS
env:
- DB=mysql
Expand All @@ -44,3 +46,4 @@ notifications:
recipients:
- dsuprunenko@abantecart.com
- projkov@abantecart.com
- vdvpie22@gmail.com
25 changes: 13 additions & 12 deletions docker/Dockerfile
@@ -1,5 +1,5 @@
FROM php:7.2-fpm-stretch
MAINTAINER Denis Vagner <help@abantecart.com>
MAINTAINER Dvagner <help@abantecart.com>

RUN apt-get update && apt-get install -y \
curl \
Expand All @@ -13,25 +13,26 @@ RUN apt-get update && apt-get install -y \
mysql-server \
mc \
net-tools \
libxml2-dev \
&& docker-php-ext-install -j$(nproc) iconv mbstring mysqli pdo_mysql zip soap \
&& docker-php-ext-install -j$(nproc) iconv mbstring mysqli pdo_mysql zip \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install -j$(nproc) gd \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
&& service mysql start; mysql -u root -e "CREATE USER 'admin'@'%' IDENTIFIED BY 'pass';";mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' WITH GRANT OPTION;";mysql -u root -e "create database abantecart;";
&& docker-php-ext-install -j$(nproc) gd

RUN sed -i 's/bind-address/#bind-address/' /etc/mysql/my.cnf
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

ADD default /etc/nginx/sites-available/
ADD php.ini /usr/local/etc/php/conf.d/40-custom.ini

RUN git clone https://github.com/abantecart/abantecart-src.git /var/www/abantecart \
&& chown -R www-data:www-data /var/www/abantecart
RUN service mysql start; mysql -u root -e "CREATE USER 'admin'@'%' IDENTIFIED BY 'pass';";mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' WITH GRANT OPTION;";mysql -u root -e "create database abantecart;";
RUN sed -i 's/bind-address/#bind-address/' /etc/mysql/my.cnf

ADD php.ini /usr/local/etc/php/conf.d/40-custom.ini

RUN git clone https://github.com/abantecart/abantecart-src.git /var/www/abantecart
RUN chown -R www-data:www-data /var/www/abantecart
WORKDIR /var/www/abantecart/public_html/

RUN service mysql start && /usr/local/bin/php ./install/cli_install.php install --db_host=127.0.0.1 --db_user=admin --db_password=pass --db_name=abantecart --db_driver=amysqli --db_prefix=abc_ --admin_path=admin --username=admin --password=admin --email=admin@admin.com --http_server=http://localhost --with-sample-data \
&& apt-get clean
RUN service mysql start && /usr/local/bin/php ./install/cli_install.php install --db_host=127.0.0.1 --db_user=admin --db_password=pass --db_name=abantecart --db_driver=amysqli --db_prefix=abc_ --admin_path=admin --username=admin --password=admin --email=admin@admin.com --http_server=http://localhost --with-sample-data

RUN apt-get clean

EXPOSE 80 3306

Expand Down
63 changes: 8 additions & 55 deletions docker/default
Expand Up @@ -44,66 +44,19 @@ server {
#
location ~ \.php$ {
include snippets/fastcgi-php.conf;

# With php5-cgi alone:
fastcgi_pass 127.0.0.1:9000;
# With php5-fpm:
#fastcgi_pass unix:/var/run/php5-fpm.sock;
}

### Abantecart Settings ###
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
# Make sure files with the following extensions do not get loaded by nginx because nginx would
# display the source code, and these files can contain PASSWORDS!
location ~* \.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|\.php_ {
deny all;
}
# Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}
### Retina images handler. Check cookie and looking for file with @2x at the end of name
location ~* ^(.*)\.(jpg|jpeg|png|gif)$ {
set $hidpi_uri $1@2x.png;
if ($http_cookie !~ 'HTTP_IS_RETINA=1') {
break;
}
try_files $hidpi_uri $uri =404;
}

location ~* \.(jpg|jpeg|png|gif|css|js|ico)$ {
expires max;
log_not_found off;
}
location ~ /(system/logs|resources/download) {
deny all;
return 403;
}
location /admin/ {
location ~ .*\.(php)?$ {
deny all;
return 403;
}
}
#rewrite for images for retina-displays
location ~ / {
if (!-e $request_filename){
rewrite ^/(.*)\?*$ /index.php?_route_=$1 last;
}
}


### End of AbanteCart settings ###
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}


Expand All @@ -124,4 +77,4 @@ server {
# location / {
# try_files $uri $uri/ =404;
# }
#}
#}
4 changes: 4 additions & 0 deletions docker/index.php
@@ -0,0 +1,4 @@
<?php
echo 'hello <br>';
phpinfo();
?>
86 changes: 86 additions & 0 deletions docker/nginx.conf
@@ -0,0 +1,86 @@
daemon off;
user www-data;
worker_processes 4;
pid /run/nginx.pid;

events {
worker_connections 768;
# multi_accept on;
}

http {

##
# Basic Settings
##

sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;

# server_names_hash_bucket_size 64;
# server_name_in_redirect off;

include /etc/nginx/mime.types;
default_type application/octet-stream;

##
# SSL Settings
##

ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;

##
# Logging Settings
##

access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;

##
# Gzip Settings
##

gzip on;
gzip_disable "msie6";

# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

##
# Virtual Host Configs
##

include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}


#mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
# server {
# listen localhost:110;
# protocol pop3;
# proxy on;
# }
#
# server {
# listen localhost:143;
# protocol imap;
# proxy on;
# }
#}
12 changes: 12 additions & 0 deletions docker/php-fcgi
@@ -0,0 +1,12 @@
#!/bin/bash
BIND=127.0.0.1:9000
USER=www-data
PHP_FCGI_CHILDREN=15
PHP_FCGI_MAX_REQUESTS=1000

PHP_CGI=/usr/bin/php-cgi
PHP_CGI_NAME=`basename $PHP_CGI`
PHP_CGI_ARGS="- USER=$USER PATH=/usr/bin PHP_FCGI_CHILDREN=$PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS=$PHP_FCGI_MAX_REQUESTS $PHP_CGI -b $BIND"
RETVAL=0

start-stop-daemon --quiet --start --chuid "$USER" --exec /usr/bin/env -- $PHP_CGI_ARGS
8 changes: 8 additions & 0 deletions docker/supervisor-lemp.conf
@@ -0,0 +1,8 @@
[program:nginx]
command=nginx

[program:php-fcgi]
command=php-fcgi

[program:mysqld]
command=mysqld_safe
29 changes: 29 additions & 0 deletions docker/supervisord.conf
@@ -0,0 +1,29 @@
; supervisor config file

[unix_http_server]
file=/var/run/supervisor.sock ; (the path to the socket file)
chmod=0700 ; sockef file mode (default 0700)

[supervisord]
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP)
nodaemon=true

; the below section must remain in the config file for RPC
; (supervisorctl/web interface) to work, additional interfaces may be
; added by defining them in separate rpcinterface: sections
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]
serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket

; The [include] section can just contain the "files" setting. This
; setting can list multiple files (separated by whitespace or
; newlines). It can also contain wildcards. The filenames are
; interpreted as relative to this file. Included files *cannot*
; include files themselves.

[include]
files = /etc/supervisor/conf.d/*.conf
7 changes: 4 additions & 3 deletions public_html/.htaccess.txt
Expand Up @@ -28,10 +28,10 @@ RewriteEngine on
# To emulate Retina mode on your NON-Retina display, add HTTP_IS_RETINA cookie in your browser
RewriteCond %{HTTP_COOKIE} HTTP_IS_RETINA [NC]
RewriteCond %{REQUEST_FILENAME} !@2x
RewriteRule ^(.*)\.(gif|jpg|jpeg|png)$ $1@2x.$2
RewriteRule ^(.*)\.(gif|jpg|jpeg|png|webp)$ $1@2x.$2
# if @2x isn't available fulfill the original request
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)@2x\.(gif|jpg|jpeg|png)$ $1.$2
RewriteRule ^(.*)@2x\.(gif|jpg|jpeg|png|webp)$ $1.$2

# SEO URL Settings
RewriteBase /
Expand Down Expand Up @@ -84,6 +84,7 @@ RewriteRule ^(.*)\?*$ index.php?_route_=$1 [L,QSA]
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType image/webp "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType application/pdf "access 1 month"
Expand All @@ -94,7 +95,7 @@ RewriteRule ^(.*)\?*$ index.php?_route_=$1 [L,QSA]
</IfModule>
<IfModule mod_headers.c>
Header set Connection keep-alive
<filesmatch "\.(ico|flv|jpg|jpeg|png|gif|css|swf)$">
<filesmatch "\.(ico|flv|jpg|jpeg|png|gif|css|swf|webp)$">
Header set Cache-Control "max-age=2678400, public"
</filesmatch>
<filesmatch "\.(html|htm)$">
Expand Down
2 changes: 1 addition & 1 deletion public_html/admin/controller/api/common/access.php
Expand Up @@ -5,7 +5,7 @@
AbanteCart, Ideal OpenSource Ecommerce Solution
http://www.AbanteCart.com
Copyright 2011-2018 Belavier Commerce LLC
Copyright 2011-2020 Belavier Commerce LLC
This source file is subject to Open Software License (OSL 3.0)
License details is bundled with this package in the file LICENSE.txt.
Expand Down
2 changes: 1 addition & 1 deletion public_html/admin/controller/api/common/preflight.php
Expand Up @@ -5,7 +5,7 @@
AbanteCart, Ideal OpenSource Ecommerce Solution
http://www.AbanteCart.com
Copyright 2011-2018 Belavier Commerce LLC
Copyright 2011-2020 Belavier Commerce LLC
This source file is subject to Open Software License (OSL 3.0)
License details is bundled with this package in the file LICENSE.txt.
Expand Down
2 changes: 1 addition & 1 deletion public_html/admin/controller/api/customer/details.php
Expand Up @@ -5,7 +5,7 @@
AbanteCart, Ideal OpenSource Ecommerce Solution
http://www.AbanteCart.com
Copyright © 2011-2018 Belavier Commerce LLC
Copyright © 2011-2020 Belavier Commerce LLC
This source file is subject to Open Software License (OSL 3.0)
License details is bundled with this package in the file LICENSE.txt.
Expand Down
2 changes: 1 addition & 1 deletion public_html/admin/controller/api/customer/orders.php
Expand Up @@ -5,7 +5,7 @@
AbanteCart, Ideal OpenSource Ecommerce Solution
http://www.AbanteCart.com
Copyright © 2011-2018 Belavier Commerce LLC
Copyright © 2011-2020 Belavier Commerce LLC
This source file is subject to Open Software License (OSL 3.0)
License details is bundled with this package in the file LICENSE.txt.
Expand Down
2 changes: 1 addition & 1 deletion public_html/admin/controller/api/customer/search.php
Expand Up @@ -5,7 +5,7 @@
AbanteCart, Ideal OpenSource Ecommerce Solution
http://www.AbanteCart.com
Copyright © 2011-2018 Belavier Commerce LLC
Copyright © 2011-2020 Belavier Commerce LLC
This source file is subject to Open Software License (OSL 3.0)
License details is bundled with this package in the file LICENSE.txt.
Expand Down
2 changes: 1 addition & 1 deletion public_html/admin/controller/api/error/no_access.php
Expand Up @@ -5,7 +5,7 @@
AbanteCart, Ideal OpenSource Ecommerce Solution
http://www.AbanteCart.com
Copyright 2011-2018 Belavier Commerce LLC
Copyright 2011-2020 Belavier Commerce LLC
This source file is subject to Open Software License (OSL 3.0)
License details is bundled with this package in the file LICENSE.txt.
Expand Down
2 changes: 1 addition & 1 deletion public_html/admin/controller/api/error/no_permission.php
Expand Up @@ -5,7 +5,7 @@
AbanteCart, Ideal OpenSource Ecommerce Solution
http://www.AbanteCart.com
Copyright © 2011-2018 Belavier Commerce LLC
Copyright © 2011-2020 Belavier Commerce LLC
This source file is subject to Open Software License (OSL 3.0)
License details is bundled with this package in the file LICENSE.txt.
Expand Down
2 changes: 1 addition & 1 deletion public_html/admin/controller/api/error/not_found.php
Expand Up @@ -5,7 +5,7 @@
AbanteCart, Ideal OpenSource Ecommerce Solution
http://www.AbanteCart.com
Copyright © 2011-2018 Belavier Commerce LLC
Copyright © 2011-2020 Belavier Commerce LLC
This source file is subject to Open Software License (OSL 3.0)
License details is bundled with this package in the file LICENSE.txt.
Expand Down

0 comments on commit 7a52b1b

Please sign in to comment.