From 9dccfe101a128ca11b60fca9c147131366d36831 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Tue, 7 May 2024 11:41:57 -0400 Subject: [PATCH 001/131] .dockerignore file --- .dockerignore | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..bfd070be0 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,10 @@ +vendor +var/cache +var/application-logger +var/email +public/var +public/bundles +var/assets +var/versions +var/log +var/installer \ No newline at end of file From b496038ecc45aa951b892a9ad17ef23bae247eaa Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Tue, 7 May 2024 11:45:38 -0400 Subject: [PATCH 002/131] Using 1000:1000 for uid:gid as that is consistent for our local setups --- docker-compose.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 33ef756db..118bae3e5 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -40,7 +40,7 @@ services: - php php: - #user: '1000:1000' # set to your uid:gid + user: '1000:1000' image: pimcore/pimcore:php8.2-debug-latest environment: COMPOSER_HOME: /var/www/html @@ -60,7 +60,7 @@ services: - ./.docker/messenger.yaml:/var/www/html/config/packages/messenger.yaml:ro supervisord: - #user: '1000:1000' # set to your uid:gid + user: '1000:1000' image: pimcore/pimcore:php8.2-supervisord-latest depends_on: rabbitmq: From 1b2907ac873d57b9aedfc0c579cc717b508eceb2 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Tue, 7 May 2024 12:15:33 -0400 Subject: [PATCH 003/131] Adding Platform Version 2024.1 dependency --- composer.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 2b67eebc1..4172b6f8c 100644 --- a/composer.json +++ b/composer.json @@ -12,8 +12,9 @@ }, "prefer-stable": true, "require": { - "pimcore/pimcore": "^11.1", - "pimcore/admin-ui-classic-bundle": "^1.2", + "pimcore/pimcore": "*", + "pimcore/admin-ui-classic-bundle": "^1.4", + "pimcore/platform-version": "2024.1", "symfony/amqp-messenger": "^6.2", "symfony/dotenv": "^6.2", "symfony/runtime": "^6.2" From e7f517dcf9211944c32103c372e8d593ef622e96 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Tue, 7 May 2024 15:53:26 -0400 Subject: [PATCH 004/131] Ignoring composer cache directory in Git and Docker --- .dockerignore | 1 + .gitignore | 1 + 2 files changed, 2 insertions(+) diff --git a/.dockerignore b/.dockerignore index bfd070be0..4239e301b 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,4 +1,5 @@ vendor +cache var/cache var/application-logger var/email diff --git a/.gitignore b/.gitignore index 8e92a919a..f68fc69ba 100644 --- a/.gitignore +++ b/.gitignore @@ -39,6 +39,7 @@ # composer /vendor/ +/cache/ # PhpStorm / IDEA .idea From 4b6a27d21128458c5dcb27d16ee5549402ff521f Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Tue, 7 May 2024 19:07:05 -0400 Subject: [PATCH 005/131] First pass at customized Docker setup --- .docker/Dockerfile | 67 +++++++++++++++++ .docker/composer-install-dependencies.sh | 4 ++ .docker/init/init.local.sh | 12 ++++ .docker/init/init.sh | 42 +++++++++++ .docker/messenger.yaml | 8 --- .docker/{ => php}/nginx.conf | 0 .docker/php/supervisord.conf | 24 +++++++ .docker/{ => supervisord}/supervisord.conf | 0 .env | 20 ++++++ .gitignore | 2 + docker-compose.yaml | 83 +++++++++++----------- 11 files changed, 214 insertions(+), 48 deletions(-) create mode 100644 .docker/Dockerfile create mode 100755 .docker/composer-install-dependencies.sh create mode 100755 .docker/init/init.local.sh create mode 100755 .docker/init/init.sh delete mode 100644 .docker/messenger.yaml rename .docker/{ => php}/nginx.conf (100%) create mode 100644 .docker/php/supervisord.conf rename .docker/{ => supervisord}/supervisord.conf (100%) diff --git a/.docker/Dockerfile b/.docker/Dockerfile new file mode 100644 index 000000000..1cbdbe7e2 --- /dev/null +++ b/.docker/Dockerfile @@ -0,0 +1,67 @@ +FROM pimcore/pimcore:php8.2-v3 as base +# TODO arg for passing in custom Linux packages +RUN set -eux; \ + apt-get update -y; \ + apt-get install -y --no-install-recommends vim supervisor netcat-traditional default-mysql-client; \ + rm -rf /var/lib/apt/lists/*; \ + usermod -u 1000 www-data; \ + groupmod -g 1000 www-data; +# We copy in the composer files and download dependencies, then in a separate set of statements below copy in the full +# source directory and run a full composer install. This will take advantage of Docker-build caching when the composer +# dependencies do not change. +# TODO stage/context option for custom composer files +COPY --chown=www-data:www-data /composer.json /var/www/html/composer.json +COPY --chown=www-data:www-data /composer.lock /var/www/html/composer.lock +COPY /.docker/composer-install-dependencies.sh /composer-install-dependencies.sh +RUN /composer-install-dependencies.sh +# TODO be more selective about what to copy into image +COPY --chown=www-data:www-data / /var/www/html +RUN cd /var/www/html; \ + runuser -u www-data -- php /usr/local/bin/composer install + +FROM base as init +# TODO allow for custom bundles to be passed via args +COPY /.docker/init/init.sh /init.sh +CMD [ "/init.sh" ] + +# Default sources for config files +# TODO php.ini - should probably go at base level? +FROM base as nginx-conf-src +COPY /.docker/php/nginx.conf /etc/nginx/sites-available/default +# TODO php fpm ini + +FROM base as php +RUN set -eux; \ + apt-get update -y; \ + apt-get install -y --no-install-recommends nginx; \ + rm -rf /var/lib/apt/lists/*; +# TODO what to specify as "source path" when copying from outside context? +COPY --from=nginx-conf-src /etc/nginx/sites-available/default /etc/nginx/sites-available/default +COPY /.docker/php/supervisord.conf /etc/supervisor/supervisord.conf +RUN runuser -u www-data -- /var/www/html/bin/console pimcore:build:classes; \ + runuser -u www-data -- /var/www/html/bin/console cache:warmup +CMD [ "/usr/bin/supervisord" ] + +FROM base as supervisord-conf-src +COPY /.docker/supervisord/supervisord.conf /etc/supervisor/conf.d/pimcore.conf + +FROM base as supervisord +RUN set -eux; \ + apt-get update -y; \ + apt-get install -y --no-install-recommends cron; \ + rm -rf /var/lib/apt/lists/*; +COPY --from=pimcore/pimcore:php8.2-supervisord-v3 /var/run /var/run +COPY --from=pimcore/pimcore:php8.2-supervisord-v3 /usr/sbin/cron /usr/sbin/cron +COPY --from=pimcore/pimcore:php8.2-supervisord-v3 /etc/supervisor/supervisord.conf /etc/supervisor/supervisord.conf +COPY --from=supervisord-conf-src /etc/supervisor/conf.d/pimcore.conf /etc/supervisor/conf.d/pimcore.conf +RUN runuser -u www-data -- /var/www/html/bin/console pimcore:build:classes; \ + runuser -u www-data -- /var/www/html/bin/console cache:warmup +CMD [ "/usr/bin/supervisord" ] + +FROM base as php-debug +COPY --from=pimcore/pimcore:php8.2-debug-v3 /usr/local/bin/entrypoint.sh /usr/local/bin/entrypoint.sh +RUN pecl install xdebug; \ + docker-php-ext-enable xdebug; +ENV PHP_IDE_CONFIG serverName=localhost +ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] +CMD ["php-fpm"] \ No newline at end of file diff --git a/.docker/composer-install-dependencies.sh b/.docker/composer-install-dependencies.sh new file mode 100755 index 000000000..5e7365496 --- /dev/null +++ b/.docker/composer-install-dependencies.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +echo Installing Composer packages... +# Use --no-scripts so that we simply download and install packages, then at a later point we will run the scripts to fully install Pimcore +cd /var/www/html && runuser -u www-data -- php -d memory_limit=-1 -d xdebug.remote_enable=0 /usr/local/bin/composer install --prefer-dist --no-scripts \ No newline at end of file diff --git a/.docker/init/init.local.sh b/.docker/init/init.local.sh new file mode 100755 index 000000000..feddf8129 --- /dev/null +++ b/.docker/init/init.local.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -e + +if [ ! -d /var/www/html/vendor ]; +then + . /composer-install-dependencies.sh +fi + +#runuser -u www-data -- bin/console cache:clear + +. /init.sh \ No newline at end of file diff --git a/.docker/init/init.sh b/.docker/init/init.sh new file mode 100755 index 000000000..ab4f5ca32 --- /dev/null +++ b/.docker/init/init.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash + +set -e + +echo "Database host is $DATABASE_HOST" + +# TODO extra condition to make extra-sure this doesn't run in non-local envs +if [ "$(mysql -h "$DATABASE_HOST" -u "$DATABASE_USER" -p"$DATABASE_PASSWORD" \ + -sse "select count(*) from information_schema.tables where table_schema='pimcore' and table_name='assets';")" -eq 0 ] +then + echo "Database is empty, so doing a fresh install to seed the database..." + runuser -u www-data -- vendor/bin/pimcore-install --skip-database-config +fi + +echo Installing bundles... +#runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreApplicationLoggerBundle +#runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreCustomReportsBundle +#runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreDataHubBundle +#runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreDataImporterBundle +#runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreGlossaryBundle +#runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreSeoBundle +#runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreSimpleBackendSearchBundle +#runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreStaticRoutesBundle +#runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreTinymceBundle +#runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreUuidBundle +#runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreXliffBundle +#runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreWordExportBundle +#runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreWebToPrintBundle +#runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install ElementsProcessManagerBundle +# TODO use env var as list of extra bundles to install + +echo Running migration... +runuser -u www-data -- /var/www/html/bin/console doctrine:migrations:migrate -n + +echo Rebuilding classes... +runuser -u www-data -- /var/www/html/bin/console pimcore:deployment:classes-rebuild -c -d -n + +echo Generating roles... +# TODO role creator + +echo Generating folders... +# TODO folder creator \ No newline at end of file diff --git a/.docker/messenger.yaml b/.docker/messenger.yaml deleted file mode 100644 index 6895228ac..000000000 --- a/.docker/messenger.yaml +++ /dev/null @@ -1,8 +0,0 @@ -framework: - messenger: - transports: - pimcore_core: 'amqp://rabbitmq:5672/%2f/pimcore_core' - pimcore_maintenance: 'amqp://rabbitmq:5672/%2f/pimcore_maintenance' - pimcore_scheduled_tasks: 'amqp://rabbitmq:5672/%2f/pimcore_scheduled_tasks' - pimcore_image_optimize: 'amqp://rabbitmq:5672/%2f/pimcore_image_optimize' - pimcore_asset_update: 'amqp://rabbitmq:5672/%2f/pimcore_asset_update' diff --git a/.docker/nginx.conf b/.docker/php/nginx.conf similarity index 100% rename from .docker/nginx.conf rename to .docker/php/nginx.conf diff --git a/.docker/php/supervisord.conf b/.docker/php/supervisord.conf new file mode 100644 index 000000000..64cce0b30 --- /dev/null +++ b/.docker/php/supervisord.conf @@ -0,0 +1,24 @@ +[supervisord] +nodaemon=true +logfile=/dev/null +logfile_maxbytes=0 + +[program:nginx] +command=/usr/sbin/nginx -g "daemon off;" +autostart=true +autorestart=true +startretries=5 +numprocs=1 +startsecs=0 +process_name=%(program_name)s_%(process_num)02d +stdout_logfile=/dev/fd/1 +stdout_logfile_maxbytes=0 +redirect_stderr=true + +[program:php-fpm] +command=php-fpm +autostart=true +autorestart=true +stdout_logfile=/dev/fd/1 +stdout_logfile_maxbytes=0 +redirect_stderr=true \ No newline at end of file diff --git a/.docker/supervisord.conf b/.docker/supervisord/supervisord.conf similarity index 100% rename from .docker/supervisord.conf rename to .docker/supervisord/supervisord.conf diff --git a/.env b/.env index cfb0cde15..9b8fa0584 100644 --- a/.env +++ b/.env @@ -21,3 +21,23 @@ PIMCORE_DEV_MODE=false #TRUSTED_PROXIES=127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 #TRUSTED_HOSTS='^(localhost|example\.com)$' ###< symfony/framework-bundle ### + +DATABASE_HOST=db +DATABASE_PORT=3306 +DATABASE_NAME=pimcore +DATABASE_USER=pimcore +DATABASE_PASSWORD=pimcore +PIMCORE_INSTALL_MYSQL_HOST_SOCKET=${DATABASE_HOST} +PIMCORE_INSTALL_MYSQL_PORT=${DATABASE_PORT} +PIMCORE_INSTALL_MYSQL_USERNAME=${DATABASE_USER} +PIMCORE_INSTALL_MYSQL_PASSWORD=${DATABASE_PASSWORD} +PIMCORE_INSTALL_MYSQL_DATABASE=${DATABASE_NAME} +PIMCORE_INSTALL_ADMIN_USERNAME=admin +PIMCORE_INSTALL_ADMIN_PASSWORD=pimcore +MYSQL_ROOT_PASSWORD=ROOT +MYSQL_DATABASE=${DATABASE_NAME} +MYSQL_USER=${DATABASE_USER} +MYSQL_PASSWORD=${DATABASE_PASSWORD} + + + diff --git a/.gitignore b/.gitignore index f68fc69ba..9c8b0be59 100644 --- a/.gitignore +++ b/.gitignore @@ -48,3 +48,5 @@ nbproject # temp .temp + +supervisord.pid \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml index 118bae3e5..7adca1423 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -3,11 +3,6 @@ services: image: redis:alpine command: [ redis-server, --maxmemory 128mb, --maxmemory-policy volatile-lru, --save "" ] - rabbitmq: - image: rabbitmq:alpine - volumes: - - pimcore-rabbitmq:/var/lib/rabbitmq/ - db: image: mariadb:10.11 working_dir: /application @@ -15,10 +10,10 @@ services: volumes: - pimcore-database:/var/lib/mysql environment: - - MYSQL_ROOT_PASSWORD=ROOT - - MYSQL_DATABASE=pimcore - - MYSQL_USER=pimcore - - MYSQL_PASSWORD=pimcore + - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD} + - MYSQL_DATABASE=${MYSQL_DATABASE} + - MYSQL_USER=${MYSQL_USER} + - MYSQL_PASSWORD=${MYSQL_PASSWORD} healthcheck: # The service is considered healthy when: # - connection to pimcore db can be established, and @@ -29,48 +24,57 @@ services: start_period: 1m timeout: 3s - nginx: - image: nginx:stable-alpine - ports: - - "80:80" - volumes: - - .:/var/www/html:ro - - ./.docker/nginx.conf:/etc/nginx/conf.d/default.conf:ro + init: + build: + dockerfile: ./.docker/Dockerfile + target: init depends_on: - - php + db: + condition: service_healthy + env_file: + - .env + volumes: + - .:/var/www/html + - ./.docker/init/init.local.sh:/init.local.sh + command: [ "/init.local.sh" ] php: - user: '1000:1000' - image: pimcore/pimcore:php8.2-debug-latest + build: + dockerfile: ./.docker/Dockerfile + target: php environment: - COMPOSER_HOME: /var/www/html - PHP_IDE_CONFIG: serverName=localhost - # Feed installer configuration via ENV variables. - # See: https://pimcore.com/docs/pimcore/current/Development_Documentation/Getting_Started/Advanced_Installation_Topics.html#page_Advanced-Installation-Topics - PIMCORE_INSTALL_MYSQL_USERNAME: pimcore - PIMCORE_INSTALL_MYSQL_PASSWORD: pimcore - PIMCORE_INSTALL_MYSQL_PORT: 3306 - PIMCORE_INSTALL_MYSQL_HOST_SOCKET: db - PIMCORE_INSTALL_MYSQL_DATABASE: pimcore + COMPOSER_HOME: /var/www/html + PHP_IDE_CONFIG: serverName=localhost + # Feed installer configuration via ENV variables. + # See: https://pimcore.com/docs/pimcore/current/Development_Documentation/Getting_Started/Advanced_Installation_Topics.html#page_Advanced-Installation-Topics + PIMCORE_INSTALL_MYSQL_USERNAME: ${PIMCORE_INSTALL_MYSQL_USERNAME} + PIMCORE_INSTALL_MYSQL_PASSWORD: ${PIMCORE_INSTALL_MYSQL_PASSWORD} + PIMCORE_INSTALL_MYSQL_PORT: ${PIMCORE_INSTALL_MYSQL_PORT} + PIMCORE_INSTALL_MYSQL_HOST_SOCKET: ${PIMCORE_INSTALL_MYSQL_HOST_SOCKET} + PIMCORE_INSTALL_MYSQL_DATABASE: ${PIMCORE_INSTALL_MYSQL_DATABASE} + env_file: + - .env depends_on: - db: - condition: service_healthy + init: + condition: service_completed_successfully + ports: + - "80:80" volumes: - .:/var/www/html - - ./.docker/messenger.yaml:/var/www/html/config/packages/messenger.yaml:ro + - ./.docker/php/nginx.conf:/etc/nginx/sites-available/default:ro supervisord: - user: '1000:1000' - image: pimcore/pimcore:php8.2-supervisord-latest + build: + dockerfile: ./.docker/Dockerfile + target: supervisord depends_on: - rabbitmq: - condition: service_started - db: - condition: service_healthy + init: + condition: service_completed_successfully + env_file: + - .env volumes: - .:/var/www/html - - ./.docker/messenger.yaml:/var/www/html/config/packages/messenger.yaml:ro - - ./.docker/supervisord.conf:/etc/supervisor/conf.d/pimcore.conf:ro + - ./.docker/supervisord/supervisord.conf:/etc/supervisor/conf.d/pimcore.conf:ro # The following two services are used for testing. # We restrict these services to the test profile only, so we don't spin them up with every `docker compose up`. @@ -99,7 +103,6 @@ services: volumes: pimcore-database: - pimcore-rabbitmq: pimcore-test-database: pimcore-test-var: pimcore-test-public-var: From bb25d34a188c883562d270f7e3cb85bd7f15ea6d Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Wed, 8 May 2024 15:55:02 -0400 Subject: [PATCH 006/131] Adding APP_NAME env var --- .env | 1 + docker-compose.yaml | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/.env b/.env index 9b8fa0584..cd23dc702 100644 --- a/.env +++ b/.env @@ -22,6 +22,7 @@ PIMCORE_DEV_MODE=false #TRUSTED_HOSTS='^(localhost|example\.com)$' ###< symfony/framework-bundle ### +APP_NAME=torq-pimcore-skeleton DATABASE_HOST=db DATABASE_PORT=3306 DATABASE_NAME=pimcore diff --git a/docker-compose.yaml b/docker-compose.yaml index 7adca1423..8fbb9abe8 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,9 +1,11 @@ services: redis: + container_name: ${APP_NAME}-redis image: redis:alpine command: [ redis-server, --maxmemory 128mb, --maxmemory-policy volatile-lru, --save "" ] db: + container_name: ${APP_NAME}-db image: mariadb:10.11 working_dir: /application command: [ mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_general_ci, --innodb-file-per-table=1 ] @@ -25,6 +27,7 @@ services: timeout: 3s init: + container_name: ${APP_NAME}-init build: dockerfile: ./.docker/Dockerfile target: init @@ -39,6 +42,7 @@ services: command: [ "/init.local.sh" ] php: + container_name: ${APP_NAME}-php build: dockerfile: ./.docker/Dockerfile target: php @@ -64,6 +68,7 @@ services: - ./.docker/php/nginx.conf:/etc/nginx/sites-available/default:ro supervisord: + container_name: ${APP_NAME}-supervisord build: dockerfile: ./.docker/Dockerfile target: supervisord From 9be03284d2a26d5de8883143f3d7dfe56add2d15 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Wed, 8 May 2024 15:55:26 -0400 Subject: [PATCH 007/131] Reintroducing cache:clear in init.local --- .docker/init/init.local.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.docker/init/init.local.sh b/.docker/init/init.local.sh index feddf8129..0ec142817 100755 --- a/.docker/init/init.local.sh +++ b/.docker/init/init.local.sh @@ -7,6 +7,6 @@ then . /composer-install-dependencies.sh fi -#runuser -u www-data -- bin/console cache:clear +runuser -u www-data -- bin/console cache:clear . /init.sh \ No newline at end of file From a68c9f1cbd0fd407e7981dbb496cae2a7c07520d Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Wed, 8 May 2024 16:16:54 -0400 Subject: [PATCH 008/131] Contingency in case composer.lock is missing --- .docker/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.docker/Dockerfile b/.docker/Dockerfile index 1cbdbe7e2..15d33d20e 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -10,8 +10,7 @@ RUN set -eux; \ # source directory and run a full composer install. This will take advantage of Docker-build caching when the composer # dependencies do not change. # TODO stage/context option for custom composer files -COPY --chown=www-data:www-data /composer.json /var/www/html/composer.json -COPY --chown=www-data:www-data /composer.lock /var/www/html/composer.lock +COPY --chown=www-data:www-data /composer.* /var/www/html COPY /.docker/composer-install-dependencies.sh /composer-install-dependencies.sh RUN /composer-install-dependencies.sh # TODO be more selective about what to copy into image From f5511864a928b7275739461c422697f8b781350a Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Wed, 8 May 2024 16:17:14 -0400 Subject: [PATCH 009/131] Core bundles installed and enabled --- .docker/init/init.sh | 20 ++++++++++---------- src/Kernel.php | 20 ++++++++++++++++++++ 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/.docker/init/init.sh b/.docker/init/init.sh index ab4f5ca32..d6443e787 100755 --- a/.docker/init/init.sh +++ b/.docker/init/init.sh @@ -13,18 +13,18 @@ then fi echo Installing bundles... -#runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreApplicationLoggerBundle -#runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreCustomReportsBundle +runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreApplicationLoggerBundle --fail-without-error +runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreCustomReportsBundle --fail-without-error +runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreGlossaryBundle --fail-without-error +runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreSeoBundle --fail-without-error +runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreSimpleBackendSearchBundle --fail-without-error +runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreStaticRoutesBundle --fail-without-error +runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreTinymceBundle --fail-without-error +runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreUuidBundle --fail-without-error +runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreXliffBundle --fail-without-error +runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreWordExportBundle --fail-without-error #runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreDataHubBundle #runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreDataImporterBundle -#runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreGlossaryBundle -#runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreSeoBundle -#runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreSimpleBackendSearchBundle -#runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreStaticRoutesBundle -#runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreTinymceBundle -#runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreUuidBundle -#runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreXliffBundle -#runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreWordExportBundle #runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreWebToPrintBundle #runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install ElementsProcessManagerBundle # TODO use env var as list of extra bundles to install diff --git a/src/Kernel.php b/src/Kernel.php index 9669c3f8c..093be3bb1 100644 --- a/src/Kernel.php +++ b/src/Kernel.php @@ -16,6 +16,16 @@ namespace App; use Pimcore\Bundle\AdminBundle\PimcoreAdminBundle; +use Pimcore\Bundle\ApplicationLoggerBundle\PimcoreApplicationLoggerBundle; +use Pimcore\Bundle\CustomReportsBundle\PimcoreCustomReportsBundle; +use Pimcore\Bundle\GlossaryBundle\PimcoreGlossaryBundle; +use Pimcore\Bundle\SeoBundle\PimcoreSeoBundle; +use Pimcore\Bundle\SimpleBackendSearchBundle\PimcoreSimpleBackendSearchBundle; +use Pimcore\Bundle\StaticRoutesBundle\PimcoreStaticRoutesBundle; +use Pimcore\Bundle\TinymceBundle\PimcoreTinymceBundle; +use Pimcore\Bundle\UuidBundle\PimcoreUuidBundle; +use Pimcore\Bundle\WordExportBundle\PimcoreWordExportBundle; +use Pimcore\Bundle\XliffBundle\PimcoreXliffBundle; use Pimcore\HttpKernel\BundleCollection\BundleCollection; use Pimcore\Kernel as PimcoreKernel; @@ -30,5 +40,15 @@ class Kernel extends PimcoreKernel public function registerBundlesToCollection(BundleCollection $collection): void { $collection->addBundle(new PimcoreAdminBundle(), 60); + $collection->addBundle(new PimcoreApplicationLoggerBundle()); + $collection->addBundle(new PimcoreCustomReportsBundle()); + $collection->addBundle(new PimcoreGlossaryBundle()); + $collection->addBundle(new PimcoreSeoBundle()); + $collection->addBundle(new PimcoreSimpleBackendSearchBundle()); + $collection->addBundle(new PimcoreStaticRoutesBundle()); + $collection->addBundle(new PimcoreTinymceBundle()); + $collection->addBundle(new PimcoreUuidBundle()); + $collection->addBundle(new PimcoreXliffBundle()); + $collection->addBundle(new PimcoreWordExportBundle()); } } From 133c3a19ff2165d33119df60d880dae37785b685 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Wed, 8 May 2024 16:48:42 -0400 Subject: [PATCH 010/131] Config for debug container --- .docker/Dockerfile | 13 ++++++++----- docker-compose.yaml | 24 ++++++++++++++++++++---- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/.docker/Dockerfile b/.docker/Dockerfile index 15d33d20e..265660d76 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -2,10 +2,17 @@ FROM pimcore/pimcore:php8.2-v3 as base # TODO arg for passing in custom Linux packages RUN set -eux; \ apt-get update -y; \ - apt-get install -y --no-install-recommends vim supervisor netcat-traditional default-mysql-client; \ + apt-get install -y --no-install-recommends autoconf make g++ unixodbc-dev cron vim supervisor netcat-traditional default-mysql-client; \ rm -rf /var/lib/apt/lists/*; \ usermod -u 1000 www-data; \ groupmod -g 1000 www-data; +# TODO required until Pimcore adds this to their image... +RUN set -eux; \ + apt-get update -y; \ + apt-get install -y librabbitmq-dev; \ + rm -rf /var/lib/apt/lists/*; \ + pecl install amqp; \ + docker-php-ext-enable amqp; # We copy in the composer files and download dependencies, then in a separate set of statements below copy in the full # source directory and run a full composer install. This will take advantage of Docker-build caching when the composer # dependencies do not change. @@ -45,10 +52,6 @@ FROM base as supervisord-conf-src COPY /.docker/supervisord/supervisord.conf /etc/supervisor/conf.d/pimcore.conf FROM base as supervisord -RUN set -eux; \ - apt-get update -y; \ - apt-get install -y --no-install-recommends cron; \ - rm -rf /var/lib/apt/lists/*; COPY --from=pimcore/pimcore:php8.2-supervisord-v3 /var/run /var/run COPY --from=pimcore/pimcore:php8.2-supervisord-v3 /usr/sbin/cron /usr/sbin/cron COPY --from=pimcore/pimcore:php8.2-supervisord-v3 /etc/supervisor/supervisord.conf /etc/supervisor/supervisord.conf diff --git a/docker-compose.yaml b/docker-compose.yaml index 8fbb9abe8..96ecb420b 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -37,7 +37,7 @@ services: env_file: - .env volumes: - - .:/var/www/html + - .:/var/www/html:rw - ./.docker/init/init.local.sh:/init.local.sh command: [ "/init.local.sh" ] @@ -48,7 +48,6 @@ services: target: php environment: COMPOSER_HOME: /var/www/html - PHP_IDE_CONFIG: serverName=localhost # Feed installer configuration via ENV variables. # See: https://pimcore.com/docs/pimcore/current/Development_Documentation/Getting_Started/Advanced_Installation_Topics.html#page_Advanced-Installation-Topics PIMCORE_INSTALL_MYSQL_USERNAME: ${PIMCORE_INSTALL_MYSQL_USERNAME} @@ -64,7 +63,24 @@ services: ports: - "80:80" volumes: - - .:/var/www/html + - .:/var/www/html:rw + - ./.docker/php/nginx.conf:/etc/nginx/sites-available/default:ro + + php-debug: + container_name: ${APP_NAME}-php-debug + build: + dockerfile: ./.docker/Dockerfile + target: php-debug + environment: + - XDEBUG_CONFIG=remote_enable=1 + - PHP_IDE_CONFIG=serverName=duluth + env_file: + - .env + depends_on: + init: + condition: service_completed_successfully + volumes: + - .:/var/www/html:ro - ./.docker/php/nginx.conf:/etc/nginx/sites-available/default:ro supervisord: @@ -78,7 +94,7 @@ services: env_file: - .env volumes: - - .:/var/www/html + - .:/var/www/html:rw - ./.docker/supervisord/supervisord.conf:/etc/supervisor/conf.d/pimcore.conf:ro # The following two services are used for testing. From 25d0f4bc88e9a6205ce34214bcc68496a7a144a2 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Wed, 8 May 2024 17:07:19 -0400 Subject: [PATCH 011/131] Fixing debug container --- docker-compose.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 96ecb420b..a5273c3f9 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -73,14 +73,14 @@ services: target: php-debug environment: - XDEBUG_CONFIG=remote_enable=1 - - PHP_IDE_CONFIG=serverName=duluth + - PHP_IDE_CONFIG=serverName=localhost env_file: - .env depends_on: init: condition: service_completed_successfully volumes: - - .:/var/www/html:ro + - .:/var/www/html - ./.docker/php/nginx.conf:/etc/nginx/sites-available/default:ro supervisord: From ac4d0577d912c008d1b01ec8b3c31e90c550836a Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Wed, 8 May 2024 17:07:47 -0400 Subject: [PATCH 012/131] Adding SYMFONY_DOTENV_VARS env var to get rid of deprecation warnings --- .env | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.env b/.env index cd23dc702..fe99afef9 100644 --- a/.env +++ b/.env @@ -22,6 +22,9 @@ PIMCORE_DEV_MODE=false #TRUSTED_HOSTS='^(localhost|example\.com)$' ###< symfony/framework-bundle ### +# TODO added this to get rid of deprecation warnings when running bin/console commands, but is it correct? +SYMFONY_DOTENV_VARS=APP_ENV,APP_DEBUG + APP_NAME=torq-pimcore-skeleton DATABASE_HOST=db DATABASE_PORT=3306 From fc420856265eddeb5117a04e3e0414a7a32cefe3 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Wed, 8 May 2024 17:09:05 -0400 Subject: [PATCH 013/131] Ignoring .htaccess --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 9c8b0be59..b6800f351 100644 --- a/.gitignore +++ b/.gitignore @@ -49,4 +49,5 @@ nbproject # temp .temp -supervisord.pid \ No newline at end of file +supervisord.pid +.htaccess \ No newline at end of file From b6d86c64f5699a45984b009c594b713a8593f7af Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Wed, 8 May 2024 17:20:42 -0400 Subject: [PATCH 014/131] Getting rid of supervisord warnings --- .docker/Dockerfile | 4 ++-- .docker/php/supervisord.conf | 1 + .docker/supervisord/supervisord.conf | 9 +++++++-- .gitignore | 1 + 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.docker/Dockerfile b/.docker/Dockerfile index 265660d76..bf012cdb1 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -46,7 +46,7 @@ COPY --from=nginx-conf-src /etc/nginx/sites-available/default /etc/nginx/sites-a COPY /.docker/php/supervisord.conf /etc/supervisor/supervisord.conf RUN runuser -u www-data -- /var/www/html/bin/console pimcore:build:classes; \ runuser -u www-data -- /var/www/html/bin/console cache:warmup -CMD [ "/usr/bin/supervisord" ] +CMD [ "/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf" ] FROM base as supervisord-conf-src COPY /.docker/supervisord/supervisord.conf /etc/supervisor/conf.d/pimcore.conf @@ -58,7 +58,7 @@ COPY --from=pimcore/pimcore:php8.2-supervisord-v3 /etc/supervisor/supervisord.co COPY --from=supervisord-conf-src /etc/supervisor/conf.d/pimcore.conf /etc/supervisor/conf.d/pimcore.conf RUN runuser -u www-data -- /var/www/html/bin/console pimcore:build:classes; \ runuser -u www-data -- /var/www/html/bin/console cache:warmup -CMD [ "/usr/bin/supervisord" ] +CMD [ "/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/pimcore.conf" ] FROM base as php-debug COPY --from=pimcore/pimcore:php8.2-debug-v3 /usr/local/bin/entrypoint.sh /usr/local/bin/entrypoint.sh diff --git a/.docker/php/supervisord.conf b/.docker/php/supervisord.conf index 64cce0b30..a2de158c4 100644 --- a/.docker/php/supervisord.conf +++ b/.docker/php/supervisord.conf @@ -2,6 +2,7 @@ nodaemon=true logfile=/dev/null logfile_maxbytes=0 +user=root [program:nginx] command=/usr/sbin/nginx -g "daemon off;" diff --git a/.docker/supervisord/supervisord.conf b/.docker/supervisord/supervisord.conf index e0956b3de..98ec15cdc 100644 --- a/.docker/supervisord/supervisord.conf +++ b/.docker/supervisord/supervisord.conf @@ -1,7 +1,11 @@ - -# Important Notice: this configuration is not optimized for production use! +[supervisord] +nodaemon=true +logfile=/dev/null +logfile_maxbytes=0 +user=root [program:messenger-consume] +user=www-data command=php /var/www/html/bin/console messenger:consume pimcore_core pimcore_maintenance pimcore_scheduled_tasks pimcore_image_optimize pimcore_asset_update --memory-limit=250M --time-limit=3600 numprocs=1 startsecs=0 @@ -13,6 +17,7 @@ stdout_logfile_maxbytes=0 redirect_stderr=true [program:maintenance] +user=www-data command=bash -c 'sleep 3600 && exec php /var/www/html/bin/console pimcore:maintenance' autostart=true autorestart=true diff --git a/.gitignore b/.gitignore index b6800f351..607f2e97c 100644 --- a/.gitignore +++ b/.gitignore @@ -50,4 +50,5 @@ nbproject .temp supervisord.pid +supervisord.log .htaccess \ No newline at end of file From 0e463146b8b218e8b409f28c83286d894fc41eda Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Wed, 8 May 2024 17:30:05 -0400 Subject: [PATCH 015/131] Nginx config for debug container --- .docker/php-debug/nginx-debug.conf | 182 +++++++++++++++++++++++++++++ docker-compose.yaml | 2 +- 2 files changed, 183 insertions(+), 1 deletion(-) create mode 100644 .docker/php-debug/nginx-debug.conf diff --git a/.docker/php-debug/nginx-debug.conf b/.docker/php-debug/nginx-debug.conf new file mode 100644 index 000000000..98491d7dd --- /dev/null +++ b/.docker/php-debug/nginx-debug.conf @@ -0,0 +1,182 @@ + +# mime types are already covered in nginx.conf +#include mime.types; + +upstream php-pimcore10 { + server php:9000; +} + +upstream php-pimcore10-debug { + server php-debug:9000; +} + +map $args $static_page_root { + default /var/tmp/pages; + "~*(^|&)pimcore_editmode=true(&|$)" /var/nonexistent; + "~*(^|&)pimcore_preview=true(&|$)" /var/nonexistent; + "~*(^|&)pimcore_version=[^&]+(&|$)" /var/nonexistent; +} + +map $uri $static_page_uri { + default $uri; + "/" /%home; +} + +server { + listen [::]:80 default_server; + listen 80 default_server; + + #server_name pimcore.localhost; + + root /var/www/html/public; + index index.php; + + # Filesize depending on your data + client_max_body_size 100m; + + # It is recommended to seclude logs per virtual host + #access_log /var/log/access.log; + #error_log /var/log/error.log error; + + # Protected Assets + # + ### 1. Option - Restricting access to certain assets completely + # + # location ~ ^/protected/.* { + # return 403; + # } + # location ~ ^/var/.*/protected(.*) { + # return 403; + # } + # + # location ~ ^/cache-buster\-[\d]+/protected(.*) { + # return 403; + # } + # + ### 2. Option - Checking permissions before delivery + # + # rewrite ^(/protected/.*) /index.php$is_args$args last; + # + # location ~ ^/var/.*/protected(.*) { + # return 403; + # } + # + # location ~ ^/cache-buster\-[\d]+/protected(.*) { + # return 403; + # } + + # Pimcore Head-Link Cache-Busting + rewrite ^/cache-buster-(?:\d+)/(.*) /$1 last; + + # Stay secure + # + # a) don't allow PHP in folders allowing file uploads + location ~* /var/assets/.*\.php(/|$) { + return 404; + } + + # b) Prevent clients from accessing hidden files (starting with a dot) + # Access to `/.well-known/` is allowed. + # https://www.mnot.net/blog/2010/04/07/well-known + # https://tools.ietf.org/html/rfc5785 + location ~* /\.(?!well-known/) { + deny all; + log_not_found off; + access_log off; + } + + # c) Prevent clients from accessing to backup/config/source files + location ~* (?:\.(?:bak|conf(ig)?|dist|fla|in[ci]|log|psd|sh|sql|sw[op])|~)$ { + deny all; + } + + # Some Admin Modules need this: + # Server Info, Opcache + location ~* ^/admin/external { + rewrite .* /index.php$is_args$args last; + } + + # Thumbnails + location ~* .*/(image|video)-thumb__\d+__.* { + try_files /var/tmp/thumbnails$uri /index.php; + expires 2w; + access_log off; + add_header Cache-Control "public"; + } + + # Assets + # Still use a whitelist approach to prevent each and every missing asset to go through the PHP Engine. + 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; + log_not_found off; + add_header Cache-Control "public"; + } + + location / { + error_page 404 /meta/404; + try_files $static_page_root$static_page_uri.html $uri /index.php$is_args$args; + } + + # Use this location when the installer has to be run + # location ~ /(index|install)\.php(/|$) { + # + # Use this after initial install is done: + location ~ ^/index\.php(/|$) { + send_timeout 1800; + fastcgi_read_timeout 1800; + # regex to split $uri to $fastcgi_script_name and $fastcgi_path_info + fastcgi_split_path_info ^(.+\.php)(/.+)$; + # Check that the PHP script exists before passing it + #try_files $fastcgi_script_name =404; + # include fastcgi.conf if needed + include fastcgi_params; + # Bypass the fact that try_files resets $fastcgi_path_info + # see: http://trac.nginx.org/nginx/ticket/321 + set $path_info $fastcgi_path_info; + fastcgi_param PATH_INFO $path_info; + + # Activate these, if using Symlinks and opcache + fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; + fastcgi_param DOCUMENT_ROOT $realpath_root; + + # Mitigate https://httpoxy.org/ vulnerabilities + fastcgi_param HTTP_PROXY ""; + + # If Xdebug session is requested, pass it to the Xdebug enabled container + if ($http_cookie ~* "XDEBUG_SESSION") { + fastcgi_pass php-pimcore10-debug; + } + + fastcgi_pass php-pimcore10; + # Prevents URIs that include the front controller. This will 404: + # http://domain.tld/index.php/some-path + # Remove the internal directive to allow URIs like this + internal; + } + + # PHP-FPM Status and Ping + location /fpm- { + access_log off; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + location /fpm-status { + allow 127.0.0.1; + # add additional IP's or Ranges + deny all; + fastcgi_pass php-pimcore10; + } + location /fpm-ping { + fastcgi_pass php-pimcore10; + } + } + # nginx Status + # see: https://nginx.org/en/docs/http/ngx_http_stub_status_module.html + location /nginx-status { + allow 127.0.0.1; + deny all; + access_log off; + stub_status; + } +} diff --git a/docker-compose.yaml b/docker-compose.yaml index a5273c3f9..e3773f8b5 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -64,7 +64,7 @@ services: - "80:80" volumes: - .:/var/www/html:rw - - ./.docker/php/nginx.conf:/etc/nginx/sites-available/default:ro + - ./.docker/php-debug/nginx-debug.conf:/etc/nginx/sites-available/default:ro php-debug: container_name: ${APP_NAME}-php-debug From 44b44cc79a9745fed9efd6772be273a9f51b8736 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Wed, 8 May 2024 17:36:37 -0400 Subject: [PATCH 016/131] Custom port for webapp --- .env | 1 + docker-compose.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.env b/.env index fe99afef9..8a490764e 100644 --- a/.env +++ b/.env @@ -26,6 +26,7 @@ PIMCORE_DEV_MODE=false SYMFONY_DOTENV_VARS=APP_ENV,APP_DEBUG APP_NAME=torq-pimcore-skeleton +WEB_PORT=8400 DATABASE_HOST=db DATABASE_PORT=3306 DATABASE_NAME=pimcore diff --git a/docker-compose.yaml b/docker-compose.yaml index e3773f8b5..df7f1d649 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -61,7 +61,7 @@ services: init: condition: service_completed_successfully ports: - - "80:80" + - "${WEB_PORT}:80" volumes: - .:/var/www/html:rw - ./.docker/php-debug/nginx-debug.conf:/etc/nginx/sites-available/default:ro From 58feca7457e066ffd2ad04fe068798645aaf2071 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Wed, 8 May 2024 17:45:58 -0400 Subject: [PATCH 017/131] Port for accessing local DB --- .env | 4 +++- docker-compose.yaml | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.env b/.env index 8a490764e..4001159c0 100644 --- a/.env +++ b/.env @@ -26,9 +26,10 @@ PIMCORE_DEV_MODE=false SYMFONY_DOTENV_VARS=APP_ENV,APP_DEBUG APP_NAME=torq-pimcore-skeleton -WEB_PORT=8400 +WEB_PORT_EXTERNAL=8400 DATABASE_HOST=db DATABASE_PORT=3306 +DATABASE_PORT_EXTERNAL=3400 DATABASE_NAME=pimcore DATABASE_USER=pimcore DATABASE_PASSWORD=pimcore @@ -43,6 +44,7 @@ MYSQL_ROOT_PASSWORD=ROOT MYSQL_DATABASE=${DATABASE_NAME} MYSQL_USER=${DATABASE_USER} MYSQL_PASSWORD=${DATABASE_PASSWORD} +MYSQL_PORT=${DATABASE_PORT} diff --git a/docker-compose.yaml b/docker-compose.yaml index df7f1d649..494d5c046 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -16,6 +16,7 @@ services: - MYSQL_DATABASE=${MYSQL_DATABASE} - MYSQL_USER=${MYSQL_USER} - MYSQL_PASSWORD=${MYSQL_PASSWORD} + - MYSQL_PORT=${MYSQL_PORT} healthcheck: # The service is considered healthy when: # - connection to pimcore db can be established, and @@ -25,6 +26,8 @@ services: retries: 6 start_period: 1m timeout: 3s + ports: + - "${DATABASE_PORT_EXTERNAL}:${MYSQL_PORT}" init: container_name: ${APP_NAME}-init @@ -61,7 +64,7 @@ services: init: condition: service_completed_successfully ports: - - "${WEB_PORT}:80" + - "${WEB_PORT_EXTERNAL}:80" volumes: - .:/var/www/html:rw - ./.docker/php-debug/nginx-debug.conf:/etc/nginx/sites-available/default:ro From 62002cd30a50eea4d8ccb4961ec6fc5a78aebaac Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Thu, 9 May 2024 15:16:08 -0400 Subject: [PATCH 018/131] More selective about what goes in image --- .docker/Dockerfile | 21 +++++---------------- .dockerignore | 22 ++++++++++++++++------ 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/.docker/Dockerfile b/.docker/Dockerfile index bf012cdb1..80a02481f 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -1,5 +1,4 @@ FROM pimcore/pimcore:php8.2-v3 as base -# TODO arg for passing in custom Linux packages RUN set -eux; \ apt-get update -y; \ apt-get install -y --no-install-recommends autoconf make g++ unixodbc-dev cron vim supervisor netcat-traditional default-mysql-client; \ @@ -16,46 +15,36 @@ RUN set -eux; \ # We copy in the composer files and download dependencies, then in a separate set of statements below copy in the full # source directory and run a full composer install. This will take advantage of Docker-build caching when the composer # dependencies do not change. -# TODO stage/context option for custom composer files +# TODO php.ini and php-fpm.ini COPY --chown=www-data:www-data /composer.* /var/www/html COPY /.docker/composer-install-dependencies.sh /composer-install-dependencies.sh RUN /composer-install-dependencies.sh -# TODO be more selective about what to copy into image -COPY --chown=www-data:www-data / /var/www/html +COPY --chown=www-data:www-data / /var/www/html/bin RUN cd /var/www/html; \ runuser -u www-data -- php /usr/local/bin/composer install FROM base as init -# TODO allow for custom bundles to be passed via args +# TODO allow for custom bundles to be passed via args? COPY /.docker/init/init.sh /init.sh CMD [ "/init.sh" ] -# Default sources for config files -# TODO php.ini - should probably go at base level? -FROM base as nginx-conf-src -COPY /.docker/php/nginx.conf /etc/nginx/sites-available/default -# TODO php fpm ini - FROM base as php RUN set -eux; \ apt-get update -y; \ apt-get install -y --no-install-recommends nginx; \ rm -rf /var/lib/apt/lists/*; # TODO what to specify as "source path" when copying from outside context? -COPY --from=nginx-conf-src /etc/nginx/sites-available/default /etc/nginx/sites-available/default +COPY /.docker/php/nginx.conf /etc/nginx/sites-available/default COPY /.docker/php/supervisord.conf /etc/supervisor/supervisord.conf RUN runuser -u www-data -- /var/www/html/bin/console pimcore:build:classes; \ runuser -u www-data -- /var/www/html/bin/console cache:warmup CMD [ "/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf" ] -FROM base as supervisord-conf-src -COPY /.docker/supervisord/supervisord.conf /etc/supervisor/conf.d/pimcore.conf - FROM base as supervisord COPY --from=pimcore/pimcore:php8.2-supervisord-v3 /var/run /var/run COPY --from=pimcore/pimcore:php8.2-supervisord-v3 /usr/sbin/cron /usr/sbin/cron COPY --from=pimcore/pimcore:php8.2-supervisord-v3 /etc/supervisor/supervisord.conf /etc/supervisor/supervisord.conf -COPY --from=supervisord-conf-src /etc/supervisor/conf.d/pimcore.conf /etc/supervisor/conf.d/pimcore.conf +COPY /.docker/supervisord/supervisord.conf /etc/supervisor/conf.d/pimcore.conf RUN runuser -u www-data -- /var/www/html/bin/console pimcore:build:classes; \ runuser -u www-data -- /var/www/html/bin/console cache:warmup CMD [ "/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/pimcore.conf" ] diff --git a/.dockerignore b/.dockerignore index 4239e301b..b29a8b80a 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,11 +1,21 @@ -vendor +.github cache -var/cache -var/application-logger -var/email public/var public/bundles +var/application-logger var/assets -var/versions +var/cache +var/email +var/installer var/log -var/installer \ No newline at end of file +var/versions +vendor +.editorconfig +.gitattributes +.git +docker-compose.yaml +gpl-3.0.txt +README.md +SECURITY.md +supervisord.log +supervisord.pid From ccf5acfce5b497055edc582f22f553e58310a426 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Thu, 9 May 2024 15:17:01 -0400 Subject: [PATCH 019/131] Fixing last commit --- .docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.docker/Dockerfile b/.docker/Dockerfile index 80a02481f..064536679 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -19,7 +19,7 @@ RUN set -eux; \ COPY --chown=www-data:www-data /composer.* /var/www/html COPY /.docker/composer-install-dependencies.sh /composer-install-dependencies.sh RUN /composer-install-dependencies.sh -COPY --chown=www-data:www-data / /var/www/html/bin +COPY --chown=www-data:www-data / /var/www/html RUN cd /var/www/html; \ runuser -u www-data -- php /usr/local/bin/composer install From a1ea70d7f481e6e38eb28df2acf634deb24f0982 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Thu, 9 May 2024 15:17:11 -0400 Subject: [PATCH 020/131] Removing unnecessary comment --- .docker/composer-install-dependencies.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/.docker/composer-install-dependencies.sh b/.docker/composer-install-dependencies.sh index 5e7365496..592d862d3 100755 --- a/.docker/composer-install-dependencies.sh +++ b/.docker/composer-install-dependencies.sh @@ -1,4 +1,3 @@ #!/usr/bin/env bash echo Installing Composer packages... -# Use --no-scripts so that we simply download and install packages, then at a later point we will run the scripts to fully install Pimcore cd /var/www/html && runuser -u www-data -- php -d memory_limit=-1 -d xdebug.remote_enable=0 /usr/local/bin/composer install --prefer-dist --no-scripts \ No newline at end of file From 6d625eb2f698308cd33f680b73b4053d6bb653a8 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Thu, 9 May 2024 15:19:09 -0400 Subject: [PATCH 021/131] Removing aqmp messenger requirement completely as we don't use it --- .docker/Dockerfile | 7 ------- composer.json | 1 - 2 files changed, 8 deletions(-) diff --git a/.docker/Dockerfile b/.docker/Dockerfile index 064536679..d34bd1a09 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -5,13 +5,6 @@ RUN set -eux; \ rm -rf /var/lib/apt/lists/*; \ usermod -u 1000 www-data; \ groupmod -g 1000 www-data; -# TODO required until Pimcore adds this to their image... -RUN set -eux; \ - apt-get update -y; \ - apt-get install -y librabbitmq-dev; \ - rm -rf /var/lib/apt/lists/*; \ - pecl install amqp; \ - docker-php-ext-enable amqp; # We copy in the composer files and download dependencies, then in a separate set of statements below copy in the full # source directory and run a full composer install. This will take advantage of Docker-build caching when the composer # dependencies do not change. diff --git a/composer.json b/composer.json index 4172b6f8c..ce6055c76 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,6 @@ "pimcore/pimcore": "*", "pimcore/admin-ui-classic-bundle": "^1.4", "pimcore/platform-version": "2024.1", - "symfony/amqp-messenger": "^6.2", "symfony/dotenv": "^6.2", "symfony/runtime": "^6.2" }, From ead2cb2f6eaadbd1b8e22013ecd5f91b5f82c8c5 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Thu, 9 May 2024 15:32:07 -0400 Subject: [PATCH 022/131] Configuration to commit but Docker-ignore local config files --- .dockerignore | 2 ++ .gitignore | 7 ++++--- config/local/database.yaml | 2 ++ 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 config/local/database.yaml diff --git a/.dockerignore b/.dockerignore index b29a8b80a..3229a0f72 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,6 @@ .github cache +config/**/local/*.yaml public/var public/bundles var/application-logger @@ -11,6 +12,7 @@ var/log var/versions vendor .editorconfig +.env .gitattributes .git docker-compose.yaml diff --git a/.gitignore b/.gitignore index 607f2e97c..d8191848f 100644 --- a/.gitignore +++ b/.gitignore @@ -12,9 +12,10 @@ /.env.local /.env.local.php /.env.*.local -!/config/local -/config/local/* -!config/local/.gitkeep + +# Difference from pimcore/skeleton - we commit local config files so that they are available for developer's to use on +# their machines, but use .dockerignore to prevent them from being built into the images. Using docker-compose locally, +# developers can then mount them into the running container. /var/* !/var/.gitkeep diff --git a/config/local/database.yaml b/config/local/database.yaml new file mode 100644 index 000000000..7ce5069bb --- /dev/null +++ b/config/local/database.yaml @@ -0,0 +1,2 @@ +doctrine: + dbal: { connections: { default: { host: db, port: '3306', user: pimcore, password: pimcore, dbname: pimcore, mapping_types: { enum: string, bit: boolean }, server_version: '10.11.7-MariaDB-1:10.11.7+maria~ubu2204' } } } From e458dcbc7ccb70f40b3fb3a90e42e8c81318b839 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Thu, 9 May 2024 15:35:23 -0400 Subject: [PATCH 023/131] Obviously can't ignore the Symfony .env file... --- .dockerignore | 1 - config/local/database.yaml | 13 ++++++++++++- config/services.yaml | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.dockerignore b/.dockerignore index 3229a0f72..8f47f70ac 100644 --- a/.dockerignore +++ b/.dockerignore @@ -12,7 +12,6 @@ var/log var/versions vendor .editorconfig -.env .gitattributes .git docker-compose.yaml diff --git a/config/local/database.yaml b/config/local/database.yaml index 7ce5069bb..0256454ff 100644 --- a/config/local/database.yaml +++ b/config/local/database.yaml @@ -1,2 +1,13 @@ doctrine: - dbal: { connections: { default: { host: db, port: '3306', user: pimcore, password: pimcore, dbname: pimcore, mapping_types: { enum: string, bit: boolean }, server_version: '10.11.7-MariaDB-1:10.11.7+maria~ubu2204' } } } + dbal: + connections: + default: + host: db + port: '3306' + user: pimcore + password: pimcore + dbname: pimcore + mapping_types: + enum: string + bit: boolean + server_version: '10.11.7-MariaDB-1:10.11.7+maria~ubu2204' diff --git a/config/services.yaml b/config/services.yaml index 4427875bc..4812f29e3 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -1,5 +1,5 @@ parameters: - secret: ThisTokenIsNotSoSecretChangeItImmediately + secret: DETzaWisgJOBN+SK87M1o8laf6d+8ZT3sA+Asjm+TNE= # customize the full path to external executables # normally they are auto-detected by `which program` or auto-discovered in the configured path in From c7f7055ff7d185fc5500c6dc133cfd3823c1c552 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Thu, 9 May 2024 15:36:49 -0400 Subject: [PATCH 024/131] Undoing local config contigency as it's a half-baked idea at this point --- .dockerignore | 1 - .gitignore | 7 +++---- config/local/database.yaml | 13 ------------- 3 files changed, 3 insertions(+), 18 deletions(-) delete mode 100644 config/local/database.yaml diff --git a/.dockerignore b/.dockerignore index 8f47f70ac..b29a8b80a 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,6 +1,5 @@ .github cache -config/**/local/*.yaml public/var public/bundles var/application-logger diff --git a/.gitignore b/.gitignore index d8191848f..607f2e97c 100644 --- a/.gitignore +++ b/.gitignore @@ -12,10 +12,9 @@ /.env.local /.env.local.php /.env.*.local - -# Difference from pimcore/skeleton - we commit local config files so that they are available for developer's to use on -# their machines, but use .dockerignore to prevent them from being built into the images. Using docker-compose locally, -# developers can then mount them into the running container. +!/config/local +/config/local/* +!config/local/.gitkeep /var/* !/var/.gitkeep diff --git a/config/local/database.yaml b/config/local/database.yaml deleted file mode 100644 index 0256454ff..000000000 --- a/config/local/database.yaml +++ /dev/null @@ -1,13 +0,0 @@ -doctrine: - dbal: - connections: - default: - host: db - port: '3306' - user: pimcore - password: pimcore - dbname: pimcore - mapping_types: - enum: string - bit: boolean - server_version: '10.11.7-MariaDB-1:10.11.7+maria~ubu2204' From ee76d7a27fdcaf88f1bfc44195f3a45079bf2b64 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Thu, 9 May 2024 16:08:02 -0400 Subject: [PATCH 025/131] Configuration for local files. And committing database.yaml --- .dockerignore | 1 + .env | 1 + .gitignore | 7 ++++--- config/config.yaml | 1 + config/database.yaml | 13 +++++++++++++ 5 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 config/database.yaml diff --git a/.dockerignore b/.dockerignore index b29a8b80a..d2f838ed0 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,6 @@ .github cache +config/local/*.yaml public/var public/bundles var/application-logger diff --git a/.env b/.env index 4001159c0..646143dbb 100644 --- a/.env +++ b/.env @@ -33,6 +33,7 @@ DATABASE_PORT_EXTERNAL=3400 DATABASE_NAME=pimcore DATABASE_USER=pimcore DATABASE_PASSWORD=pimcore +DATABASE_SERVER_VERSION=10.11.7-MariaDB-1:10.11.7+maria~ubu2204 PIMCORE_INSTALL_MYSQL_HOST_SOCKET=${DATABASE_HOST} PIMCORE_INSTALL_MYSQL_PORT=${DATABASE_PORT} PIMCORE_INSTALL_MYSQL_USERNAME=${DATABASE_USER} diff --git a/.gitignore b/.gitignore index 607f2e97c..b846d03b9 100644 --- a/.gitignore +++ b/.gitignore @@ -12,9 +12,10 @@ /.env.local /.env.local.php /.env.*.local -!/config/local -/config/local/* -!config/local/.gitkeep + +# Difference from pimcore/skeleton - we allow committing of files in the config/local directory so that developer's +# can share them, but use .dockerignore to ensure they are not built into the Docker images. When developers run +# the Docker Compose locally, they can then simply mount the directory into the running containers. /var/* !/var/.gitkeep diff --git a/config/config.yaml b/config/config.yaml index b71a407ee..c8725acb6 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -1,5 +1,6 @@ imports: - { resource: 'local/' } + - { resource: 'database.yaml' } pimcore: diff --git a/config/database.yaml b/config/database.yaml new file mode 100644 index 000000000..d9b47292f --- /dev/null +++ b/config/database.yaml @@ -0,0 +1,13 @@ +doctrine: + dbal: + connections: + default: + host: "%env(DATABASE_HOST)%" + port: "%env(DATABASE_PORT)%" + user: "%env(DATABASE_USER)%" + password: "%env(DATABASE_PASSWORD)%" + dbname: "%env(DATABASE_NAME)%" + mapping_types: + enum: string + bit: boolean + server_version: "%env(DATABASE_SERVER_VERSION)%" \ No newline at end of file From 38c1b341926db0e740d0d3809f17e2cb2625c1a7 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Thu, 9 May 2024 17:14:27 -0400 Subject: [PATCH 026/131] PHP ini and PHP-FPM conf changes --- .docker/Dockerfile | 17 +++++++++++++++-- .docker/php/php-fpm.conf | 9 +++++++++ .docker/php/php.ini | 7 +++++++ 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 .docker/php/php-fpm.conf create mode 100644 .docker/php/php.ini diff --git a/.docker/Dockerfile b/.docker/Dockerfile index d34bd1a09..42c8c04ff 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -8,7 +8,6 @@ RUN set -eux; \ # We copy in the composer files and download dependencies, then in a separate set of statements below copy in the full # source directory and run a full composer install. This will take advantage of Docker-build caching when the composer # dependencies do not change. -# TODO php.ini and php-fpm.ini COPY --chown=www-data:www-data /composer.* /var/www/html COPY /.docker/composer-install-dependencies.sh /composer-install-dependencies.sh RUN /composer-install-dependencies.sh @@ -26,9 +25,23 @@ RUN set -eux; \ apt-get update -y; \ apt-get install -y --no-install-recommends nginx; \ rm -rf /var/lib/apt/lists/*; -# TODO what to specify as "source path" when copying from outside context? +# php.ini configuration +ENV PHP_MEMORY_LIMIT=4G +ENV PHP_UPLOAD_MAX_FILESIZE=20G +ENV PHP_POST_MAX_SIZE=20G +ENV PHP_MAX_EXECUTION_TIME=0 +ENV PHP_MAX_INPUT_TIME=-1 +COPY /.docker/php/php.ini /usr/local/etc/php/conf.d/docker-pimcore-php.ini +# php-fpm.conf configuration +ENV PHP_FPM_MAX_CHILDREN=275 +ENV PHP_FPM_START_SERVERS=75 +ENV PHP_FPM_MIN_SPARE_SERVERS=75 +ENV PHP_FPM_MAX_SPARE_SERVERS=200 +COPY /.docker/php/php-fpm.conf /usr/local/etc/php-fpm.d/www.conf +# nginx configuration COPY /.docker/php/nginx.conf /etc/nginx/sites-available/default COPY /.docker/php/supervisord.conf /etc/supervisor/supervisord.conf +# Build Pimcore classes and warm up the cache to improve container start-up RUN runuser -u www-data -- /var/www/html/bin/console pimcore:build:classes; \ runuser -u www-data -- /var/www/html/bin/console cache:warmup CMD [ "/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf" ] diff --git a/.docker/php/php-fpm.conf b/.docker/php/php-fpm.conf new file mode 100644 index 000000000..685668cca --- /dev/null +++ b/.docker/php/php-fpm.conf @@ -0,0 +1,9 @@ +[www] +user = www-data +group = www-data +listen = 127.0.0.1:9000 +pm = dynamic +pm.max_children = ${PHP_FPM_MAX_CHILDREN} +pm.start_servers = ${PHP_FPM_START_SERVERS} +pm.min_spare_servers = ${PHP_FPM_MIN_SPARE_SERVERS} +pm.max_spare_servers = ${PHP_FPM_MAX_SPARE_SERVERS} \ No newline at end of file diff --git a/.docker/php/php.ini b/.docker/php/php.ini new file mode 100644 index 000000000..32d794bbb --- /dev/null +++ b/.docker/php/php.ini @@ -0,0 +1,7 @@ +memory_limit=${PHP_MEMORY_LIMIT} +upload_max_filesize=${PHP_UPLOAD_MAX_FILESIZE} +post_max_size=${PHP_POST_MAX_SIZE} +max_execution_time=${PHP_MAX_EXECUTION_TIME} +max_input_time=${PHP_MAX_INPUT_TIME} +session.save_handler=redis +session.save_path="tcp://${REDIS_HOST}:6379?database=${REDIS_SESSION_DB}" \ No newline at end of file From f5be506e5fd9b66b69f70aeaf050067b93049fc9 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Thu, 9 May 2024 17:14:57 -0400 Subject: [PATCH 027/131] Adding Role Creator and Folder Creator bundles --- .docker/init/init.sh | 11 +++-------- composer.json | 6 ++++-- config/folders.yaml | 1 + config/roles.yaml | 1 + src/Kernel.php | 6 ++++++ 5 files changed, 15 insertions(+), 10 deletions(-) create mode 100644 config/folders.yaml create mode 100644 config/roles.yaml diff --git a/.docker/init/init.sh b/.docker/init/init.sh index d6443e787..900d00ed7 100755 --- a/.docker/init/init.sh +++ b/.docker/init/init.sh @@ -23,11 +23,6 @@ runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreT runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreUuidBundle --fail-without-error runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreXliffBundle --fail-without-error runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreWordExportBundle --fail-without-error -#runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreDataHubBundle -#runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreDataImporterBundle -#runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreWebToPrintBundle -#runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install ElementsProcessManagerBundle -# TODO use env var as list of extra bundles to install echo Running migration... runuser -u www-data -- /var/www/html/bin/console doctrine:migrations:migrate -n @@ -36,7 +31,7 @@ echo Rebuilding classes... runuser -u www-data -- /var/www/html/bin/console pimcore:deployment:classes-rebuild -c -d -n echo Generating roles... -# TODO role creator +runuser -u www-data -- /var/www/html/bin/console torq:generate-roles -echo Generating folders... -# TODO folder creator \ No newline at end of file +echo Creating folders... +runuser -u www-data -- /var/www/html/bin/console torq:folder-creator diff --git a/composer.json b/composer.json index ce6055c76..b12b9a2b3 100644 --- a/composer.json +++ b/composer.json @@ -12,11 +12,13 @@ }, "prefer-stable": true, "require": { - "pimcore/pimcore": "*", "pimcore/admin-ui-classic-bundle": "^1.4", + "pimcore/pimcore": "*", "pimcore/platform-version": "2024.1", "symfony/dotenv": "^6.2", - "symfony/runtime": "^6.2" + "symfony/runtime": "^6.2", + "torqit/pimcore-folder-creator-bundle": "^3.0", + "torqit/pimcore-role-creator-bundle": "^3.1" }, "require-dev": { "codeception/codeception": "^5.0.3", diff --git a/config/folders.yaml b/config/folders.yaml new file mode 100644 index 000000000..c63779bed --- /dev/null +++ b/config/folders.yaml @@ -0,0 +1 @@ +system_folders: diff --git a/config/roles.yaml b/config/roles.yaml new file mode 100644 index 000000000..7a7e2c87d --- /dev/null +++ b/config/roles.yaml @@ -0,0 +1 @@ +system_roles: diff --git a/src/Kernel.php b/src/Kernel.php index 093be3bb1..577993a3f 100644 --- a/src/Kernel.php +++ b/src/Kernel.php @@ -28,6 +28,8 @@ use Pimcore\Bundle\XliffBundle\PimcoreXliffBundle; use Pimcore\HttpKernel\BundleCollection\BundleCollection; use Pimcore\Kernel as PimcoreKernel; +use TorqIT\FolderCreatorBundle\FolderCreatorBundle; +use TorqIT\RoleCreatorBundle\RoleCreatorBundle; class Kernel extends PimcoreKernel { @@ -40,6 +42,7 @@ class Kernel extends PimcoreKernel public function registerBundlesToCollection(BundleCollection $collection): void { $collection->addBundle(new PimcoreAdminBundle(), 60); + // Official Pimcore bundles $collection->addBundle(new PimcoreApplicationLoggerBundle()); $collection->addBundle(new PimcoreCustomReportsBundle()); $collection->addBundle(new PimcoreGlossaryBundle()); @@ -50,5 +53,8 @@ public function registerBundlesToCollection(BundleCollection $collection): void $collection->addBundle(new PimcoreUuidBundle()); $collection->addBundle(new PimcoreXliffBundle()); $collection->addBundle(new PimcoreWordExportBundle()); + // Custom bundles + $collection->addBundle(new FolderCreatorBundle()); + $collection->addBundle(new RoleCreatorBundle()); } } From 49bf49a04ab63746919cd88a61b2bef12d9ad6c7 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Thu, 9 May 2024 17:27:31 -0400 Subject: [PATCH 028/131] Removing php.ini and php-fpm.conf as it they are in base image already! --- .docker/Dockerfile | 14 -------------- .docker/php/php-fpm.conf | 9 --------- .docker/php/php.ini | 5 ----- 3 files changed, 28 deletions(-) delete mode 100644 .docker/php/php-fpm.conf diff --git a/.docker/Dockerfile b/.docker/Dockerfile index 42c8c04ff..540062a05 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -25,23 +25,9 @@ RUN set -eux; \ apt-get update -y; \ apt-get install -y --no-install-recommends nginx; \ rm -rf /var/lib/apt/lists/*; -# php.ini configuration -ENV PHP_MEMORY_LIMIT=4G -ENV PHP_UPLOAD_MAX_FILESIZE=20G -ENV PHP_POST_MAX_SIZE=20G -ENV PHP_MAX_EXECUTION_TIME=0 -ENV PHP_MAX_INPUT_TIME=-1 COPY /.docker/php/php.ini /usr/local/etc/php/conf.d/docker-pimcore-php.ini -# php-fpm.conf configuration -ENV PHP_FPM_MAX_CHILDREN=275 -ENV PHP_FPM_START_SERVERS=75 -ENV PHP_FPM_MIN_SPARE_SERVERS=75 -ENV PHP_FPM_MAX_SPARE_SERVERS=200 -COPY /.docker/php/php-fpm.conf /usr/local/etc/php-fpm.d/www.conf -# nginx configuration COPY /.docker/php/nginx.conf /etc/nginx/sites-available/default COPY /.docker/php/supervisord.conf /etc/supervisor/supervisord.conf -# Build Pimcore classes and warm up the cache to improve container start-up RUN runuser -u www-data -- /var/www/html/bin/console pimcore:build:classes; \ runuser -u www-data -- /var/www/html/bin/console cache:warmup CMD [ "/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf" ] diff --git a/.docker/php/php-fpm.conf b/.docker/php/php-fpm.conf deleted file mode 100644 index 685668cca..000000000 --- a/.docker/php/php-fpm.conf +++ /dev/null @@ -1,9 +0,0 @@ -[www] -user = www-data -group = www-data -listen = 127.0.0.1:9000 -pm = dynamic -pm.max_children = ${PHP_FPM_MAX_CHILDREN} -pm.start_servers = ${PHP_FPM_START_SERVERS} -pm.min_spare_servers = ${PHP_FPM_MIN_SPARE_SERVERS} -pm.max_spare_servers = ${PHP_FPM_MAX_SPARE_SERVERS} \ No newline at end of file diff --git a/.docker/php/php.ini b/.docker/php/php.ini index 32d794bbb..5bc3e1e97 100644 --- a/.docker/php/php.ini +++ b/.docker/php/php.ini @@ -1,7 +1,2 @@ -memory_limit=${PHP_MEMORY_LIMIT} -upload_max_filesize=${PHP_UPLOAD_MAX_FILESIZE} -post_max_size=${PHP_POST_MAX_SIZE} -max_execution_time=${PHP_MAX_EXECUTION_TIME} -max_input_time=${PHP_MAX_INPUT_TIME} session.save_handler=redis session.save_path="tcp://${REDIS_HOST}:6379?database=${REDIS_SESSION_DB}" \ No newline at end of file From 27a95bb8dfae81e68077a1fb725a91f1f12b0400 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Thu, 9 May 2024 17:41:37 -0400 Subject: [PATCH 029/131] Proper config for Redis for Pimcore cache and session storage --- .env | 3 +++ config/config.yaml | 14 +++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.env b/.env index 646143dbb..5d5cd1676 100644 --- a/.env +++ b/.env @@ -46,6 +46,9 @@ MYSQL_DATABASE=${DATABASE_NAME} MYSQL_USER=${DATABASE_USER} MYSQL_PASSWORD=${DATABASE_PASSWORD} MYSQL_PORT=${DATABASE_PORT} +REDIS_HOST=redis +REDIS_DB=12 +REDIS_SESSION_DB=14 diff --git a/config/config.yaml b/config/config.yaml index c8725acb6..5c894c679 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -107,13 +107,13 @@ framework: # json_manifest_path: '%kernel.project_dir%/public/build/manifest.json' #### USE CUSTOM CACHE POOL -# cache: -# pools: -# pimcore.cache.pool: -# public: true -# default_lifetime: 31536000 # 1 year -# 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 + cache: + pools: + pimcore.cache.pool: + public: true + default_lifetime: 31536000 # 1 year + adapter: cache.adapter.redis_tag_aware + provider: "redis://%env(REDIS_HOST)%:6379/%env(REDIS_DB)%" # Redis DNS, see: https://symfony.com/doc/current/components/cache/adapters/redis_adapter.html#configure-the-connection #### USE SESSION HANDLER CONFIGURED IN php.ini # session: From 048f2c73da416b012f1b7526e6274f2c99217da5 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Wed, 22 May 2024 12:49:42 -0400 Subject: [PATCH 030/131] Adding procps --- .docker/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.docker/Dockerfile b/.docker/Dockerfile index 540062a05..cc530608c 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -1,7 +1,7 @@ FROM pimcore/pimcore:php8.2-v3 as base RUN set -eux; \ apt-get update -y; \ - apt-get install -y --no-install-recommends autoconf make g++ unixodbc-dev cron vim supervisor netcat-traditional default-mysql-client; \ + apt-get install -y --no-install-recommends autoconf make g++ unixodbc-dev cron procps vim supervisor netcat-traditional default-mysql-client; \ rm -rf /var/lib/apt/lists/*; \ usermod -u 1000 www-data; \ groupmod -g 1000 www-data; @@ -47,4 +47,4 @@ RUN pecl install xdebug; \ docker-php-ext-enable xdebug; ENV PHP_IDE_CONFIG serverName=localhost ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] -CMD ["php-fpm"] \ No newline at end of file +CMD ["php-fpm"] From b02d978e8106072f21f37de564fe3658496e2f6c Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Thu, 23 May 2024 14:12:26 -0400 Subject: [PATCH 031/131] Now only running cache:clear locally if a DB has been seeded --- .docker/init/init.local.sh | 8 +++++++- .docker/init/init.sh | 2 -- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.docker/init/init.local.sh b/.docker/init/init.local.sh index 0ec142817..348ddba9c 100755 --- a/.docker/init/init.local.sh +++ b/.docker/init/init.local.sh @@ -7,6 +7,12 @@ then . /composer-install-dependencies.sh fi -runuser -u www-data -- bin/console cache:clear +if [ "$(mysql -h "$DATABASE_HOST" -u "$DATABASE_USER" -p"$DATABASE_PASSWORD" \ + -sse "select count(*) from information_schema.tables where table_schema='pimcore' and table_name='assets';")" -ne 0 ] +then + # Only run cache clear if the database is seeded. If it is not, trying to clear the cache will cause errors. + # init.sh will handle seeding it + runuser -u www-data -- bin/console cache:clear +fi . /init.sh \ No newline at end of file diff --git a/.docker/init/init.sh b/.docker/init/init.sh index 900d00ed7..3e6c42ee2 100755 --- a/.docker/init/init.sh +++ b/.docker/init/init.sh @@ -2,8 +2,6 @@ set -e -echo "Database host is $DATABASE_HOST" - # TODO extra condition to make extra-sure this doesn't run in non-local envs if [ "$(mysql -h "$DATABASE_HOST" -u "$DATABASE_USER" -p"$DATABASE_PASSWORD" \ -sse "select count(*) from information_schema.tables where table_schema='pimcore' and table_name='assets';")" -eq 0 ] From 7d631687128bc01234de793621af5fc126e6a669 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Thu, 23 May 2024 14:12:44 -0400 Subject: [PATCH 032/131] Casting database port to string --- config/database.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/database.yaml b/config/database.yaml index d9b47292f..7aee2e8da 100644 --- a/config/database.yaml +++ b/config/database.yaml @@ -3,7 +3,7 @@ doctrine: connections: default: host: "%env(DATABASE_HOST)%" - port: "%env(DATABASE_PORT)%" + port: "%env(string:DATABASE_PORT)%" user: "%env(DATABASE_USER)%" password: "%env(DATABASE_PASSWORD)%" dbname: "%env(DATABASE_NAME)%" From 376daba95ae0cc925ade3c006a0ed707ffcb7f63 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Thu, 23 May 2024 14:23:53 -0400 Subject: [PATCH 033/131] Adding missing PimcoreAdminBundle install step --- .docker/init/init.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.docker/init/init.sh b/.docker/init/init.sh index 3e6c42ee2..74c770533 100755 --- a/.docker/init/init.sh +++ b/.docker/init/init.sh @@ -11,6 +11,7 @@ then fi echo Installing bundles... +runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreAdminBundle --fail-without-error runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreApplicationLoggerBundle --fail-without-error runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreCustomReportsBundle --fail-without-error runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreGlossaryBundle --fail-without-error From 4dc26635f9fa77535cd1be24d3da3b0767f18a5a Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Thu, 23 May 2024 14:47:36 -0400 Subject: [PATCH 034/131] Adding iputils-ping package --- .docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.docker/Dockerfile b/.docker/Dockerfile index cc530608c..d907f6cf6 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -1,7 +1,7 @@ FROM pimcore/pimcore:php8.2-v3 as base RUN set -eux; \ apt-get update -y; \ - apt-get install -y --no-install-recommends autoconf make g++ unixodbc-dev cron procps vim supervisor netcat-traditional default-mysql-client; \ + apt-get install -y --no-install-recommends autoconf make g++ unixodbc-dev cron procps iputils-ping vim supervisor netcat-traditional default-mysql-client; \ rm -rf /var/lib/apt/lists/*; \ usermod -u 1000 www-data; \ groupmod -g 1000 www-data; From 955ce1ff586381f620e19141c9cfd6ffc5841d62 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Thu, 23 May 2024 15:52:41 -0400 Subject: [PATCH 035/131] Removing explicit rw directives from volumes as that is the default --- docker-compose.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 494d5c046..f74a24400 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -40,7 +40,7 @@ services: env_file: - .env volumes: - - .:/var/www/html:rw + - .:/var/www/html - ./.docker/init/init.local.sh:/init.local.sh command: [ "/init.local.sh" ] @@ -66,7 +66,7 @@ services: ports: - "${WEB_PORT_EXTERNAL}:80" volumes: - - .:/var/www/html:rw + - .:/var/www/html - ./.docker/php-debug/nginx-debug.conf:/etc/nginx/sites-available/default:ro php-debug: @@ -97,7 +97,7 @@ services: env_file: - .env volumes: - - .:/var/www/html:rw + - .:/var/www/html - ./.docker/supervisord/supervisord.conf:/etc/supervisor/conf.d/pimcore.conf:ro # The following two services are used for testing. From f641dec52cfac7ba2f5432a1c847c69dfa614693 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Fri, 31 May 2024 16:05:42 -0400 Subject: [PATCH 036/131] Adding --no-interaction flag --- .docker/init/init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.docker/init/init.sh b/.docker/init/init.sh index 74c770533..84ea13038 100755 --- a/.docker/init/init.sh +++ b/.docker/init/init.sh @@ -7,7 +7,7 @@ if [ "$(mysql -h "$DATABASE_HOST" -u "$DATABASE_USER" -p"$DATABASE_PASSWORD" \ -sse "select count(*) from information_schema.tables where table_schema='pimcore' and table_name='assets';")" -eq 0 ] then echo "Database is empty, so doing a fresh install to seed the database..." - runuser -u www-data -- vendor/bin/pimcore-install --skip-database-config + runuser -u www-data -- vendor/bin/pimcore-install --skip-database-config --no-interaction fi echo Installing bundles... From d73cb8871eca0c2bc04b7f73c0e3ae40d356d7ac Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Fri, 7 Jun 2024 14:55:27 -0400 Subject: [PATCH 037/131] Custom Redis Docker image --- .docker/redis/Dockerfile | 3 +++ .docker/redis/redis.conf | 8 ++++++++ docker-compose.yaml | 4 ++-- 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 .docker/redis/Dockerfile create mode 100644 .docker/redis/redis.conf diff --git a/.docker/redis/Dockerfile b/.docker/redis/Dockerfile new file mode 100644 index 000000000..7e0f83cb8 --- /dev/null +++ b/.docker/redis/Dockerfile @@ -0,0 +1,3 @@ +FROM redis:alpine +COPY /.docker/redis/redis.conf /etc/redis/redis.conf +CMD [ "redis-server", "/etc/redis/redis.conf" ] diff --git a/.docker/redis/redis.conf b/.docker/redis/redis.conf new file mode 100644 index 000000000..6a779cd32 --- /dev/null +++ b/.docker/redis/redis.conf @@ -0,0 +1,8 @@ +bind 0.0.0.0 +protected-mode no +port 6379 +tcp-keepalive 300 +daemonize no +maxmemory 512mb +maxmemory-policy volatile-lru +save "" \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml index f74a24400..35a3aa93b 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,8 +1,8 @@ services: redis: container_name: ${APP_NAME}-redis - image: redis:alpine - command: [ redis-server, --maxmemory 128mb, --maxmemory-policy volatile-lru, --save "" ] + build: + dockerfile: ./.docker/redis/Dockerfile db: container_name: ${APP_NAME}-db From ac5b9ff37d41cf7ad9b77517bcaab672809f1d01 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Tue, 11 Jun 2024 12:53:52 -0400 Subject: [PATCH 038/131] Adding extra condition on pimcore-install --- .docker/init/init.sh | 4 ++-- .env | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.docker/init/init.sh b/.docker/init/init.sh index 84ea13038..fec61b5f8 100755 --- a/.docker/init/init.sh +++ b/.docker/init/init.sh @@ -2,9 +2,9 @@ set -e -# TODO extra condition to make extra-sure this doesn't run in non-local envs if [ "$(mysql -h "$DATABASE_HOST" -u "$DATABASE_USER" -p"$DATABASE_PASSWORD" \ - -sse "select count(*) from information_schema.tables where table_schema='pimcore' and table_name='assets';")" -eq 0 ] + -sse "select count(*) from information_schema.tables where table_schema='pimcore' and table_name='assets';")" -eq 0 ] \ + && [ $PIMCORE_INSTALL ] then echo "Database is empty, so doing a fresh install to seed the database..." runuser -u www-data -- vendor/bin/pimcore-install --skip-database-config --no-interaction diff --git a/.env b/.env index 5d5cd1676..e2dac0eec 100644 --- a/.env +++ b/.env @@ -34,6 +34,8 @@ DATABASE_NAME=pimcore DATABASE_USER=pimcore DATABASE_PASSWORD=pimcore DATABASE_SERVER_VERSION=10.11.7-MariaDB-1:10.11.7+maria~ubu2204 +# Set to true if you want the init container to run the pimore-install command, if the database is empty +PIMCORE_INSTALL=true PIMCORE_INSTALL_MYSQL_HOST_SOCKET=${DATABASE_HOST} PIMCORE_INSTALL_MYSQL_PORT=${DATABASE_PORT} PIMCORE_INSTALL_MYSQL_USERNAME=${DATABASE_USER} From 22e34ee34c85003a503e97a7b9e6033453dfe764 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Tue, 11 Jun 2024 12:55:00 -0400 Subject: [PATCH 039/131] Explicitly using 127.0.0.1:9000 in nginx.conf to avoid problems with dynamic container names --- .docker/php/nginx.conf | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.docker/php/nginx.conf b/.docker/php/nginx.conf index ce25cd9cf..b4019174e 100644 --- a/.docker/php/nginx.conf +++ b/.docker/php/nginx.conf @@ -2,10 +2,6 @@ # mime types are already covered in nginx.conf #include mime.types; -upstream php-pimcore10 { - server php:9000; -} - map $args $static_page_root { default /var/tmp/pages; "~*(^|&)pimcore_editmode=true(&|$)" /var/nonexistent; @@ -140,7 +136,7 @@ server { # Mitigate https://httpoxy.org/ vulnerabilities fastcgi_param HTTP_PROXY ""; - fastcgi_pass php-pimcore10; + fastcgi_pass 127.0.0.1:9000; # Prevents URIs that include the front controller. This will 404: # http://domain.tld/index.php/some-path # Remove the internal directive to allow URIs like this @@ -156,10 +152,10 @@ server { allow 127.0.0.1; # add additional IP's or Ranges deny all; - fastcgi_pass php-pimcore10; + fastcgi_pass 127.0.0.1:9000; } location /fpm-ping { - fastcgi_pass php-pimcore10; + fastcgi_pass 127.0.0.1:9000; } } # nginx Status From 00e4e274a45eb44e0bc1b746c7ab6e60dba0ac7f Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Thu, 20 Jun 2024 14:43:22 -0300 Subject: [PATCH 040/131] Removed comment --- .env | 1 - 1 file changed, 1 deletion(-) diff --git a/.env b/.env index e2dac0eec..3b86cbcb1 100644 --- a/.env +++ b/.env @@ -34,7 +34,6 @@ DATABASE_NAME=pimcore DATABASE_USER=pimcore DATABASE_PASSWORD=pimcore DATABASE_SERVER_VERSION=10.11.7-MariaDB-1:10.11.7+maria~ubu2204 -# Set to true if you want the init container to run the pimore-install command, if the database is empty PIMCORE_INSTALL=true PIMCORE_INSTALL_MYSQL_HOST_SOCKET=${DATABASE_HOST} PIMCORE_INSTALL_MYSQL_PORT=${DATABASE_PORT} From a6f2358d2ec44d04946d02c3fbfb5bc4b32b712a Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Thu, 25 Jul 2024 10:08:46 -0300 Subject: [PATCH 041/131] Removing unnecessary nginx application from php-debug service --- docker-compose.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index f0bbf4918..a2fe462c3 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -77,7 +77,6 @@ services: condition: service_completed_successfully volumes: - .:/var/www/html - - ./.docker/php/nginx.conf:/etc/nginx/sites-available/default:ro supervisord: container_name: ${APP_NAME}-supervisord From f320fe79ef0917c5eb94282bbc85c7a542987dff Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Thu, 25 Jul 2024 11:16:18 -0300 Subject: [PATCH 042/131] Moving build:classes and cache:warmup calls to base as all built images benefit from them --- .docker/Dockerfile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.docker/Dockerfile b/.docker/Dockerfile index d907f6cf6..e2828660b 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -13,7 +13,9 @@ COPY /.docker/composer-install-dependencies.sh /composer-install-dependencies.sh RUN /composer-install-dependencies.sh COPY --chown=www-data:www-data / /var/www/html RUN cd /var/www/html; \ - runuser -u www-data -- php /usr/local/bin/composer install + runuser -u www-data -- php /usr/local/bin/composer install; \ + runuser -u www-data -- /var/www/html/bin/console pimcore:build:classes; \ + runuser -u www-data -- /var/www/html/bin/console cache:warmup FROM base as init # TODO allow for custom bundles to be passed via args? @@ -28,8 +30,6 @@ RUN set -eux; \ COPY /.docker/php/php.ini /usr/local/etc/php/conf.d/docker-pimcore-php.ini COPY /.docker/php/nginx.conf /etc/nginx/sites-available/default COPY /.docker/php/supervisord.conf /etc/supervisor/supervisord.conf -RUN runuser -u www-data -- /var/www/html/bin/console pimcore:build:classes; \ - runuser -u www-data -- /var/www/html/bin/console cache:warmup CMD [ "/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf" ] FROM base as supervisord @@ -37,8 +37,6 @@ COPY --from=pimcore/pimcore:php8.2-supervisord-v3 /var/run /var/run COPY --from=pimcore/pimcore:php8.2-supervisord-v3 /usr/sbin/cron /usr/sbin/cron COPY --from=pimcore/pimcore:php8.2-supervisord-v3 /etc/supervisor/supervisord.conf /etc/supervisor/supervisord.conf COPY /.docker/supervisord/supervisord.conf /etc/supervisor/conf.d/pimcore.conf -RUN runuser -u www-data -- /var/www/html/bin/console pimcore:build:classes; \ - runuser -u www-data -- /var/www/html/bin/console cache:warmup CMD [ "/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/pimcore.conf" ] FROM base as php-debug From bbee9f697bc06240de2dd4ab6830827dafa77e7f Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Thu, 25 Jul 2024 11:50:54 -0300 Subject: [PATCH 043/131] Removing --fail-without-error as Pimcore 11.3 no longer fails when bundle is already installed --- .docker/init/init.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.docker/init/init.sh b/.docker/init/init.sh index fec61b5f8..fc6511fbe 100755 --- a/.docker/init/init.sh +++ b/.docker/init/init.sh @@ -11,17 +11,17 @@ then fi echo Installing bundles... -runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreAdminBundle --fail-without-error -runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreApplicationLoggerBundle --fail-without-error -runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreCustomReportsBundle --fail-without-error -runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreGlossaryBundle --fail-without-error -runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreSeoBundle --fail-without-error -runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreSimpleBackendSearchBundle --fail-without-error -runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreStaticRoutesBundle --fail-without-error -runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreTinymceBundle --fail-without-error -runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreUuidBundle --fail-without-error -runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreXliffBundle --fail-without-error -runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreWordExportBundle --fail-without-error +runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreAdminBundle +runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreApplicationLoggerBundle +runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreCustomReportsBundle +runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreGlossaryBundle +runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreSeoBundle +runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreSimpleBackendSearchBundle +runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreStaticRoutesBundle +runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreTinymceBundle +runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreUuidBundle +runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreXliffBundle +runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreWordExportBundle echo Running migration... runuser -u www-data -- /var/www/html/bin/console doctrine:migrations:migrate -n From ea8e3b170ab6909316d68bf6c6d4e7d6f14503a1 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Thu, 25 Jul 2024 17:23:20 -0300 Subject: [PATCH 044/131] More comprehensive check on PIMCORE_INSTALL variable --- .docker/init/init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.docker/init/init.sh b/.docker/init/init.sh index fc6511fbe..b7e025bb7 100755 --- a/.docker/init/init.sh +++ b/.docker/init/init.sh @@ -4,7 +4,7 @@ set -e if [ "$(mysql -h "$DATABASE_HOST" -u "$DATABASE_USER" -p"$DATABASE_PASSWORD" \ -sse "select count(*) from information_schema.tables where table_schema='pimcore' and table_name='assets';")" -eq 0 ] \ - && [ $PIMCORE_INSTALL ] + && [ "$PIMCORE_INSTALL" = "true" ] || [ "$PIMCORE_INSTALL" = "1" ] || [ $PIMCORE_INSTALL -eq 1 ] then echo "Database is empty, so doing a fresh install to seed the database..." runuser -u www-data -- vendor/bin/pimcore-install --skip-database-config --no-interaction From 335ef3b74c53bac4c453bbfeca591ffe01e2ee4d Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Fri, 26 Jul 2024 14:18:41 -0300 Subject: [PATCH 045/131] Volume-mapping init.sh so it is easier to debug --- docker-compose.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yaml b/docker-compose.yaml index a2fe462c3..bfb57a783 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -41,6 +41,7 @@ services: - .env volumes: - .:/var/www/html + - ./docker/init/init.sh:/init.sh - ./.docker/init/init.local.sh:/init.local.sh command: [ "/init.local.sh" ] From f1edc99d8098a2fc966872ac24cf78ed5f85298f Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Fri, 26 Jul 2024 14:40:20 -0300 Subject: [PATCH 046/131] Better echo out --- .docker/init/init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.docker/init/init.sh b/.docker/init/init.sh index b7e025bb7..18eb77c52 100755 --- a/.docker/init/init.sh +++ b/.docker/init/init.sh @@ -6,7 +6,7 @@ if [ "$(mysql -h "$DATABASE_HOST" -u "$DATABASE_USER" -p"$DATABASE_PASSWORD" \ -sse "select count(*) from information_schema.tables where table_schema='pimcore' and table_name='assets';")" -eq 0 ] \ && [ "$PIMCORE_INSTALL" = "true" ] || [ "$PIMCORE_INSTALL" = "1" ] || [ $PIMCORE_INSTALL -eq 1 ] then - echo "Database is empty, so doing a fresh install to seed the database..." + echo "Database is empty and PIMCORE_INSTALL is set to true, so calling pimcore-install..." runuser -u www-data -- vendor/bin/pimcore-install --skip-database-config --no-interaction fi From 97bafd414465e45540d010df8b78015fb91e3065 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Mon, 29 Jul 2024 00:46:04 -0300 Subject: [PATCH 047/131] Replacing custom Redis image with Docker Hub one with a simple command override --- .docker/redis/Dockerfile | 3 --- .docker/redis/redis.conf | 8 -------- docker-compose.yaml | 5 ++--- 3 files changed, 2 insertions(+), 14 deletions(-) delete mode 100644 .docker/redis/Dockerfile delete mode 100644 .docker/redis/redis.conf diff --git a/.docker/redis/Dockerfile b/.docker/redis/Dockerfile deleted file mode 100644 index 7e0f83cb8..000000000 --- a/.docker/redis/Dockerfile +++ /dev/null @@ -1,3 +0,0 @@ -FROM redis:alpine -COPY /.docker/redis/redis.conf /etc/redis/redis.conf -CMD [ "redis-server", "/etc/redis/redis.conf" ] diff --git a/.docker/redis/redis.conf b/.docker/redis/redis.conf deleted file mode 100644 index 6a779cd32..000000000 --- a/.docker/redis/redis.conf +++ /dev/null @@ -1,8 +0,0 @@ -bind 0.0.0.0 -protected-mode no -port 6379 -tcp-keepalive 300 -daemonize no -maxmemory 512mb -maxmemory-policy volatile-lru -save "" \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml index bfb57a783..f79e02e7d 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,8 +1,7 @@ services: redis: - container_name: ${APP_NAME}-redis - build: - dockerfile: ./.docker/redis/Dockerfile + image: redis:alpine + command: [ redis-server, --maxmemory 128mb, --maxmemory-policy volatile-lru, --save "" ] db: container_name: ${APP_NAME}-db From e1ef680b40040ad46e235207467736ac970ee47a Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Tue, 30 Jul 2024 11:07:34 -0300 Subject: [PATCH 048/131] Use --force flag to ensure there are no problems with out-of-sync modification dates --- .docker/init/init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.docker/init/init.sh b/.docker/init/init.sh index 18eb77c52..daa8dc0ee 100755 --- a/.docker/init/init.sh +++ b/.docker/init/init.sh @@ -27,7 +27,7 @@ echo Running migration... runuser -u www-data -- /var/www/html/bin/console doctrine:migrations:migrate -n echo Rebuilding classes... -runuser -u www-data -- /var/www/html/bin/console pimcore:deployment:classes-rebuild -c -d -n +runuser -u www-data -- /var/www/html/bin/console pimcore:deployment:classes-rebuild -c -d -n --force echo Generating roles... runuser -u www-data -- /var/www/html/bin/console torq:generate-roles From 0292050f972663d4fc38553c2bcf53f3c305ed57 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Tue, 30 Jul 2024 11:24:25 -0300 Subject: [PATCH 049/131] Simplifying PIMCORE_INSTALL condition --- .docker/init/init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.docker/init/init.sh b/.docker/init/init.sh index 18eb77c52..f470b788b 100755 --- a/.docker/init/init.sh +++ b/.docker/init/init.sh @@ -4,7 +4,7 @@ set -e if [ "$(mysql -h "$DATABASE_HOST" -u "$DATABASE_USER" -p"$DATABASE_PASSWORD" \ -sse "select count(*) from information_schema.tables where table_schema='pimcore' and table_name='assets';")" -eq 0 ] \ - && [ "$PIMCORE_INSTALL" = "true" ] || [ "$PIMCORE_INSTALL" = "1" ] || [ $PIMCORE_INSTALL -eq 1 ] + && [ "$PIMCORE_INSTALL" = "true" ] then echo "Database is empty and PIMCORE_INSTALL is set to true, so calling pimcore-install..." runuser -u www-data -- vendor/bin/pimcore-install --skip-database-config --no-interaction From d7bf4f5f7af2e82aa58a6227578c51fd5fafa0de Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Wed, 31 Jul 2024 11:54:22 -0300 Subject: [PATCH 050/131] Container name for Redis --- docker-compose.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yaml b/docker-compose.yaml index f79e02e7d..354aea580 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,5 +1,6 @@ services: redis: + container_name: ${APP_NAME}-redis image: redis:alpine command: [ redis-server, --maxmemory 128mb, --maxmemory-policy volatile-lru, --save "" ] From c58cd92e8c31c0d8c1f1c42f39ccd5405cf785a0 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Tue, 6 Aug 2024 17:01:24 -0300 Subject: [PATCH 051/131] Typo --- docker-compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 354aea580..1eb706d3f 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -41,7 +41,7 @@ services: - .env volumes: - .:/var/www/html - - ./docker/init/init.sh:/init.sh + - ./.docker/init/init.sh:/init.sh - ./.docker/init/init.local.sh:/init.local.sh command: [ "/init.local.sh" ] From e8686cfa348ee94241c98c862d47f180649bff35 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Tue, 13 Aug 2024 11:13:50 -0400 Subject: [PATCH 052/131] Adjusting case of 'as' keyword to get rid of build warnings --- .docker/Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.docker/Dockerfile b/.docker/Dockerfile index e2828660b..0f4544c71 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -1,4 +1,4 @@ -FROM pimcore/pimcore:php8.2-v3 as base +FROM pimcore/pimcore:php8.2-v3 AS base RUN set -eux; \ apt-get update -y; \ apt-get install -y --no-install-recommends autoconf make g++ unixodbc-dev cron procps iputils-ping vim supervisor netcat-traditional default-mysql-client; \ @@ -17,12 +17,12 @@ RUN cd /var/www/html; \ runuser -u www-data -- /var/www/html/bin/console pimcore:build:classes; \ runuser -u www-data -- /var/www/html/bin/console cache:warmup -FROM base as init +FROM base AS init # TODO allow for custom bundles to be passed via args? COPY /.docker/init/init.sh /init.sh CMD [ "/init.sh" ] -FROM base as php +FROM base AS php RUN set -eux; \ apt-get update -y; \ apt-get install -y --no-install-recommends nginx; \ @@ -32,14 +32,14 @@ COPY /.docker/php/nginx.conf /etc/nginx/sites-available/default COPY /.docker/php/supervisord.conf /etc/supervisor/supervisord.conf CMD [ "/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf" ] -FROM base as supervisord +FROM base AS supervisord COPY --from=pimcore/pimcore:php8.2-supervisord-v3 /var/run /var/run COPY --from=pimcore/pimcore:php8.2-supervisord-v3 /usr/sbin/cron /usr/sbin/cron COPY --from=pimcore/pimcore:php8.2-supervisord-v3 /etc/supervisor/supervisord.conf /etc/supervisor/supervisord.conf COPY /.docker/supervisord/supervisord.conf /etc/supervisor/conf.d/pimcore.conf CMD [ "/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/pimcore.conf" ] -FROM base as php-debug +FROM base AS php-debug COPY --from=pimcore/pimcore:php8.2-debug-v3 /usr/local/bin/entrypoint.sh /usr/local/bin/entrypoint.sh RUN pecl install xdebug; \ docker-php-ext-enable xdebug; From 33fff9c48de9674e1cbc16e6aba8cda50080b254 Mon Sep 17 00:00:00 2001 From: "luke.macausland" Date: Mon, 26 Aug 2024 16:19:51 -0300 Subject: [PATCH 053/131] Change init command order. --- .docker/init/init.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.docker/init/init.sh b/.docker/init/init.sh index c38327c04..4dbaf2989 100755 --- a/.docker/init/init.sh +++ b/.docker/init/init.sh @@ -29,8 +29,8 @@ runuser -u www-data -- /var/www/html/bin/console doctrine:migrations:migrate -n echo Rebuilding classes... runuser -u www-data -- /var/www/html/bin/console pimcore:deployment:classes-rebuild -c -d -n --force -echo Generating roles... -runuser -u www-data -- /var/www/html/bin/console torq:generate-roles - echo Creating folders... runuser -u www-data -- /var/www/html/bin/console torq:folder-creator + +echo Generating roles... +runuser -u www-data -- /var/www/html/bin/console torq:generate-roles From c9117459b23322e79b58ec046b64290c6f63b356 Mon Sep 17 00:00:00 2001 From: cameronfromtorq <105230931+cameronfromtorq@users.noreply.github.com> Date: Wed, 28 Aug 2024 17:48:37 -0300 Subject: [PATCH 054/131] allow npm proxy access to php container (#2) undefined --- config/config.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/config/config.yaml b/config/config.yaml index 5c894c679..29fd4d0f1 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -102,6 +102,22 @@ pimcore: #### SYMFONY OVERRIDES framework: + trusted_proxies: "127.0.0.1,REMOTE_ADDR" + trusted_headers: + [ + "x-forwarded-for", + "x-forwarded-host", + "x-forwarded-proto", + "x-forwarded-port", + "x-forwarded-prefix", + ] + + session: + # ... + cookie_samesite: null + cookie_lifetime: 86400 + gc_maxlifetime: 86400 + #### DEFINE LOCATION OF MANIFEST WHEN WORKING WITH SYMFONY ENCORE # assets: # json_manifest_path: '%kernel.project_dir%/public/build/manifest.json' From e9a1d61413251da21cdf86efaf866ab9881faac7 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Wed, 28 Aug 2024 16:47:16 -0400 Subject: [PATCH 055/131] Adding missing XDebug configuration --- .docker/Dockerfile | 1 + .docker/php-debug/xdebug.conf | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 .docker/php-debug/xdebug.conf diff --git a/.docker/Dockerfile b/.docker/Dockerfile index 0f4544c71..60559b509 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -44,5 +44,6 @@ COPY --from=pimcore/pimcore:php8.2-debug-v3 /usr/local/bin/entrypoint.sh /usr/lo RUN pecl install xdebug; \ docker-php-ext-enable xdebug; ENV PHP_IDE_CONFIG serverName=localhost +COPY /.docker/php-debug/xdebug.conf /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] CMD ["php-fpm"] diff --git a/.docker/php-debug/xdebug.conf b/.docker/php-debug/xdebug.conf new file mode 100644 index 000000000..94ba158c5 --- /dev/null +++ b/.docker/php-debug/xdebug.conf @@ -0,0 +1,13 @@ +zend_extension=xdebug + +[xdebug] +xdebug.mode=debug,develop,profile +xdebug.output_dir = /var/www/html/var/log/xdebug.log +xdebug.client_host=host.docker.internal +xdebug.client_port=9003 +xdebug.cli_color=1 +xdebug.start_with_request=trigger +xdebug.log_level=3 +xdebug.log=/var/www/html/var/log/xdebug.log +xdebug.discover_client_host=1 +xdebug.max_nesting_level=256 From 86b0b6ff62f6bb99a0860a57db1f9aaa04097fb6 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Wed, 28 Aug 2024 16:56:36 -0400 Subject: [PATCH 056/131] Updating to use PHP 8.3 versions of base Pimcore images --- .docker/Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.docker/Dockerfile b/.docker/Dockerfile index 60559b509..ecde1f7e8 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -1,4 +1,4 @@ -FROM pimcore/pimcore:php8.2-v3 AS base +FROM pimcore/pimcore:php8.3-v3 AS base RUN set -eux; \ apt-get update -y; \ apt-get install -y --no-install-recommends autoconf make g++ unixodbc-dev cron procps iputils-ping vim supervisor netcat-traditional default-mysql-client; \ @@ -33,14 +33,14 @@ COPY /.docker/php/supervisord.conf /etc/supervisor/supervisord.conf CMD [ "/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf" ] FROM base AS supervisord -COPY --from=pimcore/pimcore:php8.2-supervisord-v3 /var/run /var/run -COPY --from=pimcore/pimcore:php8.2-supervisord-v3 /usr/sbin/cron /usr/sbin/cron -COPY --from=pimcore/pimcore:php8.2-supervisord-v3 /etc/supervisor/supervisord.conf /etc/supervisor/supervisord.conf +COPY --from=pimcore/pimcore:php8.3-supervisord-v3 /var/run /var/run +COPY --from=pimcore/pimcore:php8.3-supervisord-v3 /usr/sbin/cron /usr/sbin/cron +COPY --from=pimcore/pimcore:php8.3-supervisord-v3 /etc/supervisor/supervisord.conf /etc/supervisor/supervisord.conf COPY /.docker/supervisord/supervisord.conf /etc/supervisor/conf.d/pimcore.conf CMD [ "/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/pimcore.conf" ] FROM base AS php-debug -COPY --from=pimcore/pimcore:php8.2-debug-v3 /usr/local/bin/entrypoint.sh /usr/local/bin/entrypoint.sh +COPY --from=pimcore/pimcore:php8.3-debug-v3 /usr/local/bin/entrypoint.sh /usr/local/bin/entrypoint.sh RUN pecl install xdebug; \ docker-php-ext-enable xdebug; ENV PHP_IDE_CONFIG serverName=localhost From 70e965e784a4feb737be6c1957acf273725e8c6b Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Tue, 3 Sep 2024 15:40:12 -0400 Subject: [PATCH 057/131] Always run composer-install-dependencies.sh to ensure local vendor folder is in sync with composer files --- .docker/init/init.local.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.docker/init/init.local.sh b/.docker/init/init.local.sh index 348ddba9c..286611c31 100755 --- a/.docker/init/init.local.sh +++ b/.docker/init/init.local.sh @@ -2,10 +2,7 @@ set -e -if [ ! -d /var/www/html/vendor ]; -then - . /composer-install-dependencies.sh -fi +. /composer-install-dependencies.sh if [ "$(mysql -h "$DATABASE_HOST" -u "$DATABASE_USER" -p"$DATABASE_PASSWORD" \ -sse "select count(*) from information_schema.tables where table_schema='pimcore' and table_name='assets';")" -ne 0 ] @@ -15,4 +12,4 @@ then runuser -u www-data -- bin/console cache:clear fi -. /init.sh \ No newline at end of file +. /init.sh From 1161e13b39ed9ac8f1a05bf39d3940d9964c4e45 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Tue, 17 Sep 2024 15:29:12 -0400 Subject: [PATCH 058/131] Update README.md --- README.md | 76 ++++++++++--------------------------------------------- 1 file changed, 14 insertions(+), 62 deletions(-) diff --git a/README.md b/README.md index 15c172f3c..0619c98cd 100644 --- a/README.md +++ b/README.md @@ -1,67 +1,19 @@ -# Pimcore Project Skeleton +# Pimcore Project Skeleton (Torq IT fork) -This skeleton should be used by experienced Pimcore developers for starting a new project from the ground up. -If you are new to Pimcore, it's better to start with our demo package, listed below 😉 +Forked from https://github.com/pimcore/skeleton. -## Getting started -```bash -COMPOSER_MEMORY_LIMIT=-1 composer create-project pimcore/skeleton my-project -cd ./my-project -./vendor/bin/pimcore-install -``` +## Setup -- Point your virtual host to `my-project/public` -- [Only for Apache] Create `my-project/public/.htaccess` according to https://pimcore.com/docs/platform/Pimcore/Installation_and_Upgrade/System_Setup_and_Hosting/Apache_Configuration/ -- Open https://your-host/admin in your browser -- Done! 😎 +### Prerequisites: +- A Linux based system (or Windows Subsystem for Linux (WSL) if you are on Windows - see https://learn.microsoft.com/en-us/windows/wsl/install for more information) +- Docker Desktop (https://www.docker.com/products/docker-desktop/) -## Docker +### Setup instructions +1. Clone the repository +2. Update the `name` property in `composer.json` to match your project's name +3. Update the `.env` property `APP_NAME` to match your project's name +4. Run `docker compose up -d` to build the Docker images and run the containers +5. By default, go to `localhost:8400` in your browser to access the Pimcore admin (port is controlled by the `WEB_EXTERNAL_PORT` environment variable). Use username `admin` and password `pimcore` to log in. -You can also use Docker to set up a new Pimcore Installation. -You don't need to have a PHP environment with composer installed. - -### Prerequisites - -* Your user must be allowed to run docker commands (directly or via sudo). -* You must have docker compose installed. -* Your user must be allowed to change file permissions (directly or via sudo). - -### Follow these steps -1. Initialize the skeleton project using the `pimcore/pimcore` image -``docker run -u `id -u`:`id -g` --rm -v `pwd`:/var/www/html pimcore/pimcore:php8.3-latest composer create-project pimcore/skeleton my-project`` - -2. Go to your new project -`cd my-project/` - -3. Part of the new project is a docker compose file - * 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 - `docker compose exec php vendor/bin/pimcore-install` - * When asked for admin user and password: Choose freely - * This can take a while, up to 20 minutes - * If you select to install the SimpleBackendSearchBundle please make sure to add the `pimcore_search_backend_message` to your `.docker/supervisord.conf` file inside value for 'command' like `pimcore_maintenance` already is. - -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` - -6. :heavy_check_mark: DONE - You can now visit your pimcore instance: - * The frontend: - * The admin interface, using the credentials you have chosen above: - - -## Pimcore Platform Version -By default, Pimcore Platform Version is added as a dependency which ensures installation of compatible and in combination -with each other tested versions of additional Pimcore modules. More information about the Platform Version can be found in the -[Platform Version docs](https://github.com/pimcore/platform-version). - -It might be necessary to update a specific Pimcore module to a version that is not included in the Platform Version. -In that case, you need to remove the `platform-version` dependency from your `composer.json` and update the module to -the desired version. -Be aware that this might lead to a theoretically compatible but untested combination of Pimcore modules. - -## Other demo/skeleton packages -- [Pimcore Basic Demo](https://github.com/pimcore/demo) +## Getting updates +We recommend forking this repository and using it as an upstream remote in order to get the latest updates and improvements. From c0e76750b2776f7b9a555bd7de7fb670c6d33e4f Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Mon, 7 Oct 2024 16:36:28 -0400 Subject: [PATCH 059/131] Upgrading Symfony dependencies to ^6.4 --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 735abbf60..d37b91dc9 100644 --- a/composer.json +++ b/composer.json @@ -15,8 +15,8 @@ "pimcore/pimcore": "*", "pimcore/platform-version": "^2024.2", "pimcore/admin-ui-classic-bundle": "*", - "symfony/dotenv": "^6.2", - "symfony/runtime": "^6.2", + "symfony/dotenv": "^6.4", + "symfony/runtime": "^6.4", "torqit/pimcore-folder-creator-bundle": "^3.0", "torqit/pimcore-role-creator-bundle": "^3.1" }, From 83bf7e7fc83376f6fc2f4abb2ffdb3cf49eea12f Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Thu, 10 Oct 2024 10:22:51 -0400 Subject: [PATCH 060/131] Update Symfony dependencies to ^6.4.11 --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 0ee17c969..00fb9633b 100644 --- a/composer.json +++ b/composer.json @@ -15,8 +15,8 @@ "pimcore/pimcore": "*", "pimcore/platform-version": "^2024.3", "pimcore/admin-ui-classic-bundle": "*", - "symfony/dotenv": "^6.4", - "symfony/runtime": "^6.4", + "symfony/dotenv": "^6.4.11", + "symfony/runtime": "^6.4.11", "torqit/pimcore-folder-creator-bundle": "^3.0", "torqit/pimcore-role-creator-bundle": "^3.1" }, From 1f9586f5db0dca2a4d7e015c0efc6f276ec227fd Mon Sep 17 00:00:00 2001 From: cameronfromtorq <105230931+cameronfromtorq@users.noreply.github.com> Date: Fri, 11 Oct 2024 12:59:19 -0300 Subject: [PATCH 061/131] add vscode settings folder (#6) --- .vscode/extensions.json | 10 ++++++++++ .vscode/launch.json | 34 ++++++++++++++++++++++++++++++++++ .vscode/settings.json | 19 +++++++++++++++++++ 3 files changed, 63 insertions(+) create mode 100644 .vscode/extensions.json create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 000000000..2e2726eda --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,10 @@ +{ + "recommendations": [ + "ms-vscode-remote.remote-wsl", + "ms-azuretools.vscode-docker", + "xdebug.php-debug", + "bmewburn.vscode-intelephense-client", + "ethansk.restore-terminals", + "ms-azuretools.vscode-bicep" + ] +} diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 000000000..03a80bd2c --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,34 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Listen for Xdebug", + "type": "php", + "request": "launch", + "port": 9003, + "pathMappings": { + "/var/www/html": "${workspaceRoot}" + }, + "xdebugSettings": { + "max_children": 128 + }, + "hostname": "0.0.0.0" + }, + { + "name": "Launch currently open script", + "type": "php", + "request": "launch", + "program": "${file}", + "cwd": "${fileDirname}", + "port": 0, + "runtimeArgs": ["-dxdebug.start_with_request=yes"], + "env": { + "XDEBUG_MODE": "debug,develop", + "XDEBUG_CONFIG": "client_port=${port}" + } + } + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..4ed38d897 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,19 @@ +{ + "restoreTerminals.terminals": [ + { + "splitTerminals": [ + { + "name": "Spin up docker containers", + "commands": ["docker-compose up"] + }, + { + "name": "Start bash in Pimcore container", + "commands": [ + "sleep 10", // wait for container to start + "docker compose exec -it --user www-data php bash" + ] + } + ] + } + ] +} From 63795cc55b0bfd41726cc910ece8128464af08e8 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Thu, 17 Oct 2024 16:02:23 -0400 Subject: [PATCH 062/131] Locking down _profiler route to require PIMCORE_ADMIN role to reduce exposure of sensitive info --- config/packages/security.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/packages/security.yaml b/config/packages/security.yaml index 3923c5209..a2b3883b1 100644 --- a/config/packages/security.yaml +++ b/config/packages/security.yaml @@ -7,7 +7,7 @@ security: firewalls: dev: - pattern: ^/(_(profiler|wdt)|css|images|js)/ + pattern: ^/(_(wdt)|css|images|js)/ security: false # Pimcore WebDAV HTTP basic // DO NOT CHANGE! @@ -29,6 +29,7 @@ security: - { path: ^/admin/login/(login|lostpassword|deeplink|csrf-token)$, roles: PUBLIC_ACCESS } - { path: ^/admin, roles: ROLE_PIMCORE_USER } - { path: ^/asset/webdav, roles: ROLE_PIMCORE_USER } + - { path: ^/_profiler, roles: ROLE_PIMCORE_ADMIN } role_hierarchy: # Pimcore admin // DO NOT CHANGE! From 05029c0aff38ded6fcc3d9ccabb017aa7b02bf97 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Thu, 17 Oct 2024 17:10:01 -0400 Subject: [PATCH 063/131] Revert "Locking down _profiler route to require PIMCORE_ADMIN role to reduce exposure of sensitive info" This reverts commit 63795cc55b0bfd41726cc910ece8128464af08e8. --- config/packages/security.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config/packages/security.yaml b/config/packages/security.yaml index a2b3883b1..3923c5209 100644 --- a/config/packages/security.yaml +++ b/config/packages/security.yaml @@ -7,7 +7,7 @@ security: firewalls: dev: - pattern: ^/(_(wdt)|css|images|js)/ + pattern: ^/(_(profiler|wdt)|css|images|js)/ security: false # Pimcore WebDAV HTTP basic // DO NOT CHANGE! @@ -29,7 +29,6 @@ security: - { path: ^/admin/login/(login|lostpassword|deeplink|csrf-token)$, roles: PUBLIC_ACCESS } - { path: ^/admin, roles: ROLE_PIMCORE_USER } - { path: ^/asset/webdav, roles: ROLE_PIMCORE_USER } - - { path: ^/_profiler, roles: ROLE_PIMCORE_ADMIN } role_hierarchy: # Pimcore admin // DO NOT CHANGE! From a6aec45cfd73bb04065771167ed921d35cccb858 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Fri, 18 Oct 2024 13:27:03 -0400 Subject: [PATCH 064/131] Proper version constraint for Symfony dependencies to avoid Redis bug --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 00fb9633b..428af263d 100644 --- a/composer.json +++ b/composer.json @@ -15,8 +15,8 @@ "pimcore/pimcore": "*", "pimcore/platform-version": "^2024.3", "pimcore/admin-ui-classic-bundle": "*", - "symfony/dotenv": "^6.4.11", - "symfony/runtime": "^6.4.11", + "symfony/dotenv": "^6.4.12", + "symfony/runtime": "^6.4.12", "torqit/pimcore-folder-creator-bundle": "^3.0", "torqit/pimcore-role-creator-bundle": "^3.1" }, From b3673c5d69df2c9c268b4b1b935daad8560a4dc0 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Tue, 29 Oct 2024 14:26:13 -0400 Subject: [PATCH 065/131] Disabling profiler by default --- config/config.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/config.yaml b/config/config.yaml index 29fd4d0f1..afbd10811 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -101,6 +101,8 @@ pimcore: #### SYMFONY OVERRIDES framework: + profiler: + enabled: false trusted_proxies: "127.0.0.1,REMOTE_ADDR" trusted_headers: From b2822c5aafd01edffd4d633373098e83f0052f22 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Wed, 30 Oct 2024 14:22:23 -0400 Subject: [PATCH 066/131] Removing unprotected firewall for _profiler and _wdt routes --- config/packages/security.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/config/packages/security.yaml b/config/packages/security.yaml index 3923c5209..33fa5c9ad 100644 --- a/config/packages/security.yaml +++ b/config/packages/security.yaml @@ -6,10 +6,6 @@ security: id: Pimcore\Security\User\UserProvider firewalls: - dev: - pattern: ^/(_(profiler|wdt)|css|images|js)/ - security: false - # Pimcore WebDAV HTTP basic // DO NOT CHANGE! pimcore_webdav: pattern: ^/asset/webdav From abb03660811bc1cf5d67679b405b54180bc3db75 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Wed, 30 Oct 2024 14:42:42 -0400 Subject: [PATCH 067/131] Put back dev firewall for static files --- config/packages/security.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/packages/security.yaml b/config/packages/security.yaml index 33fa5c9ad..dc13024e6 100644 --- a/config/packages/security.yaml +++ b/config/packages/security.yaml @@ -6,6 +6,10 @@ security: id: Pimcore\Security\User\UserProvider firewalls: + dev: + pattern: ^/(css|images|js)/ + security: false + # Pimcore WebDAV HTTP basic // DO NOT CHANGE! pimcore_webdav: pattern: ^/asset/webdav From fd2b54aaf30c408050e6c506eea9011edfaf259e Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Sun, 17 Nov 2024 16:07:58 -0500 Subject: [PATCH 068/131] Ensuring that pimcore:build:classes does not silently fail during image build --- .docker/Dockerfile | 3 ++- config/services.yaml | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.docker/Dockerfile b/.docker/Dockerfile index ecde1f7e8..bc6fd1375 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -12,7 +12,8 @@ COPY --chown=www-data:www-data /composer.* /var/www/html COPY /.docker/composer-install-dependencies.sh /composer-install-dependencies.sh RUN /composer-install-dependencies.sh COPY --chown=www-data:www-data / /var/www/html -RUN cd /var/www/html; \ +RUN set -eux; \ + cd /var/www/html; \ runuser -u www-data -- php /usr/local/bin/composer install; \ runuser -u www-data -- /var/www/html/bin/console pimcore:build:classes; \ runuser -u www-data -- /var/www/html/bin/console cache:warmup diff --git a/config/services.yaml b/config/services.yaml index 4812f29e3..3df7fae66 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -1,6 +1,18 @@ parameters: secret: DETzaWisgJOBN+SK87M1o8laf6d+8ZT3sA+Asjm+TNE= + # These are default values for connecting to the database/Redis cache that the Docker build sometimes requires to be set. + # Once the app is actually running, they will be replaced with actual values. + env(DATABASE_HOST): '' + env(DATABASE_PORT): 0 + env(DATABASE_NAME): '' + env(DATABASE_USER): '' + env(DATABASE_PASSWORD): '' + env(DATABASE_SERVER_VERSION): '10.11.7-MariaDB-1:10.11.7+maria~ubu2204' + env(REDIS_DB): "0" + env(REDIS_SESSION_DB): "0" + env(REDIS_HOST): 'redis://redis' + # customize the full path to external executables # normally they are auto-detected by `which program` or auto-discovered in the configured path in # System Settings -> General -> Additional $PATH variable From ee5b3db019b8fec635f5ad29671120a7a7b2e406 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Sun, 17 Nov 2024 16:48:19 -0500 Subject: [PATCH 069/131] Better default value for database server version --- config/services.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/services.yaml b/config/services.yaml index 3df7fae66..5deefbc80 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -8,7 +8,7 @@ parameters: env(DATABASE_NAME): '' env(DATABASE_USER): '' env(DATABASE_PASSWORD): '' - env(DATABASE_SERVER_VERSION): '10.11.7-MariaDB-1:10.11.7+maria~ubu2204' + env(DATABASE_SERVER_VERSION): '0.0.0' env(REDIS_DB): "0" env(REDIS_SESSION_DB): "0" env(REDIS_HOST): 'redis://redis' From a9958efadc95f14dc802e1cc678749d0f7dedce6 Mon Sep 17 00:00:00 2001 From: lukemacausland <58705994+lukemacausland@users.noreply.github.com> Date: Thu, 28 Nov 2024 10:10:02 -0400 Subject: [PATCH 070/131] Add package, and enable. (#9) --- composer.json | 7 ++++--- src/Kernel.php | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 428af263d..af53298a0 100644 --- a/composer.json +++ b/composer.json @@ -13,12 +13,13 @@ "prefer-stable": true, "require": { "pimcore/pimcore": "*", - "pimcore/platform-version": "^2024.3", + "pimcore/platform-version": "^2024.3", "pimcore/admin-ui-classic-bundle": "*", "symfony/dotenv": "^6.4.12", "symfony/runtime": "^6.4.12", "torqit/pimcore-folder-creator-bundle": "^3.0", - "torqit/pimcore-role-creator-bundle": "^3.1" + "torqit/pimcore-role-creator-bundle": "^3.1", + "coreshop/messenger-bundle": "^4.0" }, "require-dev": { "codeception/codeception": "^5.0.3", @@ -53,4 +54,4 @@ "Pimcore\\Composer::installAssets" ] } -} +} \ No newline at end of file diff --git a/src/Kernel.php b/src/Kernel.php index 632a444a4..32f5e0895 100644 --- a/src/Kernel.php +++ b/src/Kernel.php @@ -30,6 +30,7 @@ use Pimcore\Kernel as PimcoreKernel; use TorqIT\FolderCreatorBundle\FolderCreatorBundle; use TorqIT\RoleCreatorBundle\RoleCreatorBundle; +use CoreShop\Bundle\MessengerBundle\CoreShopMessengerBundle; class Kernel extends PimcoreKernel { @@ -55,5 +56,6 @@ public function registerBundlesToCollection(BundleCollection $collection): void // Custom bundles $collection->addBundle(new FolderCreatorBundle()); $collection->addBundle(new RoleCreatorBundle()); + $collection->addBundle(new CoreShopMessengerBundle()); } } From 7fc9a1b998ae5c8d260b44b4bc3452af1b2f99ad Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Thu, 28 Nov 2024 10:23:46 -0500 Subject: [PATCH 071/131] Kernel secret-izing and updating README.md (#11) * Kernel secret-izing and updating README.md * Delete composer.lock * Fix tabbing * Fixing sub points --- .docker/Dockerfile | 5 +++-- .dockerignore | 1 + .gitignore | 6 +++++- .secrets/.gitkeep | 0 README.md | 18 +++++++++++++----- config/services.yaml | 3 ++- docker-compose.yaml | 20 ++++++++++++++++++++ 7 files changed, 44 insertions(+), 9 deletions(-) create mode 100644 .secrets/.gitkeep diff --git a/.docker/Dockerfile b/.docker/Dockerfile index bc6fd1375..0223578ae 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -12,8 +12,9 @@ COPY --chown=www-data:www-data /composer.* /var/www/html COPY /.docker/composer-install-dependencies.sh /composer-install-dependencies.sh RUN /composer-install-dependencies.sh COPY --chown=www-data:www-data / /var/www/html -RUN set -eux; \ - cd /var/www/html; \ +RUN --mount=type=secret,id=kernel-secret,uid=1000 \ + set -eux; \ + cd /var/www/html; \ runuser -u www-data -- php /usr/local/bin/composer install; \ runuser -u www-data -- /var/www/html/bin/console pimcore:build:classes; \ runuser -u www-data -- /var/www/html/bin/console cache:warmup diff --git a/.dockerignore b/.dockerignore index d2f838ed0..457590c59 100644 --- a/.dockerignore +++ b/.dockerignore @@ -20,3 +20,4 @@ README.md SECURITY.md supervisord.log supervisord.pid +.secrets diff --git a/.gitignore b/.gitignore index b846d03b9..5f3e69a23 100644 --- a/.gitignore +++ b/.gitignore @@ -52,4 +52,8 @@ nbproject supervisord.pid supervisord.log -.htaccess \ No newline at end of file +.htaccess + +# .secrets +/.secrets/* +!/.secrets/.gitkeep diff --git a/.secrets/.gitkeep b/.secrets/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/README.md b/README.md index 0619c98cd..a37ab3ae4 100644 --- a/README.md +++ b/README.md @@ -10,10 +10,18 @@ Forked from https://github.com/pimcore/skeleton. ### Setup instructions 1. Clone the repository -2. Update the `name` property in `composer.json` to match your project's name -3. Update the `.env` property `APP_NAME` to match your project's name -4. Run `docker compose up -d` to build the Docker images and run the containers -5. By default, go to `localhost:8400` in your browser to access the Pimcore admin (port is controlled by the `WEB_EXTERNAL_PORT` environment variable). Use username `admin` and password `pimcore` to log in. +2. Update the `origin` remote to point to your client-specific repository: `git remote origin set-url origin ` +3. Update the name of your main branch, e.g. `git branch -m main` +4. Update the `name` property in `composer.json` to match your project's name +5. Update the `.env` property `APP_NAME` to match your project's name +6. Update the `.env.` properties ending in `_EXTERNAL` with unused port values (i.e. those that don't conflict with other apps you may be running) +7. Under the `.secrets` directory: + 1. Create a file called `kernel-secret` and add a random 32-character string to it. + 2. Do NOT commit any of the files in this directory to your repository (they should already be gitignored). +8. Run `docker compose up -d` to build the Docker images and run the containers +9. By default, go to `localhost:8400` in your browser to access the Pimcore admin (port is controlled by the `WEB_EXTERNAL_PORT` environment variable). Use username `admin` and password `pimcore` to log in. ## Getting updates -We recommend forking this repository and using it as an upstream remote in order to get the latest updates and improvements. +We recommend forking this repository and using it as an upstream remote in order to get the latest updates and improvements. To do that, run the following commands: +1. If using SSH for Git, run `git remote add upstream git@github.com:TorqIT/shopware-skeleton.git`; otherwise, run `git remote add upstream https://github.com/TorqIT/shopware-skeleton.git` +2. To fetch and merge updates from the skeleton, run `git fetch upstream`, then `git merge upstream/2024.x`. diff --git a/config/services.yaml b/config/services.yaml index 5deefbc80..59f1102bf 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -1,5 +1,6 @@ parameters: - secret: DETzaWisgJOBN+SK87M1o8laf6d+8ZT3sA+Asjm+TNE= + env(KERNEL_SECRET_FILE): ./.secrets/kernel-secret + secret: '%env(file:KERNEL_SECRET_FILE)%' # These are default values for connecting to the database/Redis cache that the Docker build sometimes requires to be set. # Once the app is actually running, they will be replaced with actual values. diff --git a/docker-compose.yaml b/docker-compose.yaml index 1eb706d3f..43708bd56 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -34,11 +34,15 @@ services: build: dockerfile: ./.docker/Dockerfile target: init + secrets: + - kernel-secret depends_on: db: condition: service_healthy env_file: - .env + secrets: + - kernel-secret volumes: - .:/var/www/html - ./.docker/init/init.sh:/init.sh @@ -50,10 +54,14 @@ services: build: dockerfile: ./.docker/Dockerfile target: php + secrets: + - kernel-secret environment: COMPOSER_HOME: /var/www/html env_file: - .env + secrets: + - kernel-secret depends_on: init: condition: service_completed_successfully @@ -68,11 +76,15 @@ services: build: dockerfile: ./.docker/Dockerfile target: php-debug + secrets: + - kernel-secret environment: - XDEBUG_CONFIG=remote_enable=1 - PHP_IDE_CONFIG=serverName=localhost env_file: - .env + secrets: + - kernel-secret depends_on: init: condition: service_completed_successfully @@ -84,11 +96,15 @@ services: build: dockerfile: ./.docker/Dockerfile target: supervisord + secrets: + - kernel-secret depends_on: init: condition: service_completed_successfully env_file: - .env + secrets: + - kernel-secret volumes: - .:/var/www/html - ./.docker/supervisord/supervisord.conf:/etc/supervisor/conf.d/pimcore.conf:ro @@ -123,3 +139,7 @@ volumes: pimcore-test-database: pimcore-test-var: pimcore-test-public-var: + +secrets: + kernel-secret: + file: ./.secrets/kernel-secret From bf3cbacad60546fa29d08cdcb73e78ec9523f3d6 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Thu, 28 Nov 2024 14:52:01 -0500 Subject: [PATCH 072/131] Fixing file location of kernel-secret --- config/services.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/services.yaml b/config/services.yaml index 59f1102bf..2f6fd3d15 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -1,5 +1,5 @@ parameters: - env(KERNEL_SECRET_FILE): ./.secrets/kernel-secret + env(KERNEL_SECRET_FILE): '/run/secrets/kernel-secret' secret: '%env(file:KERNEL_SECRET_FILE)%' # These are default values for connecting to the database/Redis cache that the Docker build sometimes requires to be set. From dceb4762c47ef4d4e3b7758c5990628db6383aff Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Mon, 9 Dec 2024 12:10:31 -0500 Subject: [PATCH 073/131] Fix typo in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a37ab3ae4..57f5999e2 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Forked from https://github.com/pimcore/skeleton. ### Setup instructions 1. Clone the repository -2. Update the `origin` remote to point to your client-specific repository: `git remote origin set-url origin ` +2. Update the `origin` remote to point to your client-specific repository: `git remote set-url origin ` 3. Update the name of your main branch, e.g. `git branch -m main` 4. Update the `name` property in `composer.json` to match your project's name 5. Update the `.env` property `APP_NAME` to match your project's name From 74f41df490ada96eeabd5fe1c0895b23790d72ae Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Mon, 9 Dec 2024 13:25:33 -0500 Subject: [PATCH 074/131] Typo in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 57f5999e2..819f60531 100644 --- a/README.md +++ b/README.md @@ -23,5 +23,5 @@ Forked from https://github.com/pimcore/skeleton. ## Getting updates We recommend forking this repository and using it as an upstream remote in order to get the latest updates and improvements. To do that, run the following commands: -1. If using SSH for Git, run `git remote add upstream git@github.com:TorqIT/shopware-skeleton.git`; otherwise, run `git remote add upstream https://github.com/TorqIT/shopware-skeleton.git` +1. If using SSH for Git, run `git remote add upstream git@github.com:TorqIT/pimcore-skeleton.git`; otherwise, run `git remote add upstream https://github.com/TorqIT/pimcore-skeleton.git` 2. To fetch and merge updates from the skeleton, run `git fetch upstream`, then `git merge upstream/2024.x`. From c13dfdcc3f6bdb9d554967a17513090a9ae98b99 Mon Sep 17 00:00:00 2001 From: cameronfromtorq Date: Wed, 11 Dec 2024 09:39:34 -0400 Subject: [PATCH 075/131] consume search index messages --- .docker/supervisord/supervisord.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.docker/supervisord/supervisord.conf b/.docker/supervisord/supervisord.conf index 98ec15cdc..487f21646 100644 --- a/.docker/supervisord/supervisord.conf +++ b/.docker/supervisord/supervisord.conf @@ -6,7 +6,7 @@ user=root [program:messenger-consume] user=www-data -command=php /var/www/html/bin/console messenger:consume pimcore_core pimcore_maintenance pimcore_scheduled_tasks pimcore_image_optimize pimcore_asset_update --memory-limit=250M --time-limit=3600 +command=php /var/www/html/bin/console messenger:consume pimcore_search_backend_message pimcore_core pimcore_maintenance pimcore_scheduled_tasks pimcore_image_optimize pimcore_asset_update --memory-limit=250M --time-limit=3600 numprocs=1 startsecs=0 autostart=true From 77a3ef6757658c886191717acd826ebe58c85ef0 Mon Sep 17 00:00:00 2001 From: lukemacausland <58705994+lukemacausland@users.noreply.github.com> Date: Mon, 6 Jan 2025 12:31:44 -0400 Subject: [PATCH 076/131] Update composer.json --- composer.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index af53298a0..ffe31e80d 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,8 @@ "symfony/runtime": "^6.4.12", "torqit/pimcore-folder-creator-bundle": "^3.0", "torqit/pimcore-role-creator-bundle": "^3.1", - "coreshop/messenger-bundle": "^4.0" + "coreshop/messenger-bundle": "^4.0", + "torqit/pimcore-object-layout-grid-bundle": "^1.1" }, "require-dev": { "codeception/codeception": "^5.0.3", @@ -54,4 +55,4 @@ "Pimcore\\Composer::installAssets" ] } -} \ No newline at end of file +} From 833d812c99ab5ce459fc044ef8a861770764528c Mon Sep 17 00:00:00 2001 From: lukemacausland <58705994+lukemacausland@users.noreply.github.com> Date: Mon, 6 Jan 2025 12:33:11 -0400 Subject: [PATCH 077/131] Update Kernel.php --- src/Kernel.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Kernel.php b/src/Kernel.php index 32f5e0895..4a0aca397 100644 --- a/src/Kernel.php +++ b/src/Kernel.php @@ -31,6 +31,7 @@ use TorqIT\FolderCreatorBundle\FolderCreatorBundle; use TorqIT\RoleCreatorBundle\RoleCreatorBundle; use CoreShop\Bundle\MessengerBundle\CoreShopMessengerBundle; +use TorqIT\ObjectLayoutGridBundle\ObjectLayoutGridBundle; class Kernel extends PimcoreKernel { @@ -57,5 +58,6 @@ public function registerBundlesToCollection(BundleCollection $collection): void $collection->addBundle(new FolderCreatorBundle()); $collection->addBundle(new RoleCreatorBundle()); $collection->addBundle(new CoreShopMessengerBundle()); + $collection->addBundle(new ObjectLayoutGridBundle()); } } From 3b67e84ca6ac754749e306b8202983f07c3fa289 Mon Sep 17 00:00:00 2001 From: lukemacausland <58705994+lukemacausland@users.noreply.github.com> Date: Wed, 8 Jan 2025 16:11:29 -0400 Subject: [PATCH 078/131] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ffe31e80d..889a4e37f 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "torqit/pimcore-folder-creator-bundle": "^3.0", "torqit/pimcore-role-creator-bundle": "^3.1", "coreshop/messenger-bundle": "^4.0", - "torqit/pimcore-object-layout-grid-bundle": "^1.1" + "torqit/pimcore-object-layout-grid-bundle": "^1.2" }, "require-dev": { "codeception/codeception": "^5.0.3", From f4381d0b2ba2aba4563c606e1d87e59c13a864bc Mon Sep 17 00:00:00 2001 From: lukemacausland <58705994+lukemacausland@users.noreply.github.com> Date: Tue, 4 Feb 2025 18:55:16 -0400 Subject: [PATCH 079/131] Create quantityvalues.json --- config/quantityvalues.json | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 config/quantityvalues.json diff --git a/config/quantityvalues.json b/config/quantityvalues.json new file mode 100644 index 000000000..0d4f101c7 --- /dev/null +++ b/config/quantityvalues.json @@ -0,0 +1,2 @@ +[ +] From eecbda796de6709a2d7d7e5a4b8fc87340330433 Mon Sep 17 00:00:00 2001 From: lukemacausland <58705994+lukemacausland@users.noreply.github.com> Date: Tue, 4 Feb 2025 18:56:16 -0400 Subject: [PATCH 080/131] Add import command to init --- .docker/init/init.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.docker/init/init.sh b/.docker/init/init.sh index 4dbaf2989..e320cc7f7 100755 --- a/.docker/init/init.sh +++ b/.docker/init/init.sh @@ -34,3 +34,6 @@ runuser -u www-data -- /var/www/html/bin/console torq:folder-creator echo Generating roles... runuser -u www-data -- /var/www/html/bin/console torq:generate-roles + +echo Generating quantity values... +runuser -u www-data -- /var/www/html/bin/console definition:import:units config/quantityvalues.json --override From dba7fd273ba02c33014ece5b0a8b5e2d9cccb666 Mon Sep 17 00:00:00 2001 From: lukemacausland <58705994+lukemacausland@users.noreply.github.com> Date: Thu, 13 Feb 2025 15:53:23 -0400 Subject: [PATCH 081/131] Add composer package --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 889a4e37f..88ee67e7e 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,8 @@ "torqit/pimcore-folder-creator-bundle": "^3.0", "torqit/pimcore-role-creator-bundle": "^3.1", "coreshop/messenger-bundle": "^4.0", - "torqit/pimcore-object-layout-grid-bundle": "^1.2" + "torqit/pimcore-object-layout-grid-bundle": "^1.2", + "basilicom/pimcore-path-formatter-bundle": "^3.0" }, "require-dev": { "codeception/codeception": "^5.0.3", From b6c42bbe988c51a1af24126996565b2619f4a166 Mon Sep 17 00:00:00 2001 From: lukemacausland <58705994+lukemacausland@users.noreply.github.com> Date: Thu, 13 Feb 2025 15:54:35 -0400 Subject: [PATCH 082/131] Add bundle to Kernel.php --- src/Kernel.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Kernel.php b/src/Kernel.php index 4a0aca397..1291ab088 100644 --- a/src/Kernel.php +++ b/src/Kernel.php @@ -32,6 +32,7 @@ use TorqIT\RoleCreatorBundle\RoleCreatorBundle; use CoreShop\Bundle\MessengerBundle\CoreShopMessengerBundle; use TorqIT\ObjectLayoutGridBundle\ObjectLayoutGridBundle; +use Basilicom\PathFormatterBundle\BasilicomPathFormatterBundle; class Kernel extends PimcoreKernel { @@ -59,5 +60,6 @@ public function registerBundlesToCollection(BundleCollection $collection): void $collection->addBundle(new RoleCreatorBundle()); $collection->addBundle(new CoreShopMessengerBundle()); $collection->addBundle(new ObjectLayoutGridBundle()); + $collection->addBundle(new BasilicomPathFormatterBundle()); } } From 678ca716b2d218d189508770126f7e9924b2d149 Mon Sep 17 00:00:00 2001 From: Sean MacKay Date: Thu, 20 Feb 2025 16:06:30 -0400 Subject: [PATCH 083/131] Update extensions.json to suggest inelephense and editorconfig as installed extensions, and set intelephense as the default php formatter. Also remove default terminals --- .vscode/extensions.json | 4 +++- .vscode/settings.json | 21 ++++----------------- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 2e2726eda..f9896fad2 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -5,6 +5,8 @@ "xdebug.php-debug", "bmewburn.vscode-intelephense-client", "ethansk.restore-terminals", - "ms-azuretools.vscode-bicep" + "ms-azuretools.vscode-bicep", + "esbenp.prettier-vscode", + "editorconfig.editorconfig" ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 4ed38d897..e8b676aaa 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,19 +1,6 @@ { - "restoreTerminals.terminals": [ - { - "splitTerminals": [ - { - "name": "Spin up docker containers", - "commands": ["docker-compose up"] - }, - { - "name": "Start bash in Pimcore container", - "commands": [ - "sleep 10", // wait for container to start - "docker compose exec -it --user www-data php bash" - ] - } - ] - } - ] + "[php]": { + "editor.defaultFormatter": "bmewburn.vscode-intelephense-client" + }, + "intelephense.format.braces": "per" } From 6064a92d689aae0e542fd025b7d055ff119dfc6f Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Wed, 26 Feb 2025 09:16:06 -0500 Subject: [PATCH 084/131] Remove COMPOSER_HOME env var --- docker-compose.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 43708bd56..7c3dfe4fe 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -56,8 +56,6 @@ services: target: php secrets: - kernel-secret - environment: - COMPOSER_HOME: /var/www/html env_file: - .env secrets: From e96be164889b5edb6c37a756e61f92fc5935d556 Mon Sep 17 00:00:00 2001 From: lukemacausland <58705994+lukemacausland@users.noreply.github.com> Date: Thu, 6 Mar 2025 12:01:27 -0400 Subject: [PATCH 085/131] Sidebar Env Indicator (#10) * Add / setup event, add js to inject env indicator in sidebar * Change to use just app_env variable and to upper. * Remove ? * Update public/admin/js/sidebar-environment-indicator.js Co-authored-by: cameronfromtorq <105230931+cameronfromtorq@users.noreply.github.com> --------- Co-authored-by: cameronfromtorq <105230931+cameronfromtorq@users.noreply.github.com> --- config/services.yaml | 13 ++++++++ .../admin/js/sidebar-environment-indicator.js | 9 ++++++ .../AdminFileLoaderEventListener.php | 30 +++++++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 public/admin/js/sidebar-environment-indicator.js create mode 100644 src/EventListener/AdminFileLoaderEventListener.php diff --git a/config/services.yaml b/config/services.yaml index 2f6fd3d15..912634213 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -86,3 +86,16 @@ services: # App\EventListener\TestListener: # tags: # - { name: kernel.event_listener, event: pimcore.dataobject.preUpdate, method: onObjectPreUpdate } + + App\EventListener\AdminFileLoaderEventListener: + tags: + - { + name: kernel.event_listener, + event: pimcore.bundle_manager.paths.js, + method: addJSFiles, + } + - { + name: kernel.event_listener, + event: pimcore.bundle_manager.paths.css, + method: addCSSFiles, + } diff --git a/public/admin/js/sidebar-environment-indicator.js b/public/admin/js/sidebar-environment-indicator.js new file mode 100644 index 000000000..2a19e2e7d --- /dev/null +++ b/public/admin/js/sidebar-environment-indicator.js @@ -0,0 +1,9 @@ +document.addEventListener(pimcore.events.pimcoreReady, () => { + Ext.get("pimcore_navigation").insertHtml( + "beforeEnd", + '

