Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for Ibexa 4 #111

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
strategy:
matrix:
php: [7.4, 8.0]
ezversion: [3.*]
ezversion: [3.*, 4.*]
collection: [collection-2x.json]
steps:
- uses: actions/checkout@v1
Expand Down
45 changes: 45 additions & 0 deletions config/services.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,47 @@
---
parameters:
github_release_url: "https://api.github.com/repos/ezsystems/launchpad/releases?draft=false&prerelease=false"
cms_version_configs:
ezsystems-1:
php_version: "7.2"
solr_version: "6.6.2"
composer_version: 1
cms_root: /var/www/html/project/ezplatform
document_root: /var/www/html/project/ezplatform/web
console_path: /var/www/html/project/ezplatform/app/console
session_handler: 'ezplatform.core.session.handler.native_redis'
ezsystems-2:
php_version: "7.3"
solr_version: "6.6.2"
composer_version: 1
cms_root: /var/www/html/project/ezplatform
document_root: /var/www/html/project/ezplatform/web
console_path: /var/www/html/project/ezplatform/bin/console
session_handler: 'ezplatform.core.session.handler.native_redis'
ezsystems-3:
php_version: "7.3"
solr_version: "6.6.2"
composer_version: 1
cms_root: /var/www/html/project/ezplatform
document_root: /var/www/html/project/ezplatform/web
console_path: /var/www/html/project/ezplatform/bin/console
session_handler: 'ezplatform.core.session.handler.native_redis'
ibexa-3:
php_version: "7.4"
solr_version: "7.7.3"
composer_version: 2
cms_root: /var/www/html/project/ezplatform
document_root: /var/www/html/project/ezplatform/public
console_path: /var/www/html/project/ezplatform/bin/console
session_handler: 'ezplatform.core.session.handler.native_redis'
ibexa-4:
php_version: "8.1"
solr_version: "7.7.3"
composer_version: 2
cms_root: /var/www/html/project/ibexa
document_root: /var/www/html/project/ibexa/public
console_path: /var/www/html/project/ibexa/bin/console
session_handler: 'Ibexa\Bundle\Core\Session\Handler\NativeSessionHandler'

services:

Expand Down Expand Up @@ -41,3 +82,7 @@ services:

eZ\Launchpad\Core\OSX\Optimizer\NFSVolumes:
tags: [ezlaunchpad.osx.optimizer]

eZ\Launchpad\Configuration\CmsVersionRegistry:
arguments:
$config: '%cms_version_configs%'
12 changes: 9 additions & 3 deletions payload/dev/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
volumes:
- "${PROJECTCOMPOSEPATH}/${PROVISIONINGFOLDERNAME}/dev/nginx/nginx.conf:/etc/nginx/conf.d/default.conf:ro"
- "${PROJECTCOMPOSEPATH}/${PROVISIONINGFOLDERNAME}/dev/nginx/entrypoint.bash:/entrypoint.bash:ro"
- "${PROJECTCOMPOSEPATH}/ezplatform/doc/nginx/ez_params.d:/etc/nginx/ez_params.d:ro"
- "${PROJECTCOMPOSEPATH}/${PROVISIONINGFOLDERNAME}/dev/nginx/include/ez_params.d:/etc/nginx/ez_params.d:ro"
depends_on:
- engine
volumes_from:
Expand All @@ -27,7 +27,10 @@ services:
shm_size: 754M
environment:
- COMPOSER_CACHE_DIR
- PROJECTCMSROOT
- PROJECTMAPPINGFOLDER
- PROVISIONINGFOLDERNAME
- CONSOLE_PATH
- DEV_UID
- DEV_GID
- XDEBUG_ENABLED
Expand All @@ -42,6 +45,7 @@ services:
- "DATABASE_PASSWORD=ezplatform"
- "SYMFONY_SECRET=eZlaunchpad20Secret09Dev83ModeZ"
- "APP_SECRET=eZlaunchpad20Secret09Dev83ModeZ"
- "SOLR_VERSION=$SOLR_VERSION"
- "DATABASE_HOST=db"
- "CUSTOM_CACHE_POOL=singleredis"
- "CACHE_HOST=redis"
Expand All @@ -54,7 +58,7 @@ services:
- "APP_CACHE_DIR=/tmp/ezplatformcache/"
- "APP_LOG_DIR=/tmp/ezplatformlogs/"
- "HTTPCACHE_VARNISH_INVALIDATE_TOKEN=eZlaunchpad20Secret09Varnish"
- "SESSION_HANDLER_ID=ezplatform.core.session.handler.native_redis"
- "SESSION_HANDLER_ID=${PROJECT_SESSION_HANDLER_ID}"
- "SESSION_SAVE_PATH=tcp://redis:6379"
db:
image: mariadb:10.3
Expand All @@ -73,7 +77,7 @@ services:
- nginx

