Skip to content

Commit 7e7912f

Browse files
committed
Migrate skeleton from Admin UI Classic to Studio UI architecture
Replace admin-ui-classic-bundle with studio-backend-bundle and studio-ui-bundle, add required dependency bundles (GenericExecutionEngine, CustomReports, GenericDataIndex, Quill), and create an InstallProfileInterface-based installer profile for the new profile-first installation flow. Key changes: - Add SkeletonProfile installer profile with OpenSearch, AMQP, Mercure, and product registration env var definitions - Update security.yaml firewall and access control for Studio API endpoints - Wire Mercure settings and CSP connect-src via env vars in config - Add mercure, opensearch, and opensearch-dashboards Docker services - Update supervisord to consume new messenger queues - Remove dead BundleSetupSubscriber and PimcoreAdminBundle references - Add error_pages defaults to work around vendor config gap
1 parent 7ca5b4b commit 7e7912f

12 files changed

Lines changed: 199 additions & 91 deletions

File tree

.docker/supervisord.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Important Notice: this configuration is not optimized for production use!
33

44
[program:messenger-consume]
5-
command=php /var/www/html/bin/console messenger:consume pimcore_core pimcore_maintenance pimcore_scheduled_tasks pimcore_image_optimize --memory-limit=250M --time-limit=3600
5+
command=php /var/www/html/bin/console messenger:consume pimcore_core pimcore_maintenance pimcore_scheduled_tasks pimcore_generic_execution_engine pimcore_generic_data_index_queue scheduler_generic_data_index pimcore_generic_data_index_failed pimcore_image_optimize pimcore_asset_update --memory-limit=250M --time-limit=3600
66
numprocs=1
77
startsecs=0
88
autostart=true

.env

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,19 @@ PIMCORE_DEV_MODE=false
2121
#TRUSTED_PROXIES=127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
2222
#TRUSTED_HOSTS='^(localhost|example\.com)$'
2323
###< symfony/framework-bundle ###
24+
25+
APPLICATION_SECRET=CHANGE_ME_APPLICATION_SECRET_KEY_LONG_ENOUGH_FOR_VALIDATION
26+
27+
DATABASE_URL=mysql://pimcore:pimcore@db:3306/pimcore
28+
PIMCORE_ADMIN_USER=admin
29+
PIMCORE_ADMIN_PASSWORD=admin
30+
PIMCORE_PRODUCT_KEY=CHANGE_ME_PRODUCT_KEY
31+
PIMCORE_INSTANCE_IDENTIFIER=CHANGE_ME_INSTANCE_IDENTIFIER
32+
PIMCORE_ENCRYPTION_SECRET=CHANGE_ME_ENCRYPTION_SECRET
33+
34+
PIMCORE_OPENSEARCH_DSN=opensearch://admin:gBsVe!Dut723@opensearch:9200?ssl=true&ssl_verify=false
35+
PIMCORE_MESSENGER_TRANSPORT_DSN_PREFIX=amqp://guest:guest@rabbitmq:5672/%2f/
36+
37+
MERCURE_JWT_KEY=CHANGE_ME_THIS_IS_MY_SECRET_KEY_THAT_IS_LONG_ENOUGH_FOR_VALIDATION
38+
MERCURE_URL=http://localhost:8080/.well-known/mercure
39+
MERCURE_SERVER_URL=http://mercure/.well-known/mercure