' + + (pimcore?.settings?.environment || "").toUpperCase() + + "

" + ); + }); + \ No newline at end of file diff --git a/src/EventListener/AdminFileLoaderEventListener.php b/src/EventListener/AdminFileLoaderEventListener.php new file mode 100644 index 000000000..f2f7ef8d5 --- /dev/null +++ b/src/EventListener/AdminFileLoaderEventListener.php @@ -0,0 +1,30 @@ +setPaths( + array_merge( + $event->getPaths(), + [ + '/admin/js/sidebar-environment-indicator.js', + ] + ) + ); + } + + public function addCSSFiles(PathsEvent $event) + { + $event->setPaths( + array_merge( + $event->getPaths(), + [] + ) + ); + } +} From a90e7a09220a7b50c2dcaab690574a4d93441157 Mon Sep 17 00:00:00 2001 From: evanjamesjackson <5866481+evanjamesjackson@users.noreply.github.com> Date: Thu, 6 Mar 2025 16:01:42 +0000 Subject: [PATCH 086/131] Apply php-cs-fixer changes --- src/Kernel.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Kernel.php b/src/Kernel.php index 1291ab088..b841496f1 100644 --- a/src/Kernel.php +++ b/src/Kernel.php @@ -15,6 +15,8 @@ namespace App; +use Basilicom\PathFormatterBundle\BasilicomPathFormatterBundle; +use CoreShop\Bundle\MessengerBundle\CoreShopMessengerBundle; use Pimcore\Bundle\AdminBundle\PimcoreAdminBundle; use Pimcore\Bundle\ApplicationLoggerBundle\PimcoreApplicationLoggerBundle; use Pimcore\Bundle\CustomReportsBundle\PimcoreCustomReportsBundle; @@ -29,10 +31,8 @@ use Pimcore\HttpKernel\BundleCollection\BundleCollection; use Pimcore\Kernel as PimcoreKernel; use TorqIT\FolderCreatorBundle\FolderCreatorBundle; -use TorqIT\RoleCreatorBundle\RoleCreatorBundle; -use CoreShop\Bundle\MessengerBundle\CoreShopMessengerBundle; use TorqIT\ObjectLayoutGridBundle\ObjectLayoutGridBundle; -use Basilicom\PathFormatterBundle\BasilicomPathFormatterBundle; +use TorqIT\RoleCreatorBundle\RoleCreatorBundle; class Kernel extends PimcoreKernel { From 1f27d9a4e34fc9b01234409fecaf7148e41a7dfe Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Fri, 7 Mar 2025 17:36:45 -0500 Subject: [PATCH 087/131] Continous integration workflow (#20) * Delete unused workflows from upstream * CI workflow * Fix ref * Apply php-cs-fixer changes * Add missing permissions * Undo changes to Kernel * Apply php-cs-fixer changes * Concurrency group * v6 of workflow --------- Co-authored-by: evanjamesjackson <5866481+evanjamesjackson@users.noreply.github.com> --- .github/ISSUE_TEMPLATE/Bug-Report.yml | 37 --------- .github/ISSUE_TEMPLATE/Feature-Request.yml | 27 ------ .github/ISSUE_TEMPLATE/Improvement.yml | 27 ------ .github/ISSUE_TEMPLATE/config.yml | 8 -- .github/workflows/ci.yml | 17 ++++ .github/workflows/cla.yaml | 12 --- .github/workflows/php-cs-fixer.yaml | 35 -------- .github/workflows/pimcore-skeleton.yml | 95 ---------------------- .github/workflows/stale.yml | 10 --- 9 files changed, 17 insertions(+), 251 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/Bug-Report.yml delete mode 100644 .github/ISSUE_TEMPLATE/Feature-Request.yml delete mode 100644 .github/ISSUE_TEMPLATE/Improvement.yml delete mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/cla.yaml delete mode 100644 .github/workflows/php-cs-fixer.yaml delete mode 100644 .github/workflows/pimcore-skeleton.yml delete mode 100644 .github/workflows/stale.yml diff --git a/.github/ISSUE_TEMPLATE/Bug-Report.yml b/.github/ISSUE_TEMPLATE/Bug-Report.yml deleted file mode 100644 index d17f59abb..000000000 --- a/.github/ISSUE_TEMPLATE/Bug-Report.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Bug Report -description: File a bug report -title: "[Bug]: " -labels: [Bug] -body: - - type: markdown - attributes: - value: | - ## Important notice - As an open source project we love to work together with our community to improve and develop our products. - It's also important for us to make clear that **we're not working for you or your company**, - but we enjoy to work together to solve existing bugs. - So we would love to see PRs with bugfixes, discuss them and we are happy to merge them when they are ready. - For details see also our [contributing guidelines](https://github.com/pimcore/pimcore/blob/10.x/CONTRIBUTING.md). - - Bug reports that do not meet the conditions listed below will be closed/deleted without comment. - - - Bug was verified on the latest supported version. - - This is not a security issue -> see [our security policy](https://github.com/pimcore/pimcore/security/policy) instead. - - You are not able to provide a pull request that fixes the issue. - - There's no existing ticket for the same issue. - - - type: textarea - attributes: - label: Expected behavior - validations: - required: true - - type: textarea - attributes: - label: Actual behavior - validations: - required: true - - type: textarea - attributes: - label: Steps to reproduce - validations: - required: true diff --git a/.github/ISSUE_TEMPLATE/Feature-Request.yml b/.github/ISSUE_TEMPLATE/Feature-Request.yml deleted file mode 100644 index b224cda0c..000000000 --- a/.github/ISSUE_TEMPLATE/Feature-Request.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Feature Request -description: Request or propose a new feature -title: "[Feature]: " -labels: ["New Feature"] -body: - - type: markdown - attributes: - value: | - ## Important notice - As an open source project we love to work together with our community to improve and develop our products. - It's also important for us to make clear that **we're not working for you or your company**, - but we enjoy to work together to improve or add new features to the product. - So we are always ready to discuss features and improvements with our community. - Especially for bigger topics, please [start a discussion](https://github.com/pimcore/pimcore/discussions) first to aviod unnecessary efforts. - - As soon as a topic is more specific, feel free to create issues for it or even better provide a corresponding PR as we love to - review and merge contributions. - - Feature requests that do not meet the conditions listed below will be closed/deleted without comment. - - There's no existing ticket for the same topic - - This is already a specific ready-to-work-on feature request - - - type: textarea - attributes: - label: Feature description - validations: - required: true diff --git a/.github/ISSUE_TEMPLATE/Improvement.yml b/.github/ISSUE_TEMPLATE/Improvement.yml deleted file mode 100644 index fb77d8daf..000000000 --- a/.github/ISSUE_TEMPLATE/Improvement.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Improvement -description: Request or propose an improvement -title: "[Improvement]: " -labels: ["Improvement"] -body: - - type: markdown - attributes: - value: | - ## Important notice - As an open source project we love to work together with our community to improve and develop our products. - It's also important for us to make clear that **we're not working for you or your company**, - but we enjoy to work together to improve or add new features to the product. - So we are always ready to discuss features and improvements with our community. - Especially for bigger topics, please [start a discussion](https://github.com/pimcore/pimcore/discussions) first to aviod unnecessary efforts. - - As soon as a topic is more specific, feel free to create issues for it or even better provide a corresponding PR as we love to - review and merge contributions. - - Feature requests that do not meet the conditions listed below will be closed/deleted without comment. - - There's no existing ticket for the same topic - - This is already a specific ready-to-work-on feature request - - - type: textarea - attributes: - label: Improvement description - validations: - required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index 9af4f9ce0..000000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,8 +0,0 @@ -blank_issues_enabled: false -contact_links: - - name: We are hiring! - url: https://pimcore.com/en/careers?utm_source=github&utm_medium=issue-template-skeleton&utm_campaign=careers - about: Enjoy working with Pimcore? Join us on our mission! - - name: Community Support - url: https://github.com/pimcore/pimcore/discussions - about: Please ask and answer questions here. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..4f1cae588 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,17 @@ +name: Continuous integration + +on: + pull_request: + types: [opened, reopened, synchronize] + +concurrency: + group: ci__${{ github.sha }} + cancel-in-progress: true + +jobs: + build-images: + name: Build Docker images + uses: TorqIT/pimcore-github-actions-workflows/.github/workflows/ci-docker-builds.yml@v6 + permissions: + contents: read + actions: read \ No newline at end of file diff --git a/.github/workflows/cla.yaml b/.github/workflows/cla.yaml deleted file mode 100644 index 72f832234..000000000 --- a/.github/workflows/cla.yaml +++ /dev/null @@ -1,12 +0,0 @@ -name: CLA check -on: - issue_comment: - types: [created] - pull_request_target: - types: [opened, closed, synchronize] -jobs: - cla-workflow: - uses: pimcore/workflows-collection-public/.github/workflows/reusable-cla-check.yaml@v1.3.0 - if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target' - secrets: - CLA_ACTION_ACCESS_TOKEN: ${{ secrets.CLA_ACTION_ACCESS_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/php-cs-fixer.yaml b/.github/workflows/php-cs-fixer.yaml deleted file mode 100644 index 6d19d4f94..000000000 --- a/.github/workflows/php-cs-fixer.yaml +++ /dev/null @@ -1,35 +0,0 @@ -name: "PHP-CS-Fixer" - -on: - pull_request_target: - branches: - - "[0-9]+.[0-9]+" - - "[0-9]+.x" - - "feature-*" - push: - branches: - - "[0-9]+.[0-9]+" - - "[0-9]+.x" - - "*_actions" - - "feature-*" - -permissions: - contents: read - -jobs: - php-cs-fixer: - permissions: - contents: write # for stefanzweifel/git-auto-commit-action to push code in repo - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.ref }} - repository: ${{ github.event.pull_request.head.repo.full_name }} - - - name: PHP-CS-Fixer - uses: docker://oskarstark/php-cs-fixer-ga:latest - - - uses: stefanzweifel/git-auto-commit-action@v5 - with: - commit_message: Apply php-cs-fixer changes diff --git a/.github/workflows/pimcore-skeleton.yml b/.github/workflows/pimcore-skeleton.yml deleted file mode 100644 index 42347916f..000000000 --- a/.github/workflows/pimcore-skeleton.yml +++ /dev/null @@ -1,95 +0,0 @@ -name: Test Pimcore Skeleton - -on: - pull_request: - branches: - - "[0-9]+.[0-9]+" - - "[0-9]+.x" - push: - branches: - - "[0-9]+.[0-9]+" - - "[0-9]+.x" - - "*_actions" - -jobs: - test-pimcore-skeleton: - runs-on: ubuntu-latest - steps: - # Check out the repo in a sub-dir to see if it can serve as - # teplate for `composer create-project` - # See: https://github.com/actions/checkout#usage - - uses: actions/checkout@v2 - with: - path: 'skeleton' - - - name: Pull latest pimcore image - run: | - # Echo commands and terminate on first error - set -ex - - # Pull latest build of pimcore's image - docker pull docker.io/pimcore/pimcore:php8.2-latest - - - name: Create project from skeleton in latest pimcore environment - run: | - # Echo commands and terminate on first error - set -ex - - # Try creating a new project with composer using contents of this repo as the package. - # We execute composer within docker container to suttisfy platform requirements. - # The value of ´"url":` must match checkout path in the first step. - # - # See: https://getcomposer.org/doc/03-cli.md#create-project - # See: https://getcomposer.org/doc/05-repositories.md#path - docker run \ - --volume=${{ github.workspace }}/:/test/ \ - --workdir=/test/ \ - --user=$(id -u):$(id -g) \ - docker.io/pimcore/pimcore:php8.2-latest \ - composer create-project \ - pimcore/skeleton:@dev \ - --repository='{"type": "path", "url": "./skeleton"}' \ - sample-project - - - name: Smoke-test compose file - run: | - # Echo commands and terminate on first error - set -ex - - # Check (lint) the compose file - docker compose version - cd sample-project/ - docker compose config -q - - - name: Test pimcore installation - run: | - # Echo commands and terminate on first error - set -ex - - 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 - - # Run pimcore installation. - docker compose exec -T \ - -e PIMCORE_INSTALL_ADMIN_USERNAME=pimcore \ - -e PIMCORE_INSTALL_ADMIN_PASSWORD=pimcore \ - -- \ - php vendor/bin/pimcore-install -n - - - name: Run codeception tests - run: | - # Echo commands and terminate on first error - set -ex - - 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/.github/workflows/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index 553c3b572..000000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,10 +0,0 @@ -name: Handle stale issues - -on: - workflow_dispatch: - schedule: - - cron: '37 7 * * *' - -jobs: - call-stale-workflow: - uses: pimcore/workflows-collection-public/.github/workflows/stale.yml@v1.1.0 From 9dde625198b3f8cb328d97ade411dd32ce070cc3 Mon Sep 17 00:00:00 2001 From: lukemacausland <58705994+lukemacausland@users.noreply.github.com> Date: Tue, 8 Apr 2025 16:40:06 -0300 Subject: [PATCH 088/131] Update supervisord.conf (#22) --- .docker/supervisord/supervisord.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.docker/supervisord/supervisord.conf b/.docker/supervisord/supervisord.conf index 487f21646..a19e2c0ad 100644 --- a/.docker/supervisord/supervisord.conf +++ b/.docker/supervisord/supervisord.conf @@ -18,7 +18,7 @@ redirect_stderr=true [program:maintenance] user=www-data -command=bash -c 'sleep 3600 && exec php /var/www/html/bin/console pimcore:maintenance' +command=bash -c 'php /var/www/html/bin/console pimcore:maintenance && sleep 3600' autostart=true autorestart=true stdout_logfile=/dev/fd/1 From 60d9d43944799054b81f4d752820bf6e90c0ba2b Mon Sep 17 00:00:00 2001 From: Sean MacKay Date: Wed, 16 Apr 2025 13:12:04 -0300 Subject: [PATCH 089/131] Update supervisord.conf to split up largest workers (#13) --- .docker/supervisord/supervisord.conf | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/.docker/supervisord/supervisord.conf b/.docker/supervisord/supervisord.conf index a19e2c0ad..0f5d234c2 100644 --- a/.docker/supervisord/supervisord.conf +++ b/.docker/supervisord/supervisord.conf @@ -4,9 +4,33 @@ logfile=/dev/null logfile_maxbytes=0 user=root -[program:messenger-consume] +[program:messenger-consume-search-backend] user=www-data -command=php /var/www/html/bin/console messenger:consume pimcore_search_backend_message pimcore_core pimcore_maintenance pimcore_scheduled_tasks pimcore_image_optimize pimcore_asset_update --memory-limit=250M --time-limit=3600 +command=php /var/www/html/bin/console messenger:consume pimcore_search_backend_message --memory-limit=250M --time-limit=3600 +numprocs=1 # Increase if queue is getting backed up +startsecs=0 +autostart=true +autorestart=true +process_name=%(program_name)s_%(process_num)02d +stdout_logfile=/dev/fd/1 +stdout_logfile_maxbytes=0 +redirect_stderr=true + +[program:messenger-consume-maintenance] +user=www-data +command=php /var/www/html/bin/console messenger:consume pimcore_maintenance --memory-limit=250M --time-limit=3600 +numprocs=1 +startsecs=0 +autostart=true +autorestart=true +process_name=%(program_name)s_%(process_num)02d +stdout_logfile=/dev/fd/1 +stdout_logfile_maxbytes=0 +redirect_stderr=true + +[program:messenger-consume-others] +user=www-data +command=php /var/www/html/bin/console messenger:consume pimcore_core pimcore_scheduled_tasks pimcore_image_optimize pimcore_asset_update --memory-limit=250M --time-limit=3600 numprocs=1 startsecs=0 autostart=true From 2928a8abec70b3812dc88acc3498e7a60416310a Mon Sep 17 00:00:00 2001 From: lukemacausland <58705994+lukemacausland@users.noreply.github.com> Date: Tue, 13 May 2025 14:00:32 -0300 Subject: [PATCH 090/131] Add default domain name config (#5) * Add default domain name config * Update .env --------- Co-authored-by: Sean MacKay --- .env | 1 + config/config.yaml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.env b/.env index 3b86cbcb1..b6049782a 100644 --- a/.env +++ b/.env @@ -50,6 +50,7 @@ MYSQL_PORT=${DATABASE_PORT} REDIS_HOST=redis REDIS_DB=12 REDIS_SESSION_DB=14 +DEFAULT_DOMAIN_NAME=http://localhost/ diff --git a/config/config.yaml b/config/config.yaml index 8975fda51..df3c4e68e 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -101,9 +101,10 @@ pimcore: #### SYMFONY OVERRIDES framework: + router: + default_uri: "%env(DEFAULT_DOMAIN_NAME)%" profiler: enabled: false - trusted_proxies: "127.0.0.1,REMOTE_ADDR" trusted_headers: [ From e61ebf57ab4f3a200fd028b8d72829b46c7aba68 Mon Sep 17 00:00:00 2001 From: lukemacausland <58705994+lukemacausland@users.noreply.github.com> Date: Tue, 17 Jun 2025 10:52:31 -0300 Subject: [PATCH 091/131] SQL In-File (#24) * Update database.yaml * Update docker-compose.yaml --- config/database.yaml | 4 +++- docker-compose.yaml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/config/database.yaml b/config/database.yaml index 7aee2e8da..7ef57f28a 100644 --- a/config/database.yaml +++ b/config/database.yaml @@ -10,4 +10,6 @@ doctrine: mapping_types: enum: string bit: boolean - server_version: "%env(DATABASE_SERVER_VERSION)%" \ No newline at end of file + server_version: "%env(DATABASE_SERVER_VERSION)%" + options: + 1001: true diff --git a/docker-compose.yaml b/docker-compose.yaml index 7c3dfe4fe..58315517d 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -8,7 +8,7 @@ services: container_name: ${APP_NAME}-db image: mariadb:10.11 working_dir: /application - command: [ mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_general_ci, --innodb-file-per-table=1 ] + command: [ mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_general_ci, --innodb-file-per-table=1, --local_infile=1 ] volumes: - pimcore-database:/var/lib/mysql environment: From e82a8578228991191c7b60c59566b25ed1a16ce1 Mon Sep 17 00:00:00 2001 From: Riley Jackson Date: Wed, 9 Jul 2025 16:09:44 -0300 Subject: [PATCH 092/131] Fix syntax error for test services --- docker-compose.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 58315517d..c99a6eb50 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -112,13 +112,15 @@ services: # See: https://docs.docker.com/compose/profiles/ test-db: profiles: [ 'test' ] - extends: db + extends: + service: db volumes: - pimcore-test-database:/var/lib/mysql test-php: profiles: [ 'test' ] - extends: php + extends: + service: php environment: APP_ENV: test PIMCORE_TEST_DB_DSN: ${PIMCORE_TEST_DB_DSN:-mysql://pimcore:pimcore@test-db/pimcore} From bd726eb524d1258f51626ed2a00fb1d95ca1b5a2 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Tue, 5 Aug 2025 13:36:06 -0400 Subject: [PATCH 093/131] Add marker to indicate Dockerfile syntax (for use with secrets) --- .docker/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.docker/Dockerfile b/.docker/Dockerfile index 0223578ae..11d356b29 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -1,3 +1,5 @@ +# syntax=docker/dockerfile:1 + FROM pimcore/pimcore:php8.3-v3 AS base RUN set -eux; \ apt-get update -y; \ From 49f6773cdb8f96977f8c54825e85eb63bd5df5ce Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Tue, 5 Aug 2025 14:43:54 -0400 Subject: [PATCH 094/131] Add cache-buster rewrite for protected assets option #2 --- .docker/php/nginx.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.docker/php/nginx.conf b/.docker/php/nginx.conf index 70969c71c..4c7598956 100644 --- a/.docker/php/nginx.conf +++ b/.docker/php/nginx.conf @@ -49,6 +49,8 @@ server { # # rewrite ^(/protected/.*) /index.php$is_args$args last; # + # rewrite ^(/cache-buster-(?:\d+)/protected(?:.*)) /index.php$is_args$args last; + # # location ~ ^/var/.*/protected(.*) { # return 403; # } From a555ebf344cc68333220b2a32063577ec43807e8 Mon Sep 17 00:00:00 2001 From: torqdev <67965755+torqdev@users.noreply.github.com> Date: Tue, 28 Oct 2025 13:50:17 -0300 Subject: [PATCH 095/131] Merge pull request #27 from TorqIT/bugfix/sidebar-panel-collapse Fix sidebar collapse bug --- public/admin/js/sidebar-environment-indicator.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/admin/js/sidebar-environment-indicator.js b/public/admin/js/sidebar-environment-indicator.js index 2a19e2e7d..e2b41af29 100644 --- a/public/admin/js/sidebar-environment-indicator.js +++ b/public/admin/js/sidebar-environment-indicator.js @@ -1,9 +1,9 @@ document.addEventListener(pimcore.events.pimcoreReady, () => { Ext.get("pimcore_navigation").insertHtml( "beforeEnd", - '