solr:
image: solr:7.7
image: solr:$SOLR_VERSION
volumes:
- "${PROJECTCOMPOSEPATH}/${PROVISIONINGFOLDERNAME}/dev/solr/entrypoint.bash:/entrypoint.bash:ro"
volumes_from:
Expand All @@ -86,7 +90,9 @@ services:
environment:
- DEV_UID
- DEV_GID
- PROJECTCMSROOT
- PROJECTMAPPINGFOLDER
- SOLR_VERSION=$SOLR_VERSION
- SOLR_CORES=collection1

# Mailcatcher
Expand Down
2 changes: 1 addition & 1 deletion payload/dev/engine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM plopix/docker-php-ez-engine:7.4
FROM plopix/docker-php-ez-engine:$PHP_VERSION
MAINTAINER Plopix

ENV XDEBUG_ENABLED=0
Expand Down
10 changes: 5 additions & 5 deletions payload/dev/engine/entrypoint.bash
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ chown www-data:www-data $PROJECTMAPPINGFOLDER

# give the good permissions to www-data in the container and remove the cache on start
# 2.x
if [ -d $PROJECTMAPPINGFOLDER/ezplatform/var/cache ]; then
rm -rf $PROJECTMAPPINGFOLDER/ezplatform/var/cache
if [ -d $PROJECTCMSROOT/var/cache ]; then
rm -rf $PROJECTCMSROOT/var/cache
rm -rf $SYMFONY_TMP_DIR/var/cache
chown -R www-data:www-data $PROJECTMAPPINGFOLDER/ezplatform/var/logs
chown -R www-data:www-data $PROJECTMAPPINGFOLDER/ezplatform/web
chown -R www-data:www-data $PROJECTCMSROOT/var/logs
chown -R www-data:www-data $PROJECTCMSROOT/web
fi

if [ ! -f /usr/local/bin/composer ];
then
echo "WARNING: you don't have the last image of the PHP ENGINE"
echo "TO FIX RUN: ~/ez docker:update"
fi
/usr/local/bin/composer self-update --1
/usr/local/bin/composer self-update --$COMPOSER_VERSION

