diff --git a/.docker/nginx.conf b/.docker/nginx.conf index 688d3b9e3..ce25cd9cf 100644 --- a/.docker/nginx.conf +++ b/.docker/nginx.conf @@ -1,9 +1,6 @@ # mime types are already covered in nginx.conf #include mime.types; -types { - image/avif avif; -} upstream php-pimcore10 { server php:9000; @@ -105,7 +102,7 @@ server { # Assets # Still use a whitelist approach to prevent each and every missing asset to go through the PHP Engine. - location ~* ^(?!/admin)(.+?)\.((?:css|js)(?:\.map)?|jpe?g|gif|png|svgz?|eps|exe|gz|zip|mp\d|m4a|ogg|ogv|webm|pdf|docx?|xlsx?|pptx?)$ { + location ~* ^(?!/admin|/asset/webdav)(.+?)\.((?:css|js)(?:\.map)?|jpe?g|gif|png|svgz?|eps|exe|gz|zip|mp\d|m4a|ogg|ogv|webp|webm|pdf|docx?|xlsx?|pptx?)$ { try_files /var/assets$uri $uri =404; expires 2w; access_log off; diff --git a/.docker/supervisord.conf b/.docker/supervisord.conf index 748a09025..e0956b3de 100644 --- a/.docker/supervisord.conf +++ b/.docker/supervisord.conf @@ -13,7 +13,7 @@ stdout_logfile_maxbytes=0 redirect_stderr=true [program:maintenance] -command=bash -c 'sleep 3600 && exec php /var/www/html/bin/console pimcore:maintenance --async' +command=bash -c 'sleep 3600 && exec php /var/www/html/bin/console pimcore:maintenance' autostart=true autorestart=true stdout_logfile=/dev/fd/1 diff --git a/.github/workflows/pimcore-skeleton.yml b/.github/workflows/pimcore-skeleton.yml index cbc679ff4..42347916f 100644 --- a/.github/workflows/pimcore-skeleton.yml +++ b/.github/workflows/pimcore-skeleton.yml @@ -68,6 +68,9 @@ jobs: cd sample-project/ + # Set up docker-compose.yaml to use current user's uid:gid, just like README.md suggests. + sed -i "s|#user: '1000:1000'|user: '$(id -u):$(id -g)'|g" docker-compose.yaml + # Start containers docker compose pull --quiet docker compose up -d @@ -87,5 +90,6 @@ jobs: cd sample-project/ # Set up and execute codeception tests, just like README.md suggests. + docker compose run --user=root --rm test-php chown -R $(id -u):$(id -g) var/ public/var/ docker compose run --rm -T test-php vendor/bin/pimcore-install -n docker compose run --rm -T test-php vendor/bin/codecept run -vv diff --git a/.gitignore b/.gitignore index 159ccab4c..8e92a919a 100644 --- a/.gitignore +++ b/.gitignore @@ -23,7 +23,6 @@ !/var/config /var/config/system.yml -/var/config/debug-mode.php /var/config/maintenance.php # project specific recommendations diff --git a/README.md b/README.md index f5bc729e4..ce9d70a1d 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ cd ./my-project You can also use Docker to set up a new Pimcore Installation. You don't need to have a PHP environment with composer installed. -### Prerequisits +### Prerequisites * Your user must be allowed to run docker commands (directly or via sudo). * You must have docker compose installed. @@ -33,8 +33,7 @@ You don't need to have a PHP environment with composer installed. `cd my-project/` 3. Part of the new project is a docker compose file - * Run `` echo `id -u`:`id -g` `` to retrieve your local user and group id - * Open the `docker-compose.yaml` file in an editor, uncomment all the `user: '1000:1000'` lines and update the ids if necessary + * Run `sed -i "s|#user: '1000:1000'|user: '$(id -u):$(id -g)'|g" docker-compose.yaml` to set the correct user id and group id. * Start the needed services with `docker compose up -d` 4. Install pimcore and initialize the DB @@ -44,6 +43,7 @@ You don't need to have a PHP environment with composer installed. * If you select to install the SimpleBackendSearchBundle please make sure to add the `pimcore_search_backend_message` to your `.docker/supervisord.conf` file. 5. Run codeception tests: + * `docker compose run --user=root --rm test-php chown -R $(id -u):$(id -g) var/ public/var/` * `docker compose run --rm test-php vendor/bin/pimcore-install -n` * `docker compose run --rm test-php vendor/bin/codecept run -vv` diff --git a/composer.enterprise.json b/composer.enterprise.json new file mode 100644 index 000000000..4a291ed28 --- /dev/null +++ b/composer.enterprise.json @@ -0,0 +1,60 @@ +{ + "name": "pimcore/skeleton", + "type": "project", + "license": "GPL-3.0-or-later", + "config": { + "optimize-autoloader": true, + "sort-packages": true, + "process-timeout": 0, + "allow-plugins": { + "symfony/runtime": true + } + }, + "prefer-stable": true, + "require": { + "pimcore/pimcore": "^11.0", + "pimcore/admin-ui-classic-bundle": "^1.0", + "pimcore/platform-version": "^2023.1", + "symfony/runtime": "^6.2", + "symfony/dotenv": "^6.2" + }, + "require-dev": { + "codeception/codeception": "^5.0.3", + "codeception/module-symfony": "^3.1.0" + }, + "suggest": { + "pimcore/data-hub": "Universal data interface for GraphQL, CSV and other formats" + }, + "autoload": { + "psr-4": { + "App\\": "src/", + "Pimcore\\Model\\DataObject\\": "var/classes/DataObject" + } + }, + "autoload-dev": { + "psr-4": { + "App\\Tests\\": "tests/" + } + }, + "scripts": { + "post-create-project-cmd": "Pimcore\\Composer::postCreateProject", + "post-install-cmd": [ + "Pimcore\\Composer::postInstall", + "@pimcore-scripts" + ], + "post-update-cmd": [ + "Pimcore\\Composer::postUpdate", + "@pimcore-scripts" + ], + "pimcore-scripts": [ + "Pimcore\\Composer::clearCache", + "Pimcore\\Composer::installAssets" + ] + }, + "repositories": { + "enterprise": { + "type": "composer", + "url": "https://enterprise.repo.pimcore.com/" + } + } +} diff --git a/composer.json b/composer.json index b73aa4959..23e88f3e2 100644 --- a/composer.json +++ b/composer.json @@ -11,17 +11,12 @@ } }, "prefer-stable": true, - "minimum-stability": "dev", "require": { - "pimcore/pimcore": "^11.0", + "pimcore/pimcore": "^11.0.4", "pimcore/admin-ui-classic-bundle": "^1.0", "symfony/runtime": "^6.2", "symfony/dotenv": "^6.2" }, - "conflict": { - "pimcore/pimcore": "v11.0.0-ALPHA1 || v11.0.0-ALPHA2 || v11.0.0-ALPHA3 || v11.0.0-ALPHA4 || v11.0.0-ALPHA5 || v11.0.0-ALPHA6 || v11.0.0-ALPHA7 || v11.0.0-ALPHA8 || v11.0.0-BETA1 || v11.0.0-RC1", - "pimcore/admin-ui-classic-bundle": "v1.0.0-BETA1" - }, "require-dev": { "codeception/codeception": "^5.0.3", "codeception/module-symfony": "^3.1.0" diff --git a/config/config.yaml b/config/config.yaml index cb22ac127..b71a407ee 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -110,9 +110,8 @@ framework: # pools: # pimcore.cache.pool: # public: true -# tags: true # default_lifetime: 31536000 # 1 year -# adapter: pimcore.cache.adapter.redis_tag_aware +# adapter: cache.adapter.redis_tag_aware # provider: 'redis://localhost' # Redis DNS, see: https://symfony.com/doc/current/components/cache/adapters/redis_adapter.html#configure-the-connection #### USE SESSION HANDLER CONFIGURED IN php.ini diff --git a/docker-compose.yaml b/docker-compose.yaml index 58d63cc18..155c4d324 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -36,7 +36,7 @@ services: php: #user: '1000:1000' # set to your uid:gid - image: pimcore/pimcore:php8.2-debug-v2-dev + image: pimcore/pimcore:php8.2-debug-latest environment: COMPOSER_HOME: /var/www/html PHP_IDE_CONFIG: serverName=localhost @@ -55,7 +55,7 @@ services: supervisord: #user: '1000:1000' # set to your uid:gid - image: pimcore/pimcore:php8.2-supervisord-v2-dev + image: pimcore/pimcore:php8.2-supervisord-latest depends_on: db: condition: service_healthy