' + + '

' + (pimcore?.settings?.environment || "").toUpperCase() + - "

" + '' ); - }); +}); \ No newline at end of file From 473cbf4d0999e49c5a6f7ba8b43fe71e6cb699cb Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Tue, 28 Oct 2025 13:16:57 -0400 Subject: [PATCH 096/131] Upstream merge (#33) --- composer.json | 4 +++- src/EventSubscriber/BundleSetupSubscriber.php | 16 +++++++++++++++- src/Kernel.php | 7 ++++--- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index 88ee67e7e..b7c6ee724 100644 --- a/composer.json +++ b/composer.json @@ -13,10 +13,12 @@ "prefer-stable": true, "require": { "pimcore/pimcore": "*", - "pimcore/platform-version": "^2024.3", + "pimcore/platform-version": "^2024.4", "pimcore/admin-ui-classic-bundle": "*", + "pimcore/quill-bundle": "*", "symfony/dotenv": "^6.4.12", "symfony/runtime": "^6.4.12", + "symfony/amqp-messenger": "^6.2", "torqit/pimcore-folder-creator-bundle": "^3.0", "torqit/pimcore-role-creator-bundle": "^3.1", "coreshop/messenger-bundle": "^4.0", diff --git a/src/EventSubscriber/BundleSetupSubscriber.php b/src/EventSubscriber/BundleSetupSubscriber.php index 3b1791280..730442ad0 100644 --- a/src/EventSubscriber/BundleSetupSubscriber.php +++ b/src/EventSubscriber/BundleSetupSubscriber.php @@ -20,6 +20,7 @@ use Pimcore\Bundle\AdminBundle\PimcoreAdminBundle; use Pimcore\Bundle\InstallBundle\Event\BundleSetupEvent; use Pimcore\Bundle\InstallBundle\Event\InstallEvents; +use Pimcore\Bundle\QuillBundle\PimcoreQuillBundle; use Symfony\Component\EventDispatcher\EventSubscriberInterface; class BundleSetupSubscriber implements EventSubscriberInterface @@ -36,6 +37,19 @@ public static function getSubscribedEvents(): array public function bundleSetup(BundleSetupEvent $event): void { // add required PimcoreAdminBundle - $event->addRequiredBundle('PimcoreAdminBundle', PimcoreAdminBundle::class, true); + if (class_exists(PimcoreAdminBundle::class)) { + $event->addRequiredBundle( + 'PimcoreAdminBundle', + PimcoreAdminBundle::class, + true + ); + } + if (class_exists(PimcoreQuillBundle::class)) { + $event->addRequiredBundle( + 'PimcoreQuillBundle', + PimcoreQuillBundle::class, + true + ); + } } } diff --git a/src/Kernel.php b/src/Kernel.php index b841496f1..b83a47c13 100644 --- a/src/Kernel.php +++ b/src/Kernel.php @@ -28,6 +28,7 @@ use Pimcore\Bundle\UuidBundle\PimcoreUuidBundle; use Pimcore\Bundle\WordExportBundle\PimcoreWordExportBundle; use Pimcore\Bundle\XliffBundle\PimcoreXliffBundle; +use Pimcore\Bundle\QuillBundle\PimcoreQuillBundle; use Pimcore\HttpKernel\BundleCollection\BundleCollection; use Pimcore\Kernel as PimcoreKernel; use TorqIT\FolderCreatorBundle\FolderCreatorBundle; @@ -38,13 +39,13 @@ class Kernel extends PimcoreKernel { /** * Adds bundles to register to the bundle collection. The collection is able - * to handle priorities and environment specific bundles. - * + * to handle priorities and environment-specific bundles. */ public function registerBundlesToCollection(BundleCollection $collection): void { - $collection->addBundle(new PimcoreAdminBundle(), 60); // Official Pimcore bundles + $collection->addBundle(new PimcoreAdminBundle(), 60); + $collection->addBundle(new PimcoreQuillBundle()); $collection->addBundle(new PimcoreApplicationLoggerBundle()); $collection->addBundle(new PimcoreCustomReportsBundle()); $collection->addBundle(new PimcoreGlossaryBundle()); From 4daaced7948332956bf54d06c49db08a40ec819f Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Tue, 28 Oct 2025 13:22:43 -0400 Subject: [PATCH 097/131] Upstream merge 2025.x --- .php-cs-fixer.dist.php | 12 + LICENSE.md | 157 ++++ bin/console | 19 +- composer.enterprise.json | 4 +- composer.json | 14 +- config/packages/security.yaml | 2 - config/packages/test/config.yaml | 1 - config/routes.yaml | 2 +- docker-compose.yaml | 2 +- gpl-3.0.txt | 674 ------------------ public/index.php | 19 +- src/Controller/DefaultController.php | 10 + src/Controller/Web2printController.php | 11 +- src/EventSubscriber/BundleSetupSubscriber.php | 11 +- src/Kernel.php | 11 +- .../Unit/Controller/DefaultControllerTest.php | 10 +- var/config/needs-install.lock | 1 + 17 files changed, 226 insertions(+), 734 deletions(-) create mode 100644 LICENSE.md delete mode 100644 gpl-3.0.txt create mode 100644 var/config/needs-install.lock diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 2caa6df1a..d9ea8fd22 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -17,6 +17,18 @@ '@PSR2' => true, 'array_syntax' => ['syntax' => 'short'], + 'header_comment' => [ + 'comment_type' => 'PHPDoc', + 'header' => + 'This source file is available under the terms of the' . PHP_EOL . + 'Pimcore Open Core License (POCL)' . PHP_EOL . + 'Full copyright and license information is available in' . PHP_EOL . + 'LICENSE.md which is distributed with this source code.' . PHP_EOL . + PHP_EOL . + ' @copyright Copyright (c) Pimcore GmbH (https://www.pimcore.com)' . PHP_EOL . + ' @license Pimcore Open Core License (POCL)' + ], + // keep aligned = and => operators as they are: do not force aligning, but do not remove it 'binary_operator_spaces' => ['operators' => ['=' => null, '=>' => null]], diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 000000000..f19982903 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,157 @@ +# License +Copyright (C) Pimcore GmbH (https://www.pimcore.com) + +This software is available under the terms of the +following Pimcore Open Core License (POCL) + + +**PIMCORE OPEN CORE LICENSE AGREEMENT (POCL)** + +**Last Update: June 2025** + +This Open Core License Agreement ("**Agreement**" or “**POCL**”), effective as of the day of the first installation or use by Customer (the "**Effective Date**"), is by and between Pimcore GmbH, Söllheimer Straße 16, AT-5020 Salzburg, Republic of Austria (hereinafter "**Licensor**" or “**Pimcore**”) and the user of the Software, as defined herein, (hereinafter "**Licensee**" or "**Customer**"). Licensor and Licensee may be referred to herein collectively as the "**Parties**" or individually as a "**Party**." + +**WHEREAS** Licensor desires to license out certain Pimcore Software (“**Software**“). + +**WHEREAS** (a) Software for which the source code is publicly available but which is not licensed out as open source software is "**Open Core Software**" and + (b) Software for which the source code is not publicly available is "**Proprietary Software**", + both covered by this Agreement. + +**WHEREAS** the exact products that are available under this Agreement are defined in the additional contractual documents or by inclusion of, or referral to, this Agreement within the source code or within the source code repositories; if not provided for otherwise, a software element is Proprietary Software. + +**WHEREAS** the Software is protected by copyright world- wide; and + +**WHEREAS** Licensee desires to obtain a license to use the Software for its internal business purposes, subject to the terms and conditions of this Agreement. + +**NOW, THEREFORE**, in consideration of the mutual covenants, terms, and conditions set forth herein, and for other good and valuable consideration, the receipt and sufficiency of which are hereby acknowledged, the Parties agree as follows. + +### 1. LICENSE +1.1 PLEASE READ THIS PIMCORE SOFTWARE LICENSE AGREEMENT CAREFULLY AS IT CONSTITUTES A LEGALLY BINDING AGREEMENT. BY INSTALLING OR USING THE SOFTWARE, YOU ACCEPT AND AGREE TO ALL TERMS AND CONDITIONS OF THIS AGREEMENT, AND CONFIRM THAT YOUR STATEMENT – IF APPLICABLE – ON THE RELEVANT GLOBAL REVENUE IS CORRECT AND COMPLETE. IF YOU REPRESENT A LEGAL ENTITY, YOU REPRESENT AND WARRANT THAT YOU HAVE FULL LEGAL AUTHORITY TO ENTER INTO THIS AGREEMENT TO BIND THAT LEGAL ENTITY. IF YOU DO NOT AGREE TO THESE TERMS AND CONDITIONS, YOU MAY NOT INSTALL OR USE THE SOFTWARE. + +1.2 Pimcore grants the Customer a non-exclusive, non-transferable, non-sublicensable, geographically unlimited right, limited in time to the term of the Agreement, to use the Software and to customize, modify or adapt it for its own purposes. Unless if required by Pimcore for compliance with applicable laws or any order of a governmental authority, the Customer is not obliged to share these modifications, adaptations, and customizations (“**Derivatives**”) with Pimcore or anyone else. + +1.2.1 Solution Development and Production Use (Open Core Software) + +“**Production Use**” means the usage of a software for development of solutions and productions within a business operation. + +a) An organization with total global revenue not exceeding €5 million (€5M) or equivalent amount in other currency annually (“**Threshold**”) may qualify for a free license for Production Use of the Open Core Software, provided such organization is not a part, subsidiary, affiliate, or shell company to another organization, entity, or company group whose total combined revenue exceeds the Threshold. Eligibility must be self-certified by the Customer when starting the use of the Open Core Software and is subject to periodic review and audit by Pimcore. If at any time the Customer’s revenue exceeds the Threshold, a paid commercial license will be required for continued Production Use of the software. The Customer is obliged to inform Pimcore about relevant changes in revenues. Pimcore is entitled to charge license fees retroactively from the date on which Customer exceeded the Threshold. + +b) Non-profit and educational organizations are eligible for a free license for Production Use of the Open Core Software, subject to Pimcore’s non-profit criteria. For this purpose, “non-profit” refers to entities that are legally recognized as non-profit or tax-exempt under applicable law and operate exclusively for charitable, educational, or scientific purposes without profit distribution. Government bodies, municipalities, political parties, and public institutions are excluded unless explicitly approved by Pimcore. + +Pimcore shall decide at its own reasonable discretion whether (a) the Threshold is exceeded or (b) the requirements for non-profit or educational usage are met. Legal recourse is excluded with regard to such decision of Pimcore. + +1.2.2 Non-Production Use and Transition to Production Use (Open Core Software) + +For non-production purposes—such as demonstrations, prototype design, proofs of concept, and sales presentations (collectively referred to as “**Non-Production Use**”)—the use of POCL-based software is free of charge. However, to showcase or demonstrate the features of the Enterprise Edition of Pimcore for any Non-Production Use, a Pimcore Developer License Agreement (PDLA) must be purchased. + +If the Customer or a Partner or any other third person acting on the Customer’s behalf initiates development of a solution with the intention or foreseeable or actual effect of deploying it into production, such use from its beginning shall be deemed Production Use of the Open Core Software for which the Threshold applies from the outset. Individual transition periods to Production Use may be agreed between Pimcore and Customer in writing. + +Pimcore reserves the right to audit, verify and enforce compliance with these terms, including restricting or terminating access to the Open Core Software. + +1.2.3 The use of Proprietary Software is never free of charge. Sect. 1.2.1 and 1.2.2 do not apply to Proprietary Software. + +1.3 Restrictions on Use + +1.3.1 The Customer may not offer the Software as a hosted or managed service by granting third parties access to a significant part of its features or functions. Additionally, the Customer may not fork, modify, or redistribute the Software, or any Derivative, in a manner that results in a competing or functionally comparable product that is offered as a free or commercial alternative to Pimcore’s official offerings. + +1.3.2 The Customer shall also refrain from incorporating the Software, or any Derivative, into a commercial product or service offering materially deriving its economic value from the Software, even if it is not directly exposed or obvious. + +1.3.3 The Customer is also prohibited from representing, implying, or otherwise suggesting that its use, distribution, or customization of the Software is endorsed, certified, or supported by Pimcore, unless such authorization has been explicitly granted in writing. + +1.3.4 The Customer may only use the Software for its own enterprise. The Customer may not use the Software simultaneously in more instances than Customer has acquired usage licences for. The Customer is only permitted to copy the Software to the extent that this is necessary for the intended use, including the correction of errors. The creation of a backup copy is permitted if it is necessary to secure the contractual use. + +1.3.5 The Customer must not, at any time, (i) rent, lease, lend, sell, license, assign, distribute, publish, transfer, or otherwise make available the Software; (ii) reverse engineer, disassemble, decompile, decode, adapt, or otherwise attempt to derive or gain access to source code of the Proprietary Software, in whole or in part; (iii) use the Software in any manner or for any purpose that infringes, misappropriate, or otherwise wireless any intellectual property ride or other ride of any person, or that violates any applicable law. + +1.4 If the Customer violates any of the provisions Sect. 1.2 and 1.3, all rights of usage granted under the POCL shall immediately become invalid and shall automatically revert to Pimcore. In this case, the Customer must immediately and completely cease using the Software, delete all copies of the Software installed on its systems and delete any backup copies made or hand them over to Pimcore. In addition, Pimcore reserves the right to take all legal steps. + +1.5 Sect. 1.4 applies accordingly if a Derivative of the Customer infringe upon patents. + +1.6 The parties may agree on expanded usage rights, arrangements for enterprise customers, and special OEM provisions separately. + +1.7 Upon request, the Customer shall enable Pimcore to verify the proper use of the Software, in particular whether the Customer is using the Software as agreed. For this purpose, the Customer shall provide Pimcore with information, grant access to relevant documents and records and enable an audit of the hardware and software environment by Pimcore or an auditing company named by Pimcore and acceptable to the Customer. Pimcore may carry out the audit on the Customer's premises during the Customer's regular business hours or have it carried out by third parties bound to secrecy. Pimcore shall ensure that the Customer's business operations are disturbed as little as possible by the on-site audit. If the inspection reveals a licence violation by the Customer that is not merely minimal, the Customer shall bear the costs of the inspection, otherwise Pimcore shall bear them. Pimcore reserves all other rights. + +1.8 Licensee acknowledges that, as between Licensee and Licensor, Licensor owns all right, title, and interest, including all intellectual property rights, in and to the Software and, with respect to third-party products, the applicable third-party licensors own all right, title and interest, including all intellectual property rights, in and to the third-party products. + +1.9 Licensor reserves all rights not expressly granted to Licensee in this Agreement. Except for the limited rights and licenses expressly granted under this Agreement, nothing in this Agreement grants, by implication, waiver, estoppel, or otherwise, to Licensee or any third party any intellectual property rights or other right, title, or interest in or to the Software. + +### 2. CONTRIBUTIONS OF DERIVATIVES +2.1 If the Customer wishes to contribute to the Software or to distribute a Derivative, both must be made in accordance with the Pimcore Contributors License Agreement (“PCLA”), available at . The PCLA stipulates the terms under which intellectual contributions are managed, ensuring that all parties' rights are protected. Acceptance of the PCLA is mandatory for all contributors and can be reviewed on the source-code repository. Contributions without adherence to the PCLA will not be accepted. + +2.2 Any contribution to the Software by a Derivative must be clearly documented, in order to maintain transparency and integrity of the source code. + +2.3. Any Derivative distributed must prominently be specified as “Derivative”, comply with the terms of the POCL, include copyright notices, and be licensed as a whole under the terms of the POCL, with the proviso that the recipient (licensee) of the out-licensed Derivative gets the role of the “Customer” regarding rights and obligations. Upon distribution of any Derivative, recipient must be provided with a copy of this POCL. + +### 3. COLLATERAL OBLIGATIONS OF THE CUSTOMER + +3.1 The Customer shall not manipulate, in particular modify, move, remove, suppress, switch off or circumvent licence keys and technical protection mechanisms in the Software, e. g. directly, or through the use of intermediaries, white-labelling, or segmentation of services designed to avoid licensing obligations. + +3.2 The Customer shall not alter or obfuscate any of the Pimcore's licensing, copyright, or other proprietary notices within the Software. Any use of Pimcore’s trademarks must comply with applicable laws. + +3.3 The Customer shall not modify, relocate, disable, or bypass any functionalities associated with the Pimcore Store. + +3.4 The Customer shall not (a) use GPLv3-licensed Pimcore software alongside POCL licensed Software, and shall not (b) revert from POCL to GPLv3, to protect the Customer’s rights in Derivatives. + +3.5 The Customer must ensure that the access data to the user accounts is not passed on to unauthorised third parties and is protected against unauthorised access by third parties. The authorised users shall be instructed accordingly. The Customer shall inform Pimcore immediately if there is a suspicion of misuse of the Software. + +3.6 If Customer infringes upon one of the provisions set up by Sect. 3.1 through 3.5, Sect. 1.4 sentence 1 applies accordingly. + +### 4. CONFIDENTIALITY + +From time to time during the Term, either Party may disclose or make available to the other Party information about its business affairs, products, confidential intellectual property, trade secrets, third-party confidential information, and other sensitive or proprietary information, whether orally or in written, electronic, or other form or media, and whether or not marked, designated or otherwise identified as "confidential" (collectively, "**Confidential Information**"). Confidential Information does not include information that, at the time of disclosure is: (a) in the public domain; (b) known to the receiving Party at the time of disclosure; (c) rightfully obtained by the receiving Party on a non-confidential basis from a third party; or (d) independently developed by the receiving Party. The receiving Party shall not disclose the disclosing Party's Confidential Information to any person or entity, except to the receiving Party's employees who have a need to know the Confidential Information for the receiving Party to exercise its rights or perform its obligations hereunder. Notwithstanding the foregoing, each Party may disclose Confidential Information to the limited extent required (i) in order to comply with the order of a court or other governmental body, or as otherwise necessary to comply with applicable law, provided that the Party making the disclosure pursuant to the order shall first have given written notice to the other Party and made a reasonable effort to obtain a protective order; or (ii) to establish a Party's rights under this Agreement, including to make required court filings. On the expiration or termination of this Agreement, the receiving Party shall promptly return to the disclosing Party all copies, whether in written, electronic, or other form or media, of the disclosing Party's Confidential Information, or destroy all such copies and certify in writing to the disclosing Party that such Confidential Information has been destroyed. Each Party's obligations of non­disclosure with regard to Confidential Information are effective as of the Effective Date and will expire five years from the date first disclosed to the receiving Party; provided, however, with respect to any Confidential Information that constitutes a trade secret (as determined under applicable law), such obligations of non-disclosure will survive the termination or expiration of this Agreement for as long as such Confidential Information remains subject to trade secret protection under applicable law. + +### 5. LIMITED WARRANTY AND WARRANTY DISCLAIMER + +Pimcore warrants that, at the time of delivery, the Software does not contain any virus or other malicious code that would cause the Software to become inoperable or incapable of being used in accordance with its documentation. The warranties set forth herein do not apply and become null and void if Licensee breaches any material provision of this Agreement or any instrument related hereto, or if Licensee, or any person provided access to the Software by Licensee whether or not in violation of this Agreement: (i) installs or uses the Software on or in connection with any hardware or software not specified in the documentation or expressly authorized by Licensor in writing; (ii) illicitly modifies or damages the Software; or (iii) misuses the Software, including any use of the Software other than as specified in the documentation or expressly authorized by Licensor in writing. If any Software fails to comply with the warranty set forth hereinbefore, and such failure is not excluded from warranty pursuant to this provision, Licensor shall, subject to Licensee's promptly notifying Licensor in writing of such failure, at its sole option, either: (i) repair or replace the Software, provided that Licensee provides Licensor with all information Licensor reasonably requests to resolve the reported failure, including sufficient information to enable the Licensor to recreate such failure; or (ii) refund the fees paid for such Software, subject to Licensee's ceasing all use of and, if requested by Licensor, returning to Licensor all copies of the Software. If Licensor repairs or replaces the Software, the warranty will continue to run from the Effective Date and not from Licensee's receipt of the repair or replacement. The remedies set forth in this Section 5 are Licensee's sole remedies and Licensor's sole liability under the limited warranty set forth in this Section 5. + +EXCEPT FOR THE LIMITED WARRANTY SET FORTH IN THIS SECTION 5, THE SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" AND LICENSOR HEREBY DISCLAIMS ALL WARRANTIES, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE. LICENSOR SPECIFICALLY DISCLAIMS ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, AND ALL WARRANTIES ARISING FROM COURSE OF DEALING, USAGE, OR TRADE PRACTICE. LICENSOR MAKES NO WARRANTY OF ANY KIND THAT THE SOFTWARE AND DOCUMENTATION, OR ANY PRODUCTS OR RESULTS OF THE USE THEREOF, WILL MEET LICENSEE'S OR ANY OTHER PERSON'S REQUIREMENTS, OPERATE WITHOUT INTERRUPTION, ACHIEVE ANY INTENDED RESULT, BE COMPATIBLE OR WORK WITH ANY SOFTWARE, SYSTEM OR OTHER SERVICES, OR BE SECURE, ACCURATE, COMPLETE, FREE OF HARMFUL CODE, OR ERROR FREE. + +### 6. DEFECTS + +6.1 The Customer is obliged to notify Pimcore of any defect or error in the Software immediately after its occurrence. + +6.2 Before reporting any defect or error, the Customer must carry out an analysis of the system environment as far as possible to ensure that the defect or error is not due to system components that are not covered by this Agreement. + +6.3 The Customer shall immediately install or carry out updates or other troubleshooting measures provided by Pimcore. + +6.4 Violations of the obligations to co-operate may result in additional costs for Pimcore. The Customer must reimburse Pimcore for such costs, unless it is not responsible for them. + +### 7. LIMITATION OF LIABILITY + +IN NO EVENT WILL LICENSOR BE LIABLE UNDER OR IN CONNECTION WITH THIS AGREEMENT UNDER ANY LEGAL OR EQUITABLE THEORY, INCLUDING BREACH OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY, AND OTHERWISE, FOR ANY: (a) CONSEQUENTIAL, INCIDENTAL, INDIRECT, EXEMPLARY, SPECIAL, ENHANCED, OR PUNITIVE DAMAGES; (b) INCREASED COSTS, DIMINUTION IN VALUE OR LOST BUSINESS, PRODUCTION, REVENUES, OR PROFITS; (c) LOSS OF GOODWILL OR REPUTATION; (d) USE, INABILITY TO USE, LOSS, INTERRUPTION, DELAY OR RECOVERY OF ANY DATA, OR BREACH OF DATA OR SYSTEM SECURITY; OR (e) COST OF REPLACEMENT GOODS OR SERVICES, IN EACH CASE REGARDLESS OF WHETHER LICENSOR WAS ADVISED OF THE POSSIBILITY OF SUCH LOSSES OR DAMAGES OR SUCH LOSSES OR DAMAGES WERE OTHERWISE FORESEEABLE. + +IN NO EVENT WILL LICENSOR'S AGGREGATE LIABILITY ARISING OUT OF OR RELATED TO THIS AGREEMENT UNDER ANY LEGAL OR EQUITABLE THEORY, INCLUDING BREACH OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY, AND OTHERWISE EXCEED THE TOTAL AMOUNTS PAID TO LICENSOR UNDER THIS AGREEMENT IN THE TWELVE (12) MONTH PERIOD PRECEDING THE EVENT GIVING RISE TO THE CLAIM. + +### 8. INDEMNIFICATION + +The Customer shall indemnify Pimcore and its affiliates, officers, directors, employees, agents, and assigns, from and against all claims, losses, damages, liabilities, costs, and expenses (including reasonable attorney’s fees and costs) against Pimcore arising out of or relating to the Customer’s use of the Software or Derivatives. + +### 9. TERMINATION + +Term and termination will be regulated separately. If Customer uses the Software in violation of this Agreement or otherwise violates the use rights or prohibitions contained in this Agreement, Customer’s License shall automatically terminate. Upon termination of this Agreement, the Customer shall uninstall the Software, including all copies, and delete any remaining Software residues from its IT system. The Customer must destroy any backup copies made. At Pimcore's request, the Customer must confirm that it has fulfilled these obligations. + +### 10. REMUNERATION + +The remuneration for the use of the software shall be agreed separately. + +### 11. MISCELLANEOUS + +11.1 The Software may automatically collect and transmit non-personal statistical data related to its installation and use, including but not limited to the number of records in the database, installed modules, system configuration, and usage metrics ("Usage Data"). Such data is collected solely for the purposes of product improvement, support, and analytics. Licensee agrees not to interfere with the collection and transmission of Usage Data. + +11.2 Licensee may not assign or transfer any of its rights or delegate any of its obligations hereunder, in each case whether voluntarily, involuntarily, by operation of law or otherwise, without the prior written consent of Licensor. Any purported assignment, transfer, or delegation in violation of this Section is null and void. No assignment, transfer, or delegation will relieve the assigning or delegating Party of any of its obligations hereunder. This Agreement is binding upon and inures to the benefit of the Parties hereto and their respective permitted successors and assigns. + +11.3 Each Party acknowledges and agrees that a breach or threatened breach by such Party of any of its contractual obligations may cause the other Party irreparable harm for which monetary damages would not be an adequate remedy and agrees that, in the event of such breach or threatened breach, the other Party will be entitled to equitable relief, including a restraining order, an injunction, specific performance, and any other relief that may be available from any court, without any requirement to post a bond or other security, or to prove actual damages or that monetary damages are not an adequate remedy. Such remedies are not exclusive and are in addition to all other remedies that may be available at law, in equity, or otherwise. + +11.4 No amendment to or modification of this Agreement is effective unless it is in writing and signed by an authorized representative of each Party. No waiver by any Party of any of the provisions hereof will be effective unless explicitly set forth in writing and signed by the Party so waiving. Except as otherwise set forth in this Agreement, (i) no failure to exercise, or delay in exercising, any rights, remedy, power, or privilege arising from this Agreement will operate or be construed as a waiver thereof, and (ii) no single or partial exercise of any right, remedy, power, or privilege hereunder will preclude any other or further exercise thereof or the exercise of any other right, remedy, power, or privilege. + +11.5 If any provision of this Agreement is invalid, illegal, or unenforceable in any jurisdiction, such invalidity, illegality, or unenforceability will not affect any other term or provision of this Agreement or invalidate or render unenforceable such term or provision in any other jurisdiction. Upon such determination that any term or other provision is invalid, illegal, or unenforceable, the Parties hereto shall negotiate in good faith to modify this Agreement so as to effect the original intent of the Parties as closely as possible in a mutually acceptable manner in order that the transactions contemplated hereby be consummated as originally contemplated to the greatest extent possible. + +11.6 In all relevant respects that are not regulated by this Agreement, the following documents shall apply, as far as applicable: + +- Pimcore Terms & Conditions, available at [] +- Pimcore Privacy Statement (PPS) +- Pimcore Data Processing Agreement (PDPA) +- Pimcore PaaS Terms & Conditions + +11.7 Specifications originating from the Customer regarding the service content and legal elements, such as GTC or contractual clauses, do not apply. + +11.8 Support, maintenance, and other services remain subject to separate agreements. diff --git a/bin/console b/bin/console index d8e59acee..ae0cb1d3f 100755 --- a/bin/console +++ b/bin/console @@ -1,17 +1,14 @@ #!/usr/bin/env php - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/public/index.php b/public/index.php index c296606f5..48566d6fd 100644 --- a/public/index.php +++ b/public/index.php @@ -1,16 +1,13 @@ twig->method('render')->will( - $this->returnValueMap([ - // Simulate rendering of default template. - ['default/default.html.twig', [], 'At pimcore we love writing tests! ❤️TDD!'], - ]) + $this->twig->method('render')->willReturnMap( + // Simulate rendering of default template. + [ + ['default/default.html.twig', [], 'At pimcore we love writing tests! ❤️TDD!'] + ], ); $response = $this->controller->defaultAction($this->createMock(Request::class)); diff --git a/var/config/needs-install.lock b/var/config/needs-install.lock new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/var/config/needs-install.lock @@ -0,0 +1 @@ + From 98020d858c3886c33e8dd49f455bc25318603358 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Tue, 28 Oct 2025 15:18:12 -0400 Subject: [PATCH 098/131] Pull from 8.4-v4 base images --- .docker/Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.docker/Dockerfile b/.docker/Dockerfile index 11d356b29..bd41ecf28 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 -FROM pimcore/pimcore:php8.3-v3 AS base +FROM pimcore/pimcore:php8.4-v4 AS base RUN set -eux; \ apt-get update -y; \ apt-get install -y --no-install-recommends autoconf make g++ unixodbc-dev cron procps iputils-ping vim supervisor netcat-traditional default-mysql-client; \ @@ -37,14 +37,14 @@ COPY /.docker/php/supervisord.conf /etc/supervisor/supervisord.conf CMD [ "/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf" ] FROM base AS supervisord -COPY --from=pimcore/pimcore:php8.3-supervisord-v3 /var/run /var/run -COPY --from=pimcore/pimcore:php8.3-supervisord-v3 /usr/sbin/cron /usr/sbin/cron -COPY --from=pimcore/pimcore:php8.3-supervisord-v3 /etc/supervisor/supervisord.conf /etc/supervisor/supervisord.conf +COPY --from=pimcore/pimcore:php8.4-supervisord-v4 /var/run /var/run +COPY --from=pimcore/pimcore:php8.4-supervisord-v4 /usr/sbin/cron /usr/sbin/cron +COPY --from=pimcore/pimcore:php8.4-supervisord-v4 /etc/supervisor/supervisord.conf /etc/supervisor/supervisord.conf COPY /.docker/supervisord/supervisord.conf /etc/supervisor/conf.d/pimcore.conf CMD [ "/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/pimcore.conf" ] FROM base AS php-debug -COPY --from=pimcore/pimcore:php8.3-debug-v3 /usr/local/bin/entrypoint.sh /usr/local/bin/entrypoint.sh +COPY --from=pimcore/pimcore:php8.4-debug-v4 /usr/local/bin/entrypoint.sh /usr/local/bin/entrypoint.sh RUN pecl install xdebug; \ docker-php-ext-enable xdebug; ENV PHP_IDE_CONFIG serverName=localhost From 1275cd995134b12bcf4a5fde74af91673ce51691 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Wed, 29 Oct 2025 14:58:47 -0400 Subject: [PATCH 099/131] Remove TinymceBundle --- .docker/init/init.sh | 1 - src/Kernel.php | 2 -- 2 files changed, 3 deletions(-) diff --git a/.docker/init/init.sh b/.docker/init/init.sh index e320cc7f7..3c0d327dc 100755 --- a/.docker/init/init.sh +++ b/.docker/init/init.sh @@ -18,7 +18,6 @@ runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreG runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreSeoBundle runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreSimpleBackendSearchBundle runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreStaticRoutesBundle -runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreTinymceBundle runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreUuidBundle runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreXliffBundle runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreWordExportBundle diff --git a/src/Kernel.php b/src/Kernel.php index f885d42c2..1c0639ce1 100644 --- a/src/Kernel.php +++ b/src/Kernel.php @@ -21,7 +21,6 @@ use Pimcore\Bundle\SeoBundle\PimcoreSeoBundle; use Pimcore\Bundle\SimpleBackendSearchBundle\PimcoreSimpleBackendSearchBundle; use Pimcore\Bundle\StaticRoutesBundle\PimcoreStaticRoutesBundle; -use Pimcore\Bundle\TinymceBundle\PimcoreTinymceBundle; use Pimcore\Bundle\UuidBundle\PimcoreUuidBundle; use Pimcore\Bundle\WordExportBundle\PimcoreWordExportBundle; use Pimcore\Bundle\XliffBundle\PimcoreXliffBundle; @@ -49,7 +48,6 @@ public function registerBundlesToCollection(BundleCollection $collection): void $collection->addBundle(new PimcoreSeoBundle()); $collection->addBundle(new PimcoreSimpleBackendSearchBundle()); $collection->addBundle(new PimcoreStaticRoutesBundle()); - $collection->addBundle(new PimcoreTinymceBundle()); $collection->addBundle(new PimcoreUuidBundle()); $collection->addBundle(new PimcoreXliffBundle()); $collection->addBundle(new PimcoreWordExportBundle()); From 2325ddf22f1ebc56e95d74ab7971813881d1bb75 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Wed, 29 Oct 2025 17:08:59 -0400 Subject: [PATCH 100/131] Update bundles to be compatible with Pimcore 12 --- composer.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 4d5fb1553..212f1d1b2 100644 --- a/composer.json +++ b/composer.json @@ -21,10 +21,10 @@ "symfony/dotenv": "^6.4.12 || ^7.2", "symfony/runtime": "^6.4.12 || ^7.3", "symfony/amqp-messenger": "^6.2 || ^7.2", - "torqit/pimcore-folder-creator-bundle": "^3.0", - "torqit/pimcore-role-creator-bundle": "^3.1", - "coreshop/messenger-bundle": "^4.0", - "torqit/pimcore-object-layout-grid-bundle": "^1.2", + "torqit/pimcore-folder-creator-bundle": ">=4.0.1 <5.0", + "torqit/pimcore-role-creator-bundle": "^5.0", + "coreshop/messenger-bundle": "^5.0", + "torqit/pimcore-object-layout-grid-bundle": ">=2.0.1 <3.0", "basilicom/pimcore-path-formatter-bundle": "^3.0" }, "require-dev": { From 7ec17a942f4daf3078f6887a344dff0e3bdaa88f Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Thu, 30 Oct 2025 11:39:43 -0400 Subject: [PATCH 101/131] Ignore local installation files --- .gitignore | 4 ++++ var/config/needs-install.lock | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) delete mode 100644 var/config/needs-install.lock diff --git a/.gitignore b/.gitignore index 5f3e69a23..2e5503b2b 100644 --- a/.gitignore +++ b/.gitignore @@ -57,3 +57,7 @@ supervisord.log # .secrets /.secrets/* !/.secrets/.gitkeep + +# Pimcore installation files +/config/local/product_registration.yaml +/var/config/needs-install.lock \ No newline at end of file diff --git a/var/config/needs-install.lock b/var/config/needs-install.lock deleted file mode 100644 index 8b1378917..000000000 --- a/var/config/needs-install.lock +++ /dev/null @@ -1 +0,0 @@ - From 914ab5a8fd4873b519f19e97fc202da85fd6716c Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Fri, 31 Oct 2025 10:10:45 -0400 Subject: [PATCH 102/131] New secrets required for Pimcore 12 --- .docker/Dockerfile | 24 ++++++++++++------- .docker/init/init.local.sh | 6 +++-- .docker/init/init.sh | 2 ++ .docker/php-debug/start-php-debug.sh | 3 +++ .docker/php/start-php.sh | 3 +++ .docker/secrets-to-env-vars.sh | 7 ++++++ .docker/supervisord/start-supervisord.sh | 3 +++ config/config.yaml | 5 ++++ docker-compose.yaml | 30 ++++++++++++++++++++++++ 9 files changed, 72 insertions(+), 11 deletions(-) create mode 100755 .docker/php-debug/start-php-debug.sh create mode 100755 .docker/php/start-php.sh create mode 100755 .docker/secrets-to-env-vars.sh create mode 100755 .docker/supervisord/start-supervisord.sh diff --git a/.docker/Dockerfile b/.docker/Dockerfile index bd41ecf28..f662588de 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -13,13 +13,17 @@ RUN set -eux; \ COPY --chown=www-data:www-data /composer.* /var/www/html COPY /.docker/composer-install-dependencies.sh /composer-install-dependencies.sh RUN /composer-install-dependencies.sh +COPY /.docker/secrets-to-env-vars.sh /secrets-to-env-vars.sh COPY --chown=www-data:www-data / /var/www/html RUN --mount=type=secret,id=kernel-secret,uid=1000 \ - set -eux; \ - cd /var/www/html; \ - runuser -u www-data -- php /usr/local/bin/composer install; \ - runuser -u www-data -- /var/www/html/bin/console pimcore:build:classes; \ - runuser -u www-data -- /var/www/html/bin/console cache:warmup + --mount=type=secret,id=pimcore-product-key,env=PIMCORE_PRODUCT_KEY,uid=1000 \ + --mount=type=secret,id=pimcore-instance-identifier,env=PIMCORE_INSTANCE_IDENTIFIER,uid=1000 \ + --mount=type=secret,id=pimcore-encryption-secret,env=PIMCORE_ENCRYPTION_SECRET,uid=1000 \ + set -eux; \ + cd /var/www/html; \ + runuser -u www-data -- php /usr/local/bin/composer install; \ + runuser -u www-data -- /var/www/html/bin/console pimcore:build:classes; \ + runuser -u www-data -- /var/www/html/bin/console cache:warmup FROM base AS init # TODO allow for custom bundles to be passed via args? @@ -34,14 +38,16 @@ RUN set -eux; \ COPY /.docker/php/php.ini /usr/local/etc/php/conf.d/docker-pimcore-php.ini COPY /.docker/php/nginx.conf /etc/nginx/sites-available/default COPY /.docker/php/supervisord.conf /etc/supervisor/supervisord.conf -CMD [ "/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf" ] +COPY ./.docker/php/start-php.sh /start-php.sh +CMD [ "/start-php.sh" ] FROM base AS supervisord COPY --from=pimcore/pimcore:php8.4-supervisord-v4 /var/run /var/run COPY --from=pimcore/pimcore:php8.4-supervisord-v4 /usr/sbin/cron /usr/sbin/cron COPY --from=pimcore/pimcore:php8.4-supervisord-v4 /etc/supervisor/supervisord.conf /etc/supervisor/supervisord.conf COPY /.docker/supervisord/supervisord.conf /etc/supervisor/conf.d/pimcore.conf -CMD [ "/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/pimcore.conf" ] +COPY ./.docker/supervisord/start-supervisord.sh /start-supervisord.sh +CMD [ "/start-supervisord.sh" ] FROM base AS php-debug COPY --from=pimcore/pimcore:php8.4-debug-v4 /usr/local/bin/entrypoint.sh /usr/local/bin/entrypoint.sh @@ -49,5 +55,5 @@ RUN pecl install xdebug; \ docker-php-ext-enable xdebug; ENV PHP_IDE_CONFIG serverName=localhost COPY /.docker/php-debug/xdebug.conf /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini -ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] -CMD ["php-fpm"] +COPY /.docker/php-debug/start-php-debug.sh /start-php-debug.sh +CMD [ "/start-php-debug.sh" ] diff --git a/.docker/init/init.local.sh b/.docker/init/init.local.sh index 286611c31..e637fb41a 100755 --- a/.docker/init/init.local.sh +++ b/.docker/init/init.local.sh @@ -2,7 +2,9 @@ set -e -. /composer-install-dependencies.sh +. /secrets-to-env-vars.sh + +/composer-install-dependencies.sh if [ "$(mysql -h "$DATABASE_HOST" -u "$DATABASE_USER" -p"$DATABASE_PASSWORD" \ -sse "select count(*) from information_schema.tables where table_schema='pimcore' and table_name='assets';")" -ne 0 ] @@ -12,4 +14,4 @@ then runuser -u www-data -- bin/console cache:clear fi -. /init.sh +/init.sh diff --git a/.docker/init/init.sh b/.docker/init/init.sh index 3c0d327dc..4f668ee98 100755 --- a/.docker/init/init.sh +++ b/.docker/init/init.sh @@ -2,6 +2,8 @@ set -e +. /secrets-to-env-vars.sh + if [ "$(mysql -h "$DATABASE_HOST" -u "$DATABASE_USER" -p"$DATABASE_PASSWORD" \ -sse "select count(*) from information_schema.tables where table_schema='pimcore' and table_name='assets';")" -eq 0 ] \ && [ "$PIMCORE_INSTALL" = "true" ] diff --git a/.docker/php-debug/start-php-debug.sh b/.docker/php-debug/start-php-debug.sh new file mode 100755 index 000000000..845b4f11a --- /dev/null +++ b/.docker/php-debug/start-php-debug.sh @@ -0,0 +1,3 @@ +#!/bin/bash +. /secrets-to-env-vars.sh +exec "/usr/local/bin/entrypoint.sh" php-fpm \ No newline at end of file diff --git a/.docker/php/start-php.sh b/.docker/php/start-php.sh new file mode 100755 index 000000000..0b8e7350f --- /dev/null +++ b/.docker/php/start-php.sh @@ -0,0 +1,3 @@ +#!/bin/bash +. /secrets-to-env-vars.sh +exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf \ No newline at end of file diff --git a/.docker/secrets-to-env-vars.sh b/.docker/secrets-to-env-vars.sh new file mode 100755 index 000000000..9829ad47b --- /dev/null +++ b/.docker/secrets-to-env-vars.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# Certain secrets cause problems with Pimcore when used as files - this script converts them to env vars, and then containers can source this script at startup. +# IMPORTANT: Only use this for secrets that must be converted to env vars. For all other secrets, continue to use them as files. +export PIMCORE_ENCRYPTION_SECRET=$(cat /run/secrets/pimcore-encryption-secret 2>/dev/null || echo "") +export PIMCORE_INSTANCE_IDENTIFIER=$(cat /run/secrets/pimcore-instance-identifier 2>/dev/null || echo "") +export PIMCORE_PRODUCT_KEY=$(cat /run/secrets/pimcore-product-key 2>/dev/null || echo "") \ No newline at end of file diff --git a/.docker/supervisord/start-supervisord.sh b/.docker/supervisord/start-supervisord.sh new file mode 100755 index 000000000..d77cff7a8 --- /dev/null +++ b/.docker/supervisord/start-supervisord.sh @@ -0,0 +1,3 @@ +#!/bin/bash +. /secrets-to-env-vars.sh +exec /usr/bin/supervisord -c /etc/supervisor/conf.d/pimcore.conf \ No newline at end of file diff --git a/config/config.yaml b/config/config.yaml index df3c4e68e..cc93b1cfc 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -4,6 +4,11 @@ imports: pimcore: + product_registration: + product_key: '%env(PIMCORE_PRODUCT_KEY)%' + instance_identifier: '%env(PIMCORE_INSTANCE_IDENTIFIER)%' + encryption: + secret: '%env(PIMCORE_ENCRYPTION_SECRET)%' # IMPORTANT Notice! # Following there are only some examples listed, for a full list of possible options, please run the following command: diff --git a/docker-compose.yaml b/docker-compose.yaml index 39a08c810..bcc339d90 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -36,6 +36,9 @@ services: target: init secrets: - kernel-secret + - pimcore-product-key + - pimcore-instance-identifier + - pimcore-encryption-secret depends_on: db: condition: service_healthy @@ -43,6 +46,9 @@ services: - .env secrets: - kernel-secret + - pimcore-product-key + - pimcore-instance-identifier + - pimcore-encryption-secret volumes: - .:/var/www/html - ./.docker/init/init.sh:/init.sh @@ -56,10 +62,16 @@ services: target: php secrets: - kernel-secret + - pimcore-product-key + - pimcore-instance-identifier + - pimcore-encryption-secret env_file: - .env secrets: - kernel-secret + - pimcore-product-key + - pimcore-instance-identifier + - pimcore-encryption-secret depends_on: init: condition: service_completed_successfully @@ -76,6 +88,9 @@ services: target: php-debug secrets: - kernel-secret + - pimcore-product-key + - pimcore-instance-identifier + - pimcore-encryption-secret environment: - XDEBUG_CONFIG=remote_enable=1 - PHP_IDE_CONFIG=serverName=localhost @@ -83,6 +98,9 @@ services: - .env secrets: - kernel-secret + - pimcore-product-key + - pimcore-instance-identifier + - pimcore-encryption-secret depends_on: init: condition: service_completed_successfully @@ -96,6 +114,9 @@ services: target: supervisord secrets: - kernel-secret + - pimcore-product-key + - pimcore-instance-identifier + - pimcore-encryption-secret depends_on: init: condition: service_completed_successfully @@ -103,6 +124,9 @@ services: - .env secrets: - kernel-secret + - pimcore-product-key + - pimcore-instance-identifier + - pimcore-encryption-secret volumes: - .:/var/www/html - ./.docker/supervisord/supervisord.conf:/etc/supervisor/conf.d/pimcore.conf:ro @@ -143,3 +167,9 @@ volumes: secrets: kernel-secret: file: ./.secrets/kernel-secret + pimcore-product-key: + file: ./.secrets/pimcore-product-key + pimcore-instance-identifier: + file: ./.secrets/pimcore-instance-identifier + pimcore-encryption-secret: + file: ./.secrets/pimcore-encryption-secret From a31437909ba550234183950ba930d5fed61c6ef5 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Fri, 31 Oct 2025 10:22:27 -0400 Subject: [PATCH 103/131] Update README --- README.md | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 819f60531..28404dff4 100644 --- a/README.md +++ b/README.md @@ -5,23 +5,30 @@ Forked from https://github.com/pimcore/skeleton. ## Setup ### Prerequisites: -- A Linux based system (or Windows Subsystem for Linux (WSL) if you are on Windows - see https://learn.microsoft.com/en-us/windows/wsl/install for more information) -- Docker Desktop (https://www.docker.com/products/docker-desktop/) + +- A Linux based system (or Windows Subsystem for Linux (WSL) if you are on Windows - see https://learn.microsoft.com/en-us/windows/wsl/install for more information) +- Docker Desktop (https://www.docker.com/products/docker-desktop/) ### Setup instructions + 1. Clone the repository -2. Update the `origin` remote to point to your client-specific repository: `git remote set-url origin ` -3. Update the name of your main branch, e.g. `git branch -m main` -4. Update the `name` property in `composer.json` to match your project's name -5. Update the `.env` property `APP_NAME` to match your project's name -6. Update the `.env.` properties ending in `_EXTERNAL` with unused port values (i.e. those that don't conflict with other apps you may be running) -7. Under the `.secrets` directory: +1. Update the `origin` remote to point to your client-specific repository: `git remote set-url origin ` +1. Update the name of your main branch, e.g. `git branch -m main` +1. Update the `name` property in `composer.json` to match your project's name +1. Update the `.env` property `APP_NAME` to match your project's name +1. Update the `.env.` properties ending in `_EXTERNAL` with unused port values (i.e. those that don't conflict with other apps you may be running) +1. Under the `.secrets` directory: 1. Create a file called `kernel-secret` and add a random 32-character string to it. - 2. Do NOT commit any of the files in this directory to your repository (they should already be gitignored). -8. Run `docker compose up -d` to build the Docker images and run the containers -9. By default, go to `localhost:8400` in your browser to access the Pimcore admin (port is controlled by the `WEB_EXTERNAL_PORT` environment variable). Use username `admin` and password `pimcore` to log in. + 1. Create a file called `pimcore-product-key` and add your Pimcore product key to it. + 1. Create a file called `pimcore-instance-identifier` and add your Pimcore instance ID to it. + 1. Create a file called `pimcore-encryption-secret` and add an encryption secret to it generated using https://github.com/defuse/php-encryption. + 1. Do NOT commit any of the files in this directory to your repository (they should already be gitignored). +1. Run `docker compose up -d` to build the Docker images and run the containers +1. By default, go to `localhost:8400` in your browser to access the Pimcore admin (port is controlled by the `WEB_EXTERNAL_PORT` environment variable). Use username `admin` and password `pimcore` to log in. ## Getting updates + We recommend forking this repository and using it as an upstream remote in order to get the latest updates and improvements. To do that, run the following commands: + 1. If using SSH for Git, run `git remote add upstream git@github.com:TorqIT/pimcore-skeleton.git`; otherwise, run `git remote add upstream https://github.com/TorqIT/pimcore-skeleton.git` -2. To fetch and merge updates from the skeleton, run `git fetch upstream`, then `git merge upstream/2024.x`. +1. To fetch and merge updates from the skeleton, run `git fetch upstream`, then `git merge upstream/2025.x`. From 99ce1137d1afd143a8b971804c0392cade7013b1 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Fri, 31 Oct 2025 10:28:08 -0400 Subject: [PATCH 104/131] Upgrade PR Docker image build workflow --- .github/workflows/ci.yml | 17 ----------------- .github/workflows/pr-docker-builds.yml | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 17 deletions(-) delete mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/pr-docker-builds.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 4f1cae588..000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Continuous integration - -on: - pull_request: - types: [opened, reopened, synchronize] - -concurrency: - group: ci__${{ github.sha }} - cancel-in-progress: true - -jobs: - build-images: - name: Build Docker images - uses: TorqIT/pimcore-github-actions-workflows/.github/workflows/ci-docker-builds.yml@v6 - permissions: - contents: read - actions: read \ No newline at end of file diff --git a/.github/workflows/pr-docker-builds.yml b/.github/workflows/pr-docker-builds.yml new file mode 100644 index 000000000..66775d04a --- /dev/null +++ b/.github/workflows/pr-docker-builds.yml @@ -0,0 +1,25 @@ +name: Ensure Docker images build on PRs + +on: + pull_request: + types: [opened, reopened, synchronize] + +concurrency: + group: pr-docker-builds__${{ github.sha }} + cancel-in-progress: true + +jobs: + build-images: + name: Build Docker images + uses: TorqIT/pimcore-github-actions-workflows/.github/workflows/docker-builds.yml@v7 + permissions: + contents: read + actions: read + secrets: + BUILD_TIME_SECRETS: > + { + "pimcore-product-key": "${{ secrets.PIMCORE_PRODUCT_KEY }}", + "pimcore-instance-identifier": "${{ secrets.PIMCORE_INSTANCE_IDENTIFIER }}", + "pimcore-encryption-secret": "${{ secrets.PIMCORE_ENCRYPTION_SECRET }}" + } + \ No newline at end of file From 457ba986d807fc996cadc96f0feb720561c51177 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Fri, 31 Oct 2025 10:34:59 -0400 Subject: [PATCH 105/131] Contributing instructions --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 28404dff4..e68119635 100644 --- a/README.md +++ b/README.md @@ -32,3 +32,9 @@ We recommend forking this repository and using it as an upstream remote in order 1. If using SSH for Git, run `git remote add upstream git@github.com:TorqIT/pimcore-skeleton.git`; otherwise, run `git remote add upstream https://github.com/TorqIT/pimcore-skeleton.git` 1. To fetch and merge updates from the skeleton, run `git fetch upstream`, then `git merge upstream/2025.x`. + +## Contributing to the skeleton + +1. Clone the repository +1. Get the secrets from your password manager (should be named "Pimcore skeleton secrets"), download the ZIP, extract and add the contents to your local repository's `.secrets` folder +1. Create a branch for your work and open a Pull Request From 18981573956bd69ff951c7c205a9bec2bf0fce0e Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Fri, 31 Oct 2025 11:22:32 -0400 Subject: [PATCH 106/131] Try explicit product key --- .github/workflows/pr-docker-builds.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-docker-builds.yml b/.github/workflows/pr-docker-builds.yml index 66775d04a..9ff8f7cfa 100644 --- a/.github/workflows/pr-docker-builds.yml +++ b/.github/workflows/pr-docker-builds.yml @@ -11,14 +11,14 @@ concurrency: jobs: build-images: name: Build Docker images - uses: TorqIT/pimcore-github-actions-workflows/.github/workflows/docker-builds.yml@v7 + uses: TorqIT/pimcore-github-actions-workflows/.github/workflows/docker-builds.yml@product-key permissions: contents: read actions: read secrets: + PIMCORE_PRODUCT_KEY: "${{ secrets.PIMCORE_PRODUCT_KEY }}" BUILD_TIME_SECRETS: > { - "pimcore-product-key": "${{ secrets.PIMCORE_PRODUCT_KEY }}", "pimcore-instance-identifier": "${{ secrets.PIMCORE_INSTANCE_IDENTIFIER }}", "pimcore-encryption-secret": "${{ secrets.PIMCORE_ENCRYPTION_SECRET }}" } From a09c4c6c3de9a964396242923887d5b81d37eb11 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Fri, 31 Oct 2025 11:40:54 -0400 Subject: [PATCH 107/131] Revert workflow --- .github/workflows/pr-docker-builds.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-docker-builds.yml b/.github/workflows/pr-docker-builds.yml index 9ff8f7cfa..66775d04a 100644 --- a/.github/workflows/pr-docker-builds.yml +++ b/.github/workflows/pr-docker-builds.yml @@ -11,14 +11,14 @@ concurrency: jobs: build-images: name: Build Docker images - uses: TorqIT/pimcore-github-actions-workflows/.github/workflows/docker-builds.yml@product-key + uses: TorqIT/pimcore-github-actions-workflows/.github/workflows/docker-builds.yml@v7 permissions: contents: read actions: read secrets: - PIMCORE_PRODUCT_KEY: "${{ secrets.PIMCORE_PRODUCT_KEY }}" BUILD_TIME_SECRETS: > { + "pimcore-product-key": "${{ secrets.PIMCORE_PRODUCT_KEY }}", "pimcore-instance-identifier": "${{ secrets.PIMCORE_INSTANCE_IDENTIFIER }}", "pimcore-encryption-secret": "${{ secrets.PIMCORE_ENCRYPTION_SECRET }}" } From 3f1ffd9c12f7ab3b0d63c330e78c504b63e33c5e Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Fri, 31 Oct 2025 14:12:12 -0400 Subject: [PATCH 108/131] Use /etc/profile.d for secrets-to-env-vars so it is available to login shells (bash -l) --- .docker/Dockerfile | 2 +- .docker/init/init.local.sh | 2 +- .docker/init/init.sh | 2 +- .docker/php-debug/start-php-debug.sh | 2 +- .docker/php/start-php.sh | 2 +- .docker/supervisord/start-supervisord.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.docker/Dockerfile b/.docker/Dockerfile index f662588de..bdaa8f2c2 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -13,7 +13,7 @@ RUN set -eux; \ COPY --chown=www-data:www-data /composer.* /var/www/html COPY /.docker/composer-install-dependencies.sh /composer-install-dependencies.sh RUN /composer-install-dependencies.sh -COPY /.docker/secrets-to-env-vars.sh /secrets-to-env-vars.sh +COPY /.docker/secrets-to-env-vars.sh /etc/profile.d/secrets-to-env-vars.sh COPY --chown=www-data:www-data / /var/www/html RUN --mount=type=secret,id=kernel-secret,uid=1000 \ --mount=type=secret,id=pimcore-product-key,env=PIMCORE_PRODUCT_KEY,uid=1000 \ diff --git a/.docker/init/init.local.sh b/.docker/init/init.local.sh index e637fb41a..bcaf51d5b 100755 --- a/.docker/init/init.local.sh +++ b/.docker/init/init.local.sh @@ -2,7 +2,7 @@ set -e -. /secrets-to-env-vars.sh +source /etc/profile.d/secrets-to-env-vars.sh /composer-install-dependencies.sh diff --git a/.docker/init/init.sh b/.docker/init/init.sh index 4f668ee98..99a268ce9 100755 --- a/.docker/init/init.sh +++ b/.docker/init/init.sh @@ -2,7 +2,7 @@ set -e -. /secrets-to-env-vars.sh +source /etc/profile.d/secrets-to-env-vars.sh if [ "$(mysql -h "$DATABASE_HOST" -u "$DATABASE_USER" -p"$DATABASE_PASSWORD" \ -sse "select count(*) from information_schema.tables where table_schema='pimcore' and table_name='assets';")" -eq 0 ] \ diff --git a/.docker/php-debug/start-php-debug.sh b/.docker/php-debug/start-php-debug.sh index 845b4f11a..ae6fc0081 100755 --- a/.docker/php-debug/start-php-debug.sh +++ b/.docker/php-debug/start-php-debug.sh @@ -1,3 +1,3 @@ #!/bin/bash -. /secrets-to-env-vars.sh +source /etc/profile.d/secrets-to-env-vars.sh exec "/usr/local/bin/entrypoint.sh" php-fpm \ No newline at end of file diff --git a/.docker/php/start-php.sh b/.docker/php/start-php.sh index 0b8e7350f..9e63247bb 100755 --- a/.docker/php/start-php.sh +++ b/.docker/php/start-php.sh @@ -1,3 +1,3 @@ #!/bin/bash -. /secrets-to-env-vars.sh +source /etc/profile.d/secrets-to-env-vars.sh exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf \ No newline at end of file diff --git a/.docker/supervisord/start-supervisord.sh b/.docker/supervisord/start-supervisord.sh index d77cff7a8..1b7ff17da 100755 --- a/.docker/supervisord/start-supervisord.sh +++ b/.docker/supervisord/start-supervisord.sh @@ -1,3 +1,3 @@ #!/bin/bash -. /secrets-to-env-vars.sh +source /etc/profile.d/secrets-to-env-vars.sh exec /usr/bin/supervisord -c /etc/supervisor/conf.d/pimcore.conf \ No newline at end of file From d2688a9d6312546f97f4f83817d011251793b2dd Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Fri, 31 Oct 2025 14:50:19 -0400 Subject: [PATCH 109/131] Fix syntax warning --- .docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.docker/Dockerfile b/.docker/Dockerfile index bdaa8f2c2..ac28b4b9c 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -53,7 +53,7 @@ FROM base AS php-debug COPY --from=pimcore/pimcore:php8.4-debug-v4 /usr/local/bin/entrypoint.sh /usr/local/bin/entrypoint.sh RUN pecl install xdebug; \ docker-php-ext-enable xdebug; -ENV PHP_IDE_CONFIG serverName=localhost +ENV PHP_IDE_CONFIG=serverName=localhost COPY /.docker/php-debug/xdebug.conf /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini COPY /.docker/php-debug/start-php-debug.sh /start-php-debug.sh CMD [ "/start-php-debug.sh" ] From f40e32b3eb409a65ed6a2f7bdf309e91d2f6bcbc Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Wed, 5 Nov 2025 11:16:09 -0500 Subject: [PATCH 110/131] Add configuration of default composer directories to get rid of warnings --- .docker/composer-install-dependencies.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.docker/composer-install-dependencies.sh b/.docker/composer-install-dependencies.sh index 592d862d3..d00845c7c 100755 --- a/.docker/composer-install-dependencies.sh +++ b/.docker/composer-install-dependencies.sh @@ -1,3 +1,6 @@ #!/usr/bin/env bash +echo Configuring Composer... +mkdir -p /var/www/.cache/composer && chown -R www-data:www-data /var/www/.cache/composer +mkdir -p /var/www/.config/composer && chown -R www-data:www-data /var/www/.config/composer echo Installing Composer packages... cd /var/www/html && runuser -u www-data -- php -d memory_limit=-1 -d xdebug.remote_enable=0 /usr/local/bin/composer install --prefer-dist --no-scripts \ No newline at end of file From 1acb1214e03446f067a9f022541787c7d219c34a Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Mon, 10 Nov 2025 10:25:19 -0500 Subject: [PATCH 111/131] Add monolog.yaml to handle debug/error logging of APP_ENV values that Pimcore doesn't handle by default (#31) --- config/packages/monolog.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 config/packages/monolog.yaml diff --git a/config/packages/monolog.yaml b/config/packages/monolog.yaml new file mode 100644 index 000000000..ab73c82de --- /dev/null +++ b/config/packages/monolog.yaml @@ -0,0 +1,12 @@ +monolog: + handlers: + main: + type: stream + path: "%kernel.logs_dir%/%kernel.environment%-debug.log" + level: debug + channels: ['!event', '!doctrine', '!cache'] + error: + type: stream + path: "%kernel.logs_dir%/%kernel.environment%-error.log" + level: error + channels: [ '!event', '!doctrine', '!cache' ] \ No newline at end of file From 30e659380393e15e90bc597e8a75432840473c3d Mon Sep 17 00:00:00 2001 From: lukemacausland <58705994+lukemacausland@users.noreply.github.com> Date: Wed, 3 Dec 2025 10:24:51 -0400 Subject: [PATCH 112/131] Feature: Perspective Editor (#38) * Install perspective editor, and default data objects to top of default perspective. * Use explicit cache clear. * Update .docker/init/init.sh * Update .docker/init/init.sh --- .docker/init/init.sh | 24 ++-- composer.json | 1 + src/Kernel.php | 2 + var/config/perspectives/default.yaml | 159 +++++++++++++++++++++++++++ 4 files changed, 175 insertions(+), 11 deletions(-) create mode 100644 var/config/perspectives/default.yaml diff --git a/.docker/init/init.sh b/.docker/init/init.sh index e320cc7f7..c1a2d8a68 100755 --- a/.docker/init/init.sh +++ b/.docker/init/init.sh @@ -11,17 +11,19 @@ then fi echo Installing bundles... -runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreAdminBundle -runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreApplicationLoggerBundle -runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreCustomReportsBundle -runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreGlossaryBundle -runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreSeoBundle -runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreSimpleBackendSearchBundle -runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreStaticRoutesBundle -runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreTinymceBundle -runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreUuidBundle -runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreXliffBundle -runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreWordExportBundle +runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreAdminBundle --no-cache-clear +runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreApplicationLoggerBundle --no-cache-clear +runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreCustomReportsBundle --no-cache-clear +runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreGlossaryBundle --no-cache-clear +runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreSeoBundle --no-cache-clear +runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreSimpleBackendSearchBundle --no-cache-clear +runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreStaticRoutesBundle --no-cache-clear +runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreTinymceBundle --no-cache-clear +runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreUuidBundle --no-cache-clear +runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreXliffBundle --no-cache-clear +runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreWordExportBundle --no-cache-clear +runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcorePerspectiveEditorBundle + echo Running migration... runuser -u www-data -- /var/www/html/bin/console doctrine:migrations:migrate -n diff --git a/composer.json b/composer.json index b7c6ee724..054ba1d11 100644 --- a/composer.json +++ b/composer.json @@ -16,6 +16,7 @@ "pimcore/platform-version": "^2024.4", "pimcore/admin-ui-classic-bundle": "*", "pimcore/quill-bundle": "*", + "pimcore/perspective-editor": "*", "symfony/dotenv": "^6.4.12", "symfony/runtime": "^6.4.12", "symfony/amqp-messenger": "^6.2", diff --git a/src/Kernel.php b/src/Kernel.php index b83a47c13..610b34c3d 100644 --- a/src/Kernel.php +++ b/src/Kernel.php @@ -29,6 +29,7 @@ use Pimcore\Bundle\WordExportBundle\PimcoreWordExportBundle; use Pimcore\Bundle\XliffBundle\PimcoreXliffBundle; use Pimcore\Bundle\QuillBundle\PimcoreQuillBundle; +use Pimcore\Bundle\PerspectiveEditorBundle\PimcorePerspectiveEditorBundle; use Pimcore\HttpKernel\BundleCollection\BundleCollection; use Pimcore\Kernel as PimcoreKernel; use TorqIT\FolderCreatorBundle\FolderCreatorBundle; @@ -56,6 +57,7 @@ public function registerBundlesToCollection(BundleCollection $collection): void $collection->addBundle(new PimcoreUuidBundle()); $collection->addBundle(new PimcoreXliffBundle()); $collection->addBundle(new PimcoreWordExportBundle()); + $collection->addBundle(new PimcorePerspectiveEditorBundle()); // Custom bundles $collection->addBundle(new FolderCreatorBundle()); $collection->addBundle(new RoleCreatorBundle()); diff --git a/var/config/perspectives/default.yaml b/var/config/perspectives/default.yaml new file mode 100644 index 000000000..b88cd6ead --- /dev/null +++ b/var/config/perspectives/default.yaml @@ -0,0 +1,159 @@ +pimcore: + perspectives: + definitions: + default: + elementTree: + - + type: objects + position: left + expanded: false + hidden: false + sort: 0 + treeContextMenu: + object: + items: + add: true + addFolder: true + importCsv: true + cut: true + copy: true + paste: true + delete: true + rename: true + reload: true + publish: true + unpublish: true + searchAndMove: true + lock: true + unlock: true + lockAndPropagate: true + unlockAndPropagate: true + changeChildrenSortBy: true + - + type: assets + position: left + expanded: false + hidden: false + sort: 1 + - + type: documents + position: left + expanded: false + hidden: false + sort: 2 + iconCls: pimcore_nav_icon_perspective + icon: null + dashboards: + predefined: + welcome: + positions: + - + - + id: 1 + type: pimcore.layout.portlets.modificationStatistic + config: null + - + id: 2 + type: pimcore.layout.portlets.modifiedAssets + config: null + - + - + id: 3 + type: pimcore.layout.portlets.modifiedObjects + config: null + - + id: 4 + type: pimcore.layout.portlets.modifiedDocuments + config: null + toolbar: + file: + hidden: false + items: + perspectives: true + dashboards: true + openDocument: true + openAsset: true + openObject: true + searchReplace: true + schedule: true + seemode: true + closeAll: true + help: true + about: true + marketing: + hidden: false + items: + reports: true + tagmanagement: true + targeting: true + seo: + hidden: false + items: + documents: true + robots: true + httperrors: true + extras: + hidden: false + items: + glossary: true + redirects: true + translations: true + recyclebin: true + plugins: true + notesEvents: true + applicationlog: true + gdpr_data_extractor: true + emails: true + maintenance: true + systemtools: + hidden: false + items: + requirements: true + settings: + hidden: false + items: + customReports: true + marketingReports: true + documentTypes: true + predefinedProperties: true + predefinedMetadata: true + system: true + appearance: true + website: true + users: + hidden: false + items: + users: true + roles: true + thumbnails: true + objects: + hidden: false + items: + classes: true + fieldcollections: true + objectbricks: true + quantityValue: true + classificationstore: true + bulkExport: true + bulkImport: true + routes: true + cache: + hidden: false + items: + clearAll: true + clearData: true + clearSymfony: true + clearOutput: true + clearTemp: true + adminTranslations: true + tagConfiguration: true + perspectiveEditor: true + search: + hidden: false + items: + quickSearch: true + documents: true + assets: true + objects: true + datahub: + hidden: false From 3325dc08ed78bd3afb5405e7e171d92f26c235f0 Mon Sep 17 00:00:00 2001 From: lukemacausland <58705994+lukemacausland@users.noreply.github.com> Date: Wed, 3 Dec 2025 10:31:31 -0400 Subject: [PATCH 113/131] Create system_settings.yaml (#15) --- .../system_settings/system_settings.yaml | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 var/config/system_settings/system_settings.yaml diff --git a/var/config/system_settings/system_settings.yaml b/var/config/system_settings/system_settings.yaml new file mode 100644 index 000000000..333260ff4 --- /dev/null +++ b/var/config/system_settings/system_settings.yaml @@ -0,0 +1,28 @@ +pimcore: + general: + domain: '' + redirect_to_maindomain: false + valid_languages: + - en_US + fallback_languages: + en_US: '' + required_languages: + - '' + default_language: en_US + debug_admin_translations: false + documents: + versions: + days: null + steps: null + error_pages: + default: '' + localized: { } + objects: + versions: + days: null + steps: null + assets: + versions: + days: null + steps: null + email: { } From 1113737203467118a1b2b9a7ce8eda4e8ac9a997 Mon Sep 17 00:00:00 2001 From: cameronfromtorq <105230931+cameronfromtorq@users.noreply.github.com> Date: Wed, 3 Dec 2025 10:32:05 -0400 Subject: [PATCH 114/131] add a local testing enviroment for sending / recieving emails (#26) --- .env | 2 ++ config/packages/dev/config.yaml | 5 +++++ docker-compose.yaml | 11 +++++++++++ 3 files changed, 18 insertions(+) diff --git a/.env b/.env index b6049782a..8965e9a04 100644 --- a/.env +++ b/.env @@ -34,6 +34,8 @@ DATABASE_NAME=pimcore DATABASE_USER=pimcore DATABASE_PASSWORD=pimcore DATABASE_SERVER_VERSION=10.11.7-MariaDB-1:10.11.7+maria~ubu2204 +SMTP_PORT_EXTERNAL=5400 +SMTP_DOMAIN=${APP_NAME}-smtp PIMCORE_INSTALL=true PIMCORE_INSTALL_MYSQL_HOST_SOCKET=${DATABASE_HOST} PIMCORE_INSTALL_MYSQL_PORT=${DATABASE_PORT} diff --git a/config/packages/dev/config.yaml b/config/packages/dev/config.yaml index d77183c87..1a93f27da 100644 --- a/config/packages/dev/config.yaml +++ b/config/packages/dev/config.yaml @@ -1,2 +1,7 @@ imports: - { resource: ../../config.yaml } + +framework: + mailer: + transports: + main: "smtp://%env(SMTP_DOMAIN)%:25" diff --git a/docker-compose.yaml b/docker-compose.yaml index c99a6eb50..b659c15b7 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -134,11 +134,22 @@ services: - pimcore-test-var:/var/www/html/var - pimcore-test-public-var:/var/www/html/public/var + smtp: + container_name: ${APP_NAME}-smtp + image: rnwood/smtp4dev:v3 + ports: + - ${SMTP_PORT_EXTERNAL}:80 + volumes: + - smtp4dev-data:/smtp4dev + environment: + - ServerOptions__HostName=smtp4dev + volumes: pimcore-database: pimcore-test-database: pimcore-test-var: pimcore-test-public-var: + smtp4dev-data: secrets: kernel-secret: From 4796cffa0c9a2ec979e77f98ea1fc66ceeb1449b Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Thu, 4 Dec 2025 10:56:50 -0500 Subject: [PATCH 115/131] Clarify why these three secrets are mounted as env vars --- .docker/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/.docker/Dockerfile b/.docker/Dockerfile index ac28b4b9c..503762fe3 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -16,6 +16,7 @@ RUN /composer-install-dependencies.sh COPY /.docker/secrets-to-env-vars.sh /etc/profile.d/secrets-to-env-vars.sh COPY --chown=www-data:www-data / /var/www/html RUN --mount=type=secret,id=kernel-secret,uid=1000 \ + # These three secrets are deliberately mounted as env vars rather than files as required by Pimcore --mount=type=secret,id=pimcore-product-key,env=PIMCORE_PRODUCT_KEY,uid=1000 \ --mount=type=secret,id=pimcore-instance-identifier,env=PIMCORE_INSTANCE_IDENTIFIER,uid=1000 \ --mount=type=secret,id=pimcore-encryption-secret,env=PIMCORE_ENCRYPTION_SECRET,uid=1000 \ From 9647df38752d4f697042b2cf3165314d77910986 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Fri, 5 Dec 2025 10:32:44 -0500 Subject: [PATCH 116/131] Delete upstream workflows (#39) * Delete .github/workflows/new-php-cs-fixer.yaml * Delete .github/workflows/sync-changes-scheduled.yaml --- .github/workflows/new-php-cs-fixer.yaml | 23 ------------------- .github/workflows/sync-changes-scheduled.yaml | 23 ------------------- 2 files changed, 46 deletions(-) delete mode 100644 .github/workflows/new-php-cs-fixer.yaml delete mode 100644 .github/workflows/sync-changes-scheduled.yaml diff --git a/.github/workflows/new-php-cs-fixer.yaml b/.github/workflows/new-php-cs-fixer.yaml deleted file mode 100644 index 91256e7c5..000000000 --- a/.github/workflows/new-php-cs-fixer.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: "PHP-CS-Fixer" - -on: - workflow_dispatch: - push: - branches: - - "[0-9]+.[0-9]+" - - "[0-9]+.x" - - "*_actions" - - "feature-*" - -permissions: - contents: write - -jobs: - php-style: - uses: pimcore/workflows-collection-public/.github/workflows/reusable-php-cs-fixer.yaml@fix-failed-workflow - with: - head_ref: ${{ github.head_ref || github.ref_name }} - repository: ${{ github.repository }} - config_file: ".php-cs-fixer.dist.php" - secrets: - PHP_CS_FIXER_GITHUB_TOKEN: ${{ secrets.PHP_CS_FIXER_GITHUB_TOKEN }} diff --git a/.github/workflows/sync-changes-scheduled.yaml b/.github/workflows/sync-changes-scheduled.yaml deleted file mode 100644 index 002ac9320..000000000 --- a/.github/workflows/sync-changes-scheduled.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: Sync changes scheduled from skeleton to paas-skeleton -on: - workflow_dispatch: - schedule: - - cron: '30 21 * * *' - -jobs: - sync-branches: - uses: pimcore/workflows-collection-public/.github/workflows/reusable-sync-changes.yaml@main - if: github.repository == 'pimcore/skeleton' - strategy: - fail-fast: false - matrix: - ref: [{'base': '2025.x', 'destination': '2025.x'}] - with: - base_ref: ${{ matrix.ref.base }} - ref_name: ${{ matrix.ref.destination }} - target_repo: 'paas-skeleton' - auto_merge: true - secrets: - SYNC_TOKEN: ${{ secrets.SYNC_TOKEN }} - GIT_NAME: ${{ secrets.GIT_NAME }} - GIT_EMAIL: ${{ secrets.GIT_EMAIL }} \ No newline at end of file From 93f63ff9cfadb7638563f086e34ea1cdc36d8b46 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Fri, 5 Dec 2025 13:28:09 -0500 Subject: [PATCH 117/131] Use new standardized CI workflow (#41) --- .../workflows/{pr-docker-builds.yml => ci.yml} | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) rename .github/workflows/{pr-docker-builds.yml => ci.yml} (64%) diff --git a/.github/workflows/pr-docker-builds.yml b/.github/workflows/ci.yml similarity index 64% rename from .github/workflows/pr-docker-builds.yml rename to .github/workflows/ci.yml index 66775d04a..202fc5a84 100644 --- a/.github/workflows/pr-docker-builds.yml +++ b/.github/workflows/ci.yml @@ -1,18 +1,13 @@ -name: Ensure Docker images build on PRs +name: CI on: - pull_request: - types: [opened, reopened, synchronize] - -concurrency: - group: pr-docker-builds__${{ github.sha }} - cancel-in-progress: true + push: jobs: - build-images: + ci: name: Build Docker images - uses: TorqIT/pimcore-github-actions-workflows/.github/workflows/docker-builds.yml@v7 - permissions: + uses: TorqIT/pimcore-github-actions-workflows/.github/workflows/ci-docker.yml@v7 + permissions: contents: read actions: read secrets: @@ -22,4 +17,3 @@ jobs: "pimcore-instance-identifier": "${{ secrets.PIMCORE_INSTANCE_IDENTIFIER }}", "pimcore-encryption-secret": "${{ secrets.PIMCORE_ENCRYPTION_SECRET }}" } - \ No newline at end of file From 06601516e3fa0e0003e9c34b3627b8b4273a4289 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Tue, 9 Dec 2025 09:52:23 -0500 Subject: [PATCH 118/131] Only run CI on PRs (#43) --- .github/workflows/ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 202fc5a84..7c6594ead 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,12 @@ name: CI on: - push: + pull_request: + types: [opened, reopened, synchronize] + +concurrency: + group: ci__${{ github.ref }} + cancel-in-progress: true jobs: ci: From c39bd68a604d96e3cabc735893935f025be221c1 Mon Sep 17 00:00:00 2001 From: Sean MacKay Date: Tue, 9 Dec 2025 10:54:14 -0400 Subject: [PATCH 119/131] Add config locations placeholders to the skeleton for easy access in projects (#45) --- config/config.yaml | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/config/config.yaml b/config/config.yaml index cc93b1cfc..90e7594c5 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -9,6 +9,50 @@ pimcore: instance_identifier: '%env(PIMCORE_INSTANCE_IDENTIFIER)%' encryption: secret: '%env(PIMCORE_ENCRYPTION_SECRET)%' + # config_location: + # image_thumbnails: + # write_target: + # type: 'symfony-config' + # options: + # directory: '/var/www/html/var/config/image-thumbnails' + # video_thumbnails: + # write_target: + # type: 'disabled' + # document_types: + # write_target: + # type: 'disabled' + # predefined_properties: + # write_target: + # type: 'settings-store' + # predefined_asset_metadata: + # write_target: + # type: 'symfony-config' + # options: + # directory: '/var/www/html/var/config/predefined_asset_metadata' + # perspectives: + # write_target: + # type: 'symfony-config' + # options: + # directory: '/var/www/html/var/config/perspectives' + # custom_views: + # write_target: + # type: 'symfony-config' + # options: + # directory: '/var/www/html/var/config/custom_views' + # object_custom_layouts: + # write_target: + # type: 'symfony-config' + # options: + # directory: '/var/www/html/var/config/object_custom_layouts' + # select_options: + # write_target: + # type: 'symfony-config' + # options: + # directory: '/var/www/html/var/config/object_custom_layouts' + # read_target: + # type: 'symfony-config' + # options: + # directory: '/var/www/html/var/config/object_custom_layouts' # IMPORTANT Notice! # Following there are only some examples listed, for a full list of possible options, please run the following command: From 9bf1ad8fb9c6b5f5007c1f2a1ad2e55f365dcdc6 Mon Sep 17 00:00:00 2001 From: lukemacausland <58705994+lukemacausland@users.noreply.github.com> Date: Wed, 10 Dec 2025 13:27:02 +0000 Subject: [PATCH 120/131] Adding script to install all available bundles without listing them in init. --- .docker/init/init.sh | 18 ++++-------------- .docker/init/install-bundles.sh | 29 +++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 14 deletions(-) create mode 100755 .docker/init/install-bundles.sh diff --git a/.docker/init/init.sh b/.docker/init/init.sh index 98e955665..116beb03f 100755 --- a/.docker/init/init.sh +++ b/.docker/init/init.sh @@ -13,24 +13,14 @@ then fi echo Installing bundles... -runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreAdminBundle --no-cache-clear -runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreApplicationLoggerBundle --no-cache-clear -runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreCustomReportsBundle --no-cache-clear -runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreGlossaryBundle --no-cache-clear -runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreSeoBundle --no-cache-clear -runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreSimpleBackendSearchBundle --no-cache-clear -runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreStaticRoutesBundle --no-cache-clear -runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreUuidBundle --no-cache-clear -runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreXliffBundle --no-cache-clear -runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreWordExportBundle --no-cache-clear -runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcorePerspectiveEditorBundle - -echo Running migration... -runuser -u www-data -- /var/www/html/bin/console doctrine:migrations:migrate -n +/install-bundles.sh echo Rebuilding classes... runuser -u www-data -- /var/www/html/bin/console pimcore:deployment:classes-rebuild -c -d -n --force +echo Running migration... +runuser -u www-data -- /var/www/html/bin/console doctrine:migrations:migrate -n + echo Creating folders... runuser -u www-data -- /var/www/html/bin/console torq:folder-creator diff --git a/.docker/init/install-bundles.sh b/.docker/init/install-bundles.sh new file mode 100755 index 000000000..6638293f0 --- /dev/null +++ b/.docker/init/install-bundles.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +BUNDLES=$( + bin/console pimcore:bundle:list --json | \ + php -r ' + $bundles = json_decode(stream_get_contents(STDIN), true); + $toInstall = []; + foreach($bundles as $b) { + if ($b["Enabled"] == true && + $b["Installed"] == false && + $b["Installable"] == true) { + $toInstall[] = $b["Bundle"]; + } + } + echo implode(" ", $toInstall); + ' +) + +if [ -z "${BUNDLES}" ]; then + echo "No bundles to install" +else + for BUNDLE in ${BUNDLES}; do + echo "Installing bundle: ${BUNDLE}" + runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install "${BUNDLE}" --no-interaction --no-cache-clear + done + + echo "Manually clearing cache..." + runuser -u www-data -- /var/www/html/bin/console cache:clear --no-interaction +fi \ No newline at end of file From 6657e46e69d7be44819ff9bbd3d36c051d20213e Mon Sep 17 00:00:00 2001 From: lukemacausland <58705994+lukemacausland@users.noreply.github.com> Date: Wed, 10 Dec 2025 09:32:40 -0400 Subject: [PATCH 121/131] This change was done in a separate pull request. --- .docker/init/init.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.docker/init/init.sh b/.docker/init/init.sh index 116beb03f..07ccc2b59 100755 --- a/.docker/init/init.sh +++ b/.docker/init/init.sh @@ -15,12 +15,12 @@ fi echo Installing bundles... /install-bundles.sh -echo Rebuilding classes... -runuser -u www-data -- /var/www/html/bin/console pimcore:deployment:classes-rebuild -c -d -n --force - echo Running migration... runuser -u www-data -- /var/www/html/bin/console doctrine:migrations:migrate -n +echo Rebuilding classes... +runuser -u www-data -- /var/www/html/bin/console pimcore:deployment:classes-rebuild -c -d -n --force + echo Creating folders... runuser -u www-data -- /var/www/html/bin/console torq:folder-creator From 5c0cd8672b9e2a415165fadefacee02957fa15b0 Mon Sep 17 00:00:00 2001 From: lukemacausland <58705994+lukemacausland@users.noreply.github.com> Date: Wed, 10 Dec 2025 16:06:14 -0400 Subject: [PATCH 122/131] Add custom expression providers for use in calculated fields. --- config/services.yaml | 4 ++ .../BasicExpressionProvider.php | 49 +++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 src/ExpressionLanguage/BasicExpressionProvider.php diff --git a/config/services.yaml b/config/services.yaml index 912634213..c33ec1a01 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -99,3 +99,7 @@ services: event: pimcore.bundle_manager.paths.css, method: addCSSFiles, } + + App\ExpressionLanguage\BasicExpressionProvider: + tags: + - { name: 'pimcore.calculated_value.expression_language_provider' } \ No newline at end of file diff --git a/src/ExpressionLanguage/BasicExpressionProvider.php b/src/ExpressionLanguage/BasicExpressionProvider.php new file mode 100644 index 000000000..db2c373d0 --- /dev/null +++ b/src/ExpressionLanguage/BasicExpressionProvider.php @@ -0,0 +1,49 @@ + Date: Mon, 15 Dec 2025 11:10:53 -0400 Subject: [PATCH 123/131] Add datahub / importer, with default configs. (#44) --- .docker/init/init.sh | 2 ++ .docker/supervisord/supervisord.conf | 12 ++++++++++++ composer.json | 2 ++ config/config.yaml | 12 ++++++++++++ config/packages/dev/config.yaml | 6 ++++++ src/Kernel.php | 4 ++++ 6 files changed, 38 insertions(+) diff --git a/.docker/init/init.sh b/.docker/init/init.sh index 98e955665..c7f4f55e4 100755 --- a/.docker/init/init.sh +++ b/.docker/init/init.sh @@ -23,6 +23,8 @@ runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreS runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreUuidBundle --no-cache-clear runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreXliffBundle --no-cache-clear runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreWordExportBundle --no-cache-clear +runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreDataHubBundle --no-cache-clear +runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcoreDataImporterBundle --no-cache-clear runuser -u www-data -- /var/www/html/bin/console pimcore:bundle:install PimcorePerspectiveEditorBundle echo Running migration... diff --git a/.docker/supervisord/supervisord.conf b/.docker/supervisord/supervisord.conf index 0f5d234c2..dfb2b65af 100644 --- a/.docker/supervisord/supervisord.conf +++ b/.docker/supervisord/supervisord.conf @@ -48,3 +48,15 @@ autorestart=true stdout_logfile=/dev/fd/1 stdout_logfile_maxbytes=0 redirect_stderr=true + +[program:messenger-consume-data-import] +user=www-data +command=php /var/www/html/bin/console messenger:consume pimcore_data_import --memory-limit=128M --time-limit=360 --limit=128 +numprocs=1 # To increase worker count for parallel processes, update the following in the config.yaml: pimcore_data_importer.messenger_queue_processing.worker_count_parallel +startsecs=0 +autostart=true +autorestart=true +process_name=%(program_name)s_%(process_num)02d +stdout_logfile=/dev/fd/1 +stdout_logfile_maxbytes=0 +redirect_stderr=true diff --git a/composer.json b/composer.json index f3c39b5b0..110cc140d 100644 --- a/composer.json +++ b/composer.json @@ -19,6 +19,8 @@ "pimcore/admin-ui-classic-bundle": "*", "pimcore/quill-bundle": "*", "pimcore/perspective-editor": "*", + "pimcore/data-hub": "*", + "pimcore/data-importer": "*", "symfony/dotenv": "^6.4.12 || ^7.2", "symfony/runtime": "^6.4.12 || ^7.3", "symfony/amqp-messenger": "^6.2 || ^7.2", diff --git a/config/config.yaml b/config/config.yaml index 90e7594c5..6483db697 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -2,6 +2,18 @@ imports: - { resource: 'local/' } - { resource: 'database.yaml' } +pimcore_data_hub: + config_location: + data_hub: + write_target: + type: "settings-store" + +pimcore_data_importer: + messenger_queue_processing: + activated: true + worker_count_lifetime: 60 + worker_count_parallel: 4 # Increase this to add more parallel workers + worker_item_count: 50 pimcore: product_registration: diff --git a/config/packages/dev/config.yaml b/config/packages/dev/config.yaml index 1a93f27da..b8f7616ce 100644 --- a/config/packages/dev/config.yaml +++ b/config/packages/dev/config.yaml @@ -1,6 +1,12 @@ imports: - { resource: ../../config.yaml } +pimcore_data_hub: + config_location: + data_hub: + write_target: + type: "symfony-config" + framework: mailer: transports: diff --git a/src/Kernel.php b/src/Kernel.php index 22c9151c6..991c9bef0 100644 --- a/src/Kernel.php +++ b/src/Kernel.php @@ -23,6 +23,8 @@ use Pimcore\Bundle\StaticRoutesBundle\PimcoreStaticRoutesBundle; use Pimcore\Bundle\UuidBundle\PimcoreUuidBundle; use Pimcore\Bundle\WordExportBundle\PimcoreWordExportBundle; +use Pimcore\Bundle\DataHubBundle\PimcoreDataHubBundle; +use Pimcore\Bundle\DataImporterBundle\PimcoreDataImporterBundle; use Pimcore\Bundle\XliffBundle\PimcoreXliffBundle; use Pimcore\Bundle\QuillBundle\PimcoreQuillBundle; use Pimcore\Bundle\PerspectiveEditorBundle\PimcorePerspectiveEditorBundle; @@ -52,6 +54,8 @@ public function registerBundlesToCollection(BundleCollection $collection): void $collection->addBundle(new PimcoreUuidBundle()); $collection->addBundle(new PimcoreXliffBundle()); $collection->addBundle(new PimcoreWordExportBundle()); + $collection->addBundle(new PimcoreDataHubBundle()); + $collection->addBundle(new PimcoreDataImporterBundle()); $collection->addBundle(new PimcorePerspectiveEditorBundle()); // Custom bundles $collection->addBundle(new FolderCreatorBundle()); From 843c0d2f1bbc6973148d366d9b5f83e00edd5237 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Mon, 15 Dec 2025 10:11:12 -0500 Subject: [PATCH 124/131] Update init.sh (#42) --- .docker/init/init.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.docker/init/init.sh b/.docker/init/init.sh index c7f4f55e4..78263aff8 100755 --- a/.docker/init/init.sh +++ b/.docker/init/init.sh @@ -39,5 +39,8 @@ runuser -u www-data -- /var/www/html/bin/console torq:folder-creator echo Generating roles... runuser -u www-data -- /var/www/html/bin/console torq:generate-roles +echo Clearing Pimcore cache... +runuser -u www-data -- /var/www/html/bin/console pimcore:cache:clear + echo Generating quantity values... runuser -u www-data -- /var/www/html/bin/console definition:import:units config/quantityvalues.json --override From cf9ad198fbfce92439242462d30de613478ac680 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Mon, 15 Dec 2025 10:42:06 -0500 Subject: [PATCH 125/131] Fix typo on db service (#49) --- docker-compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index bf411e478..0fde41787 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -8,7 +8,7 @@ services: container_name: ${APP_NAME}-db image: mariadb:10.11 working_dir: /application - command: [ mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_520_ci, --innodb-file-per-table=1, local-infile=1 ] + command: [ mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_520_ci, --innodb-file-per-table=1, --local-infile=1 ] volumes: - pimcore-database:/var/lib/mysql environment: From f855d8ba475198955783b6fbb77e46f158bb3700 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Mon, 15 Dec 2025 10:52:32 -0500 Subject: [PATCH 126/131] Add "install" env vars required by pimcore-install --- .docker/init/init.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.docker/init/init.sh b/.docker/init/init.sh index 78263aff8..9017f6d36 100755 --- a/.docker/init/init.sh +++ b/.docker/init/init.sh @@ -9,7 +9,10 @@ if [ "$(mysql -h "$DATABASE_HOST" -u "$DATABASE_USER" -p"$DATABASE_PASSWORD" \ && [ "$PIMCORE_INSTALL" = "true" ] then echo "Database is empty and PIMCORE_INSTALL is set to true, so calling pimcore-install..." - runuser -u www-data -- vendor/bin/pimcore-install --skip-database-config --no-interaction + PIMCORE_INSTALL_ENCRYPTION_SECRET=$PIMCORE_ENCRYPTION_SECRET \ + PIMCORE_INSTALL_INSTANCE_IDENTIFIER=$PIMCORE_INSTANCE_IDENTIFIER \ + PIMCORE_INSTALL_PRODUCT_KEY=$PIMCORE_PRODUCT_KEY \ + runuser -u www-data -- vendor/bin/pimcore-install --skip-database-config --no-interaction fi echo Installing bundles... From 0474a394640faf5447013e166152831585735044 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Thu, 18 Dec 2025 10:04:12 -0500 Subject: [PATCH 127/131] Pin pimcore/platform-version to 2025.4 LTS (#51) --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 110cc140d..78fe4bb1d 100644 --- a/composer.json +++ b/composer.json @@ -14,8 +14,8 @@ "minimum-stability": "dev", "require": { "php": "~8.3.0 || ~8.4.0", - "pimcore/pimcore": "^12.3", - "pimcore/platform-version": "2025.x-dev", + "pimcore/pimcore": "*", + "pimcore/platform-version": "2025.4", "pimcore/admin-ui-classic-bundle": "*", "pimcore/quill-bundle": "*", "pimcore/perspective-editor": "*", From 35c80516e401bb5b6e5fab93f7ca7045f5c041fe Mon Sep 17 00:00:00 2001 From: lukemacausland <58705994+lukemacausland@users.noreply.github.com> Date: Thu, 18 Dec 2025 14:21:41 -0400 Subject: [PATCH 128/131] Copy in install bundle script. (#53) * Copy in install bundle script. * Remove unnecessary comment --------- Co-authored-by: Evan Jackson --- .docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.docker/Dockerfile b/.docker/Dockerfile index 503762fe3..c57fef98f 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -27,7 +27,7 @@ RUN --mount=type=secret,id=kernel-secret,uid=1000 \ runuser -u www-data -- /var/www/html/bin/console cache:warmup FROM base AS init -# TODO allow for custom bundles to be passed via args? +COPY ./.docker/init/install-bundles.sh /install-bundles.sh COPY /.docker/init/init.sh /init.sh CMD [ "/init.sh" ] From e0c5fe9149e29ecf3a6aa013e5515f37b54d0acd Mon Sep 17 00:00:00 2001 From: lukemacausland <58705994+lukemacausland@users.noreply.github.com> Date: Mon, 5 Jan 2026 15:55:19 -0400 Subject: [PATCH 129/131] Compare nginx to nginx-debug (#54) --- .docker/php-debug/nginx-debug.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.docker/php-debug/nginx-debug.conf b/.docker/php-debug/nginx-debug.conf index 98491d7dd..8f3c4fa53 100644 --- a/.docker/php-debug/nginx-debug.conf +++ b/.docker/php-debug/nginx-debug.conf @@ -57,6 +57,8 @@ server { # # rewrite ^(/protected/.*) /index.php$is_args$args last; # + # rewrite ^(/cache-buster-(?:\d+)/protected(?:.*)) /index.php$is_args$args last; + # # location ~ ^/var/.*/protected(.*) { # return 403; # } @@ -106,7 +108,7 @@ server { # Assets # Still use a whitelist approach to prevent each and every missing asset to go through the PHP Engine. - 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?)$ { + location ~* ^(?!/admin|/asset/webdav|/studio/api)(.+?)\.((?:css|js)(?:\.map)?|jpe?g|gif|png|svgz?|eps|exe|gz|json|zip|mp\d|m4a|ogg|ogv|webp|webm|pdf|csv|docx?|xlsx?|pptx?)$ { try_files /var/assets$uri $uri =404; expires 2w; access_log off; From 37c54d415cf13fd6ad0ecdc676696bac6fbaddae Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Wed, 14 Jan 2026 12:26:39 -0500 Subject: [PATCH 130/131] Ensure wget is available in PHP container for healthcheck purposes (#57) --- .docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.docker/Dockerfile b/.docker/Dockerfile index c57fef98f..597803b57 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -34,7 +34,7 @@ CMD [ "/init.sh" ] FROM base AS php RUN set -eux; \ apt-get update -y; \ - apt-get install -y --no-install-recommends nginx; \ + apt-get install -y --no-install-recommends nginx wget; \ rm -rf /var/lib/apt/lists/*; COPY /.docker/php/php.ini /usr/local/etc/php/conf.d/docker-pimcore-php.ini COPY /.docker/php/nginx.conf /etc/nginx/sites-available/default From 9fc720c380339b2dcabe390e0392228a48bbf039 Mon Sep 17 00:00:00 2001 From: Evan Jackson Date: Mon, 19 Jan 2026 15:16:38 -0500 Subject: [PATCH 131/131] RUN_UNIT_TESTS true by default --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c6594ead..e0dc08c12 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,8 @@ jobs: permissions: contents: read actions: read + with: + RUN_UNIT_TESTS: true secrets: BUILD_TIME_SECRETS: > {