if [ "1" = "${XDEBUG_ENABLED}" ]; then
export PHP_INI_SCAN_DIR=:/usr/local/etc/php/enable-xdebug
Expand Down
24 changes: 12 additions & 12 deletions payload/dev/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ server {
server_name _;
# Project Root = project-path-container = /var/www/html/project
# Would be great to get that from ENV var PROJECTMAPPINGFOLDER
root "/var/www/html/project/ezplatform/public";
root "/var/www/html/project/ezplatform/web";

# FOR DFS
# include ez_params.d/ez_rewrite_dfsimage_params;
Expand All @@ -28,10 +28,10 @@ server {
fastcgi_read_timeout 30;

location / {
location ~ ^/index\.php(/|$) {
location ~ ^/app\.php(/|$) {
include ez_params.d/ez_fastcgi_params;
fastcgi_pass engine:9000;
fastcgi_param APP_ENV dev;
fastcgi_param SYMFONY_ENV dev;
fastcgi_param RUNNING_ENV DOCKER;
}
}
Expand All @@ -44,7 +44,7 @@ server {
server_name _;
# Project Root = project-path-container = /var/www/html/project
# Would be great to get that from ENV var PROJECTMAPPINGFOLDER
root "/var/www/html/project/ezplatform/public";
root "/var/www/html/project/ezplatform/web";

include ez_params.d/ez_prod_rewrite_params;

Expand All @@ -61,11 +61,11 @@ server {
fastcgi_read_timeout 30;

location / {
location ~ ^/index\.php(/|$) {
location ~ ^/app\.php(/|$) {
include ez_params.d/ez_fastcgi_params;

fastcgi_pass engine:9000;
fastcgi_param APP_ENV prod;
fastcgi_param SYMFONY_ENV prod;
fastcgi_param RUNNING_ENV DOCKER;
}
}
Expand All @@ -79,7 +79,7 @@ server {
server_name _;
# Project Root = project-path-container = /var/www/html/project
# Would be great to get that from ENV var PROJECTMAPPINGFOLDER
root "/var/www/html/project/ezplatform/public";
root "/var/www/html/project/ezplatform/web";

include ez_params.d/ez_prod_rewrite_params;

Expand All @@ -96,16 +96,16 @@ server {
fastcgi_read_timeout 30;

location / {
location ~ ^/index\.php(/|$) {
location ~ ^/app\.php(/|$) {
include ez_params.d/ez_fastcgi_params;

fastcgi_pass engine:9000;
fastcgi_param APP_ENV prod;
fastcgi_param SYMFONY_ENV prod;
fastcgi_param RUNNING_ENV DOCKER;
fastcgi_param APP_HTTP_CACHE 0;
fastcgi_param HTTPCACHE_PURGE_TYPE varnish;
fastcgi_param SYMFONY_HTTP_CACHE 0;
fastcgi_param HTTPCACHE_PURGE_TYPE http;
fastcgi_param HTTPCACHE_PURGE_SERVER 'http://varnish:80';
fastcgi_param TRUSTED_PROXIES "127.0.0.1,localhost,172.0.0.0/8,varnish,192.168.0.0/16";
fastcgi_param SYMFONY_TRUSTED_PROXIES "127.0.0.1,localhost,172.0.0.0/8,varnish";
}
}
include ez_params.d/ez_server_params;
Expand Down
112 changes: 112 additions & 0 deletions payload/dev/nginx/nginx_v3.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# GZIP
gzip on;
gzip_disable "msie6";
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/x-javascript text/xml application/xml application/xml+rss text/javascript;

# DEV MODE
server {
listen 80;
server_name _;
# Project Root = project-path-container = /var/www/html/project
# Would be great to get that from ENV var PROJECTMAPPINGFOLDER
root "/var/www/html/project/ezplatform/public";

# FOR DFS
# include ez_params.d/ez_rewrite_dfsimage_params;

# ez rewrite rules
include ez_params.d/ez_rewrite_params;

# upload max size
client_max_body_size 40M;

# FPM fastcgi_read_timeout
fastcgi_read_timeout 30;

location / {
location ~ ^/index\.php(/|$) {
include ez_params.d/ez_fastcgi_params;
fastcgi_pass engine:9000;
fastcgi_param APP_ENV dev;
fastcgi_param RUNNING_ENV DOCKER;
}
}
include ez_params.d/ez_server_params;
}

# PROD MODE - Symfony Reverse Proxy
server {
listen 81;
server_name _;
# Project Root = project-path-container = /var/www/html/project
# Would be great to get that from ENV var PROJECTMAPPINGFOLDER
root "/var/www/html/project/ezplatform/public";

include ez_params.d/ez_prod_rewrite_params;

# FOR DFS
# include ez_params.d/ez_rewrite_dfsimage_params;

# ez rewrite rules
include ez_params.d/ez_rewrite_params;

# upload max size
client_max_body_size 40M;

# FPM fastcgi_read_timeout
fastcgi_read_timeout 30;

location / {
location ~ ^/index\.php(/|$) {
include ez_params.d/ez_fastcgi_params;

fastcgi_pass engine:9000;
fastcgi_param APP_ENV prod;
fastcgi_param RUNNING_ENV DOCKER;
}
}
include ez_params.d/ez_server_params;
}


# PROD MODE - Varnish
server {
listen 82;
server_name _;
# Project Root = project-path-container = /var/www/html/project
# Would be great to get that from ENV var PROJECTMAPPINGFOLDER
root "/var/www/html/project/ezplatform/public";

include ez_params.d/ez_prod_rewrite_params;

# FOR DFS
# include ez_params.d/ez_rewrite_dfsimage_params;

# ez rewrite rules
include ez_params.d/ez_rewrite_params;

# upload max size
client_max_body_size 40M;

# FPM fastcgi_read_timeout
fastcgi_read_timeout 30;

location / {
location ~ ^/index\.php(/|$) {
include ez_params.d/ez_fastcgi_params;

fastcgi_pass engine:9000;
fastcgi_param APP_ENV prod;
fastcgi_param RUNNING_ENV DOCKER;
fastcgi_param APP_HTTP_CACHE 0;
fastcgi_param HTTPCACHE_PURGE_TYPE varnish;
fastcgi_param HTTPCACHE_PURGE_SERVER 'http://varnish:80';
fastcgi_param TRUSTED_PROXIES "127.0.0.1,localhost,172.0.0.0/8,varnish,192.168.0.0/16";
}
}
include ez_params.d/ez_server_params;
}
Loading