Skip to content

Commit

Permalink
Added Middleware support
Browse files Browse the repository at this point in the history
Refactored the CommandBus in order to make the ParallelCommandRunner more reliable
Added different PHP version constraints for experimental modes
  • Loading branch information
gplanchat committed Jul 19, 2020
1 parent 7356e0b commit 913d0e4
Show file tree
Hide file tree
Showing 92 changed files with 2,279 additions and 824 deletions.
55 changes: 55 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@

RED=033[31m
GREEN=033[32m
YELLOW=033[33m
BLUE=033[34m
PURPLE=033[35m
CYAN=033[36m
GREY=033[37m
NC=033[0m

KLOUD=docker-compose exec sh php bin/kloud

#build/kloud.phar:
# bin/build

#.PHONY: build
#build: build/kloud.phar

.PHONY: php-5.6
php-5.6: ## Build all possible images for PHP 5.6
php-5.6:
$(KLOUD) build --regex='/^5\.6-/' --force-all --push

.PHONY: php-7.1
php-7.1: ## Build all possible images for PHP 7.1
php-7.1:
$(KLOUD) build --regex='/^7\.1-/' --force-all --push

.PHONY: php-7.2
php-7.2: ## Build all possible images for PHP 7.2
php-7.2:
$(KLOUD) build --regex='/^7\.2-/' --force-all --push

.PHONY: php-7.3
php-7.3: ## Build all possible images for PHP 7.3
php-7.3:
$(KLOUD) build --regex='/^7\.3-/' --force-all --push

.PHONY: php-7.4
php-7.4: ## Build all possible images for PHP 7.4
php-7.4:
$(KLOUD) build --regex='/^7\.4-/' --force-all --push

.PHONY: all
all: ## Build all possible images
all:
$(KLOUD) build --regex='/^\d+\.\d+/' --force-all --push

.DEFAULT_GOAL := help

.PHONY: help
help: ## Show this help
help:
@echo "\n\${BLUE}usage: make \${GREEN}target [ ...target ]\${NC}"
@grep -E '(^[a-zA-Z0-9_.-]+:.*?##.*$$)|(^##)' Makefile | awk 'BEGIN {FS = ":.*?## "}; {printf "\${GREEN}%-30s\${NC} %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/'
183 changes: 110 additions & 73 deletions README.md

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions compose/oroplatform/ee/3.1/.docker/elasticsearch/elasticsearch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
http.host: 0.0.0.0

# Uncomment the following lines for a production cluster deployment
#transport.host: 0.0.0.0
#discovery.zen.minimum_master_nodes: 1
http.cors.enabled : true
http.cors.allow-origin : "*"
http.cors.allow-methods : OPTIONS, HEAD, GET, POST, PUT, DELETE
http.cors.allow-headers : X-Requested-With,X-Auth-Token,Content-Type, Content-Length
cluster.routing.allocation.disk.threshold_enabled: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
client_header_timeout 10m;
client_body_timeout 10m;
send_timeout 10m;
real_ip_header X-Forwarded-For;
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

upstream prod-app {
server http-worker-prod:80;
}

upstream dev-app {
server http-worker-dev:80;
}

upstream xdebug-app {
server http-worker-xdebug:80;
}

map $http_x_symfony_env $pool {
default "dev-app";
prod "prod-app";
dev "dev-app";
xdebug "xdebug-app";
}

server {
listen 80;
server_name _;
location / {
proxy_pass http://$pool;

#standard proxy settings
proxy_set_header X-Real-IP $remote_addr;
proxy_redirect off;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-NginX-Proxy true;
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
send_timeout 600;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
server {
server_name _;
root /var/www/html/public;

index index_dev.php;

access_log /var/log/nginx/access_log;
error_log /var/log/nginx/error_log info;

try_files $uri $uri/ @rewrite;

location @rewrite {
rewrite ^/(.*)$ /index_dev.php/$1;
}

location ~ [^/].php(/|$) {
fastcgi_split_path_info ^(.+?.php)(/.*)$;

if (!-f $document_root$fastcgi_script_name) {
return 404;
}

fastcgi_index index_dev.php;
fastcgi_read_timeout 10m;
fastcgi_pass fpm:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
server {
server_name _;
root /var/www/html/public;

index index.php;

access_log /var/log/nginx/access_log;
error_log /var/log/nginx/error_log info;

try_files $uri $uri/ @rewrite;

location @rewrite {
rewrite ^/(.*)$ /index.php/$1;
}

location ~ [^/].php(/|$) {
fastcgi_split_path_info ^(.+?.php)(/.*)$;

if (!-f $document_root$fastcgi_script_name) {
return 404;
}

fastcgi_index index.php;
fastcgi_read_timeout 10m;
fastcgi_pass fpm:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
server {
server_name _;
root /var/www/html/public;

index index_dev.php;

access_log /var/log/nginx/access_log;
error_log /var/log/nginx/error_log info;

try_files $uri $uri/ @rewrite;

location @rewrite {
rewrite ^/(.*)$ /index_dev.php/$1;
}

location ~ [^/].php(/|$) {
fastcgi_split_path_info ^(.+?.php)(/.*)$;

if (!-f $document_root$fastcgi_script_name) {
return 404;
}

fastcgi_index index_dev.php;
fastcgi_read_timeout 10m;
fastcgi_pass fpm-xdebug:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
16 changes: 16 additions & 0 deletions compose/oroplatform/ee/3.1/.docker/rabbitmq@3.6/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM rabbitmq:3.7-management-alpine

RUN set -ex\
&& apk update \
&& apk upgrade \
&& apk add --no-cache --virtual .build-deps \
zip \
curl \
&& curl https://dl.bintray.com/rabbitmq/community-plugins/3.7.x/rabbitmq_delayed_message_exchange/rabbitmq_delayed_message_exchange-20171201-3.7.x.zip > $RABBITMQ_HOME/plugins/rabbitmq_delayed_message_exchange-20171201-3.7.x.zip \
&& unzip $RABBITMQ_HOME/plugins/rabbitmq_delayed_message_exchange-20171201-3.7.x.zip -d $RABBITMQ_HOME/plugins \
&& rm $RABBITMQ_HOME/plugins/rabbitmq_delayed_message_exchange-20171201-3.7.x.zip \
&& apk del .build-deps

RUN rabbitmq-plugins enable --offline rabbitmq_delayed_message_exchange
RUN rabbitmq-plugins enable --offline rabbitmq_consistent_hash_exchange

5 changes: 5 additions & 0 deletions compose/oroplatform/ee/3.1/.docker/redis@5/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM redis:5-alpine

COPY redis.conf /usr/local/etc/redis/redis.conf

CMD [ "redis-server", "/usr/local/etc/redis/redis.conf" ]
80 changes: 80 additions & 0 deletions compose/oroplatform/ee/3.1/.docker/redis@5/redis.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
bind 0.0.0.0
port 6379

protected-mode yes

tcp-backlog 511
timeout 0
tcp-keepalive 300

daemonize no
supervised upstart

pidfile /var/run/redis_6379.pid

loglevel notice
logfile ""

databases 16

always-show-logo yes

save 900 1
save 300 10
save 60 10000

stop-writes-on-bgsave-error yes
rdbcompression yes
rdbchecksum yes
dbfilename dump.rdb

dir ./

replica-serve-stale-data yes
replica-read-only yes
repl-diskless-sync no
repl-diskless-sync-delay 5
repl-disable-tcp-nodelay no
replica-priority 100

lazyfree-lazy-eviction no
lazyfree-lazy-expire no
lazyfree-lazy-server-del no
replica-lazy-flush no

appendonly no
appendfilename "appendonly.aof"
appendfsync everysec
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
aof-load-truncated yes
aof-use-rdb-preamble yes

lua-time-limit 5000

slowlog-log-slower-than 10000
slowlog-max-len 128

latency-monitor-threshold 0

notify-keyspace-events ""

hash-max-ziplist-entries 512
hash-max-ziplist-value 64
list-max-ziplist-size -2
list-compress-depth 0
set-max-intset-entries 512
zset-max-ziplist-entries 128
zset-max-ziplist-value 64
hll-sparse-max-bytes 3000
stream-node-max-bytes 4096
stream-node-max-entries 100
activerehashing yes
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit replica 256mb 64mb 60
client-output-buffer-limit pubsub 32mb 8mb 60
hz 10
dynamic-hz yes
aof-rewrite-incremental-fsync yes
rdb-save-incremental-fsync yes
15 changes: 15 additions & 0 deletions compose/oroplatform/ee/3.1/.env.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
BLACKFIRE_SERVER_ID=0000000000000000000000000000000000000000
BLACKFIRE_SERVER_TOKEN=0000000000000000000000000000000000000000
BLACKFIRE_CLIENT_ID=0000000000000000000000000000000000000000
BLACKFIRE_CLIENT_TOKEN=0000000000000000000000000000000000000000
APPLICATION_DOMAIN=localhost
COMPOSER_AUTH={"github-oauth":{"github.com":"0000000000000000000000000000000000000000"},"bitbucket-oauth":{"bitbucket.org":{"consumer-key":"0000000000000000000000000000000000000000","consumer-secret":"0000000000000000000000000000000000000000"}}}
COMPOSER_PROCESS_TIMEOUT=3000
HTTP_PORT=10000
MAILCATCHER_PORT=10083
SQL_PORT=10432
WEBSOCKET_PORT=10088
RABBITMQ_PORT=10673
REDIS_PORT=10379
ELASTICSEARCH_PORT=10200
DEJAVU_PORT=10358
Loading

0 comments on commit 913d0e4

Please sign in to comment.