-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #245 from BitBagCommerce/op-288-es-refactor
OP-288: ES refactor
- Loading branch information
Showing
143 changed files
with
1,652 additions
and
1,654 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[www] | ||
user = www-data | ||
group = www-data | ||
|
||
listen = /var/run/php-www.sock | ||
listen.owner = www-data | ||
listen.group = www-data | ||
listen.mode = 0660 | ||
|
||
clear_env = no | ||
|
||
pm = dynamic | ||
pm.max_children = 5 | ||
pm.start_servers = 2 | ||
pm.min_spare_servers = 1 | ||
pm.max_spare_servers = 3 | ||
|
||
pm.status_path = /status | ||
catch_workers_output = yes | ||
|
||
security.limit_extensions = .php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
user www-data; | ||
worker_processes auto; | ||
daemon off; | ||
pid /run/nginx.pid; | ||
|
||
include /etc/nginx/modules-enabled/*.conf; | ||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
|
||
server_tokens off; | ||
|
||
client_max_body_size 64m; | ||
sendfile on; | ||
tcp_nodelay on; | ||
tcp_nopush on; | ||
|
||
gzip_vary on; | ||
|
||
access_log /var/log/nginx/access.log; | ||
error_log /var/log/nginx/error.log; | ||
|
||
server { | ||
listen 80; | ||
|
||
root /app/tests/Application/public; | ||
index index.php; | ||
|
||
location / { | ||
try_files $uri /index.php$is_args$args; | ||
} | ||
|
||
location ~ \.php$ { | ||
include fastcgi_params; | ||
|
||
fastcgi_pass unix:/var/run/php-www.sock; | ||
fastcgi_split_path_info ^(.+\.php)(/.*)$; | ||
|
||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; | ||
fastcgi_param DOCUMENT_ROOT $realpath_root; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[PHP] | ||
memory_limit=512M | ||
|
||
[date] | ||
date.timezone=${PHP_DATE_TIMEZONE} | ||
|
||
[opcache] | ||
opcache.enable=0 | ||
opcache.memory_consumption=256 | ||
opcache.max_accelerated_files=20000 | ||
opcache.validate_timestamps=0 | ||
;opcache.preload=/app/config/preload.php | ||
opcache.preload_user=www-data | ||
opcache.jit=1255 | ||
opcache.jit_buffer_size=256M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[supervisord] | ||
nodaemon = true | ||
user = root | ||
pidfile = /run/supervisord.pid | ||
|
||
[program:nginx] | ||
command = /usr/sbin/nginx | ||
user = root | ||
autostart = true | ||
|
||
[program:php-fpm] | ||
command = /usr/sbin/php-fpm -F | ||
user = root | ||
autostart = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
FROM ubuntu:20.04 | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
ARG PHP_VERSION=8.1 | ||
ENV LC_ALL=C.UTF-8 | ||
|
||
# Install basic tools | ||
RUN apt-get update && apt-get install -y \ | ||
software-properties-common \ | ||
curl \ | ||
make \ | ||
supervisor \ | ||
unzip \ | ||
python2 \ | ||
g++ | ||
|
||
# Append NODE, NGINX and PHP repositories | ||
RUN add-apt-repository ppa:ondrej/php \ | ||
&& add-apt-repository ppa:ondrej/nginx \ | ||
&& curl -sL https://deb.nodesource.com/setup_14.x | bash - | ||
|
||
# Install required PHP extensions | ||
RUN apt-get update && apt-get install -y \ | ||
nodejs \ | ||
nginx \ | ||
php${PHP_VERSION} \ | ||
php${PHP_VERSION}-apcu \ | ||
php${PHP_VERSION}-calendar \ | ||
php${PHP_VERSION}-common \ | ||
php${PHP_VERSION}-cli \ | ||
php${PHP_VERSION}-ctype \ | ||
php${PHP_VERSION}-curl \ | ||
php${PHP_VERSION}-dom \ | ||
php${PHP_VERSION}-exif \ | ||
php${PHP_VERSION}-fpm \ | ||
php${PHP_VERSION}-gd \ | ||
php${PHP_VERSION}-intl \ | ||
php${PHP_VERSION}-mbstring \ | ||
php${PHP_VERSION}-mysql \ | ||
php${PHP_VERSION}-opcache \ | ||
php${PHP_VERSION}-pdo \ | ||
php${PHP_VERSION}-pgsql \ | ||
php${PHP_VERSION}-sqlite \ | ||
php${PHP_VERSION}-xml \ | ||
php${PHP_VERSION}-xsl \ | ||
php${PHP_VERSION}-yaml \ | ||
php${PHP_VERSION}-zip | ||
|
||
# Install Composer | ||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename composer | ||
|
||
# Cleanup | ||
RUN apt-get remove --purge -y software-properties-common curl && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* /usr/share/man/* | ||
|
||
# Create directory for php-fpm socket | ||
# Link php-fpm binary file without version | ||
# -p Creates missing intermediate path name directories | ||
RUN ln -s /usr/sbin/php-fpm${PHP_VERSION} /usr/sbin/php-fpm && mkdir -p /run/php | ||
|
||
# Install yarn | ||
RUN npm install -g yarn && npm cache clean --force | ||
|
||
# Initialize config files | ||
COPY .docker/supervisord.conf /etc/supervisor/conf.d/supervisor.conf | ||
COPY .docker/nginx.conf /etc/nginx/nginx.conf | ||
COPY .docker/fpm.conf /etc/php/${PHP_VERSION}/fpm/pool.d/www.conf | ||
COPY .docker/php.ini /etc/php/${PHP_VERSION}/fpm/php.ini | ||
COPY .docker/php.ini /etc/php/${PHP_VERSION}/cli/php.ini | ||
|
||
WORKDIR /app | ||
|
||
EXPOSE 80 | ||
|
||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# UPGRADE FROM 3.* TO 4.0.0 | ||
|
||
#### Changes related to facets: | ||
|
||
Since version 4 standard filters are deprecated, and replaced by facets. Facets are a more flexible and powerful way to filter products in the search engine. The main difference is that facets are not limited to the predefined values of the attribute, but they are generated based on the values of the products in the index. This means that the user can filter products by any value of the attribute, not only the predefined ones. | ||
|
||
If you still want to use the old filters, you have to manually add them in form extension - they are still in the code: `BitBag\SyliusElasticsearchPlugin\Form\Type\ProductAttributesFilterType` and `BitBag\SyliusElasticsearchPlugin\Form\Type\ProductOptionsFilterType`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.