composer.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,25 @@
77
"sort-packages": true,
88
"process-timeout": 0,
99
"allow-plugins": {
10+
"php-http/discovery": false,
1011
"symfony/runtime": true
1112
}
1213
},
1314
"prefer-stable": true,
1415
"minimum-stability": "dev",
1516
"require": {
1617
"php": "~8.4.0 || ~8.5.0",
17-
"pimcore/pimcore": "2026.x-dev",
18-
"pimcore/platform-version": "2026.x-dev",
19-
"pimcore/admin-ui-classic-bundle": "dev-test-version26",
20-
"pimcore/quill-bundle": "2026.x-dev",
18+
"pimcore/pimcore": "^2026.1.0",
19+
"pimcore/quill-bundle": "^2026.1.0",
20+
"pimcore/studio-ui-bundle": "^0.14.19 || ^1.x-dev || ^2026.1",
21+
"pimcore/studio-backend-bundle": "^0.14.19 || ^1.x-dev || ^2026.1",
2122
"symfony/amqp-messenger": "^7.4",
2223
"symfony/dotenv": "^7.4",
2324
"symfony/runtime": "^7.4"
2425
},
2526
"require-dev": {
26-
"codeception/codeception": "^5.0.3",
27-
"codeception/module-symfony": "^3.1.0"
27+
"codeception/codeception": "^5.3",
28+
"codeception/module-symfony": "^3.5"
2829
},
2930
"suggest": {
3031
"pimcore/data-hub": "Universal data interface for GraphQL, CSV and other formats"

config/bundles.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
<?php
22

33
return [
4-
//Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true],
4+
Pimcore\Bundle\GenericExecutionEngineBundle\PimcoreGenericExecutionEngineBundle::class => ['all' => true],
5+
Pimcore\Bundle\CustomReportsBundle\PimcoreCustomReportsBundle::class => ['all' => true],
6+
Pimcore\Bundle\GenericDataIndexBundle\PimcoreGenericDataIndexBundle::class => ['all' => true],
7+
Pimcore\Bundle\StudioBackendBundle\PimcoreStudioBackendBundle::class => ['all' => true],
8+
Pimcore\Bundle\StudioUiBundle\PimcoreStudioUiBundle::class => ['all' => true],
9+
Pimcore\Bundle\QuillBundle\PimcoreQuillBundle::class => ['all' => true],
510
];

config/config.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ imports:
33

44

55
pimcore:
6+
documents:
7+
error_pages:
8+
default: ~
9+
localized: []
610

711
# IMPORTANT Notice!
812
# Following there are only some examples listed, for a full list of possible options, please run the following command:
@@ -137,3 +141,14 @@ framework:
137141
# name: ''
138142
# email: ''
139143

144+
pimcore_studio_backend:
145+
mercure_settings:
146+
jwt_key: '%env(MERCURE_JWT_KEY)%'
147+
hub_url_client: '%env(MERCURE_URL)%'
148+
hub_url_server: '%env(MERCURE_SERVER_URL)%'
149+
150+
pimcore_studio_ui:
151+
csp_header:
152+
additional_urls:
153+
connect-src:
154+
- '%env(MERCURE_URL)%'

config/installer.yaml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
services:
2-
# default configuration for services in *this* file
32
_defaults:
4-
# automatically injects dependencies in your services
53
autowire: true
6-
# automatically registers your services as commands, event subscribers, etc.
74
autoconfigure: true
8-
# this means you cannot fetch services directly from the container via $container->get()
9-
# if you need to do this, you can override this setting on individual services
105
public: false
11-
12-
# ---------------------------------------------------------
13-
# Event Subscribers
14-
# ---------------------------------------------------------
15-
App\EventSubscriber\BundleSetupSubscriber: ~

config/packages/security.yaml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,16 @@ security:
1414
provider: pimcore_admin
1515
http_basic: ~
1616

17-
# Pimcore Admin Bundle firewall
18-
pimcore_admin: '%pimcore_admin_bundle.firewall_settings%'
17+
pimcore_studio: "%pimcore_studio_backend.firewall_settings%"
1918

2019
access_control:
2120
# Pimcore admin ACl // DO NOT CHANGE!
22-
- { path: ^/admin/settings/display-custom-logo, roles: PUBLIC_ACCESS }
23-
- { path: ^/admin/login/2fa-verify, roles: IS_AUTHENTICATED_2FA_IN_PROGRESS }
24-
- { path: ^/admin/login/2fa-setup, roles: ROLE_PIMCORE_USER }
25-
- { path: ^/admin/login/2fa, roles: IS_AUTHENTICATED_2FA_IN_PROGRESS }
26-
- { path: ^/admin/login$, roles: PUBLIC_ACCESS }
27-
- { path: ^/admin/login/(login|lostpassword|deeplink|csrf-token)$, roles: PUBLIC_ACCESS }
28-
- { path: ^/admin, roles: ROLE_PIMCORE_USER }
2921
- { path: ^/asset/webdav, roles: ROLE_PIMCORE_USER }
22+
- {
23+
path: ^/pimcore-studio/api/(docs|docs/json|translations|user/reset-password|setting/admin/thumbnail)$,
24+
roles: PUBLIC_ACCESS,
25+
}
26+
- { path: ^/pimcore-studio/api, roles: ROLE_PIMCORE_USER }
3027

3128
role_hierarchy:
3229
# Pimcore admin // DO NOT CHANGE!

config/services.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
parameters:
2-
secret: ThisTokenIsNotSoSecretChangeItImmediately
2+
secret: '%env(APPLICATION_SECRET)%'
3+
mercure:
4+
hub:
5+
#To learn more about JWT keys, take a look at https://jwt.io.
6+
jwt_key: '%env(MERCURE_JWT_KEY)%'
37

48
# customize the full path to external executables
59
# normally they are auto-detected by `which program` or auto-discovered in the configured path in

docker-compose.yaml

Lines changed: 50 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,13 @@ services:
4040
- php
4141

4242
php:
43-
#user: '1000:1000' # set to your uid:gid
43+
user: '1000:1000' # set to your uid:gid
4444
image: pimcore/pimcore:php8.5-max-5.x
4545
environment:
4646
COMPOSER_HOME: /var/www/html
4747
PHP_IDE_CONFIG: serverName=localhost
4848
# Feed installer configuration via ENV variables.
4949
# See: https://pimcore.com/docs/pimcore/current/Development_Documentation/Getting_Started/Advanced_Installation_Topics.html#page_Advanced-Installation-Topics
50-
PIMCORE_INSTALL_MYSQL_USERNAME: pimcore
51-
PIMCORE_INSTALL_MYSQL_PASSWORD: pimcore
52-
PIMCORE_INSTALL_MYSQL_PORT: 3306
53-
PIMCORE_INSTALL_MYSQL_HOST_SOCKET: db
54-
PIMCORE_INSTALL_MYSQL_DATABASE: pimcore
5550
depends_on:
5651
db:
5752
condition: service_healthy
@@ -60,7 +55,7 @@ services:
6055
- ./.docker/messenger.yaml:/var/www/html/config/packages/messenger.yaml:ro
6156

6257
supervisord:
63-
#user: '1000:1000' # set to your uid:gid
58+
user: '1000:1000' # set to your uid:gid
6459
image: pimcore/pimcore:php8.5-supervisord-5.x
6560
depends_on:
6661
rabbitmq:
@@ -72,6 +67,53 @@ services:
7267
- ./.docker/messenger.yaml:/var/www/html/config/packages/messenger.yaml:ro
7368
- ./.docker/supervisord.conf:/etc/supervisor/conf.d/pimcore.conf:ro
7469

70+
mercure:
71+
image: dunglas/mercure
72+
restart: unless-stopped
73+
environment:
74+
# Uncomment the following line to disable HTTPS
75+
SERVER_NAME: ':80'
76+
MERCURE_PUBLISHER_JWT_KEY: 'CHANGE_ME_THIS_IS_MY_SECRET_KEY_THAT_IS_LONG_ENOUGH_FOR_VALIDATION'
77+
MERCURE_SUBSCRIBER_JWT_KEY: 'CHANGE_ME_THIS_IS_MY_SECRET_KEY_THAT_IS_LONG_ENOUGH_FOR_VALIDATION'
78+
MERCURE_EXTRA_DIRECTIVES: |-
79+
cors_origins http://localhost
80+
anonymous
81+
# Uncomment the following line to enable the development mode
82+
# command: /usr/bin/caddy run -config /etc/caddy/Caddyfile.dev
83+
ports:
84+
- "8080:80"
85+
# - "8443:443"
86+
87+
opensearch:
88+
image: opensearchproject/opensearch:2
89+
environment:
90+
- cluster.name=opensearch-cluster # Name the cluster
91+
- node.name=opensearch-node # Name the node that will run in this container
92+
- discovery.seed_hosts=opensearch-node # Nodes to look for when discovering the cluster
93+
- cluster.routing.allocation.disk.threshold_enabled=false # Disable disk usage watermark
94+
# - cluster.initial_cluster_manager_nodes=opensearch-node # Nodes eligible to serve as cluster manager
95+
- bootstrap.memory_lock=true # Disable JVM heap memory swapping
96+
- "OPENSEARCH_JAVA_OPTS=-Xms1024m -Xmx1024m" # Set min and max JVM heap sizes to at least 50% of system RAM
97+
- discovery.type=single-node
98+
- action.auto_create_index=false
99+
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=gBsVe!Dut723
100+
ulimits:
101+
memlock:
102+
soft: -1 # Set memlock to unlimited (no soft or hard limit)
103+
hard: -1
104+
nofile:
105+
soft: 65536 # Maximum number of open files for the opensearch user - set to at least 65536
106+
hard: 65536
107+
volumes:
108+
- pimcore-demo-opensearch:/usr/share/opensearch/data
109+
110+
opensearch-dashboards:
111+
image: opensearchproject/opensearch-dashboards:2 # Make sure the version of opensearch-dashboards matches the version of opensearch installed on other nodes
112+
ports:
113+
- 5601:5601
114+
environment:
115+
OPENSEARCH_HOSTS: '["https://opensearch:9200"]'
116+
75117
# The following two services are used for testing.
76118
# We restrict these services to the test profile only, so we don't spin them up with every `docker compose up`.
77119
# See: https://docs.docker.com/compose/profiles/
@@ -103,3 +145,4 @@ volumes:
103145
pimcore-test-database:
104146
pimcore-test-var:
105147
pimcore-test-public-var:
148+
pimcore-demo-opensearch:

src/EventSubscriber/BundleSetupSubscriber.php

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)