Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
6b14893
IBX-10764: Upsun env var loader
barw4 Oct 29, 2025
1dcb8a6
IBX-10764: Add unit tests
barw4 Oct 30, 2025
50e1948
IBX-10764: Add unit tests for dfs
barw4 Oct 31, 2025
33c2aea
IBX-10764: Baseline
barw4 Oct 31, 2025
c58d245
IBX-10764: Bundle boot
barw4 Nov 3, 2025
7e6946e
IBX-10764: Add test env
barw4 Nov 5, 2025
72abd61
IBX-10764: Fixup
barw4 Nov 28, 2025
572e4a5
IBX-10764: Added container configuration
barw4 Nov 28, 2025
dc65c7e
IBX-10764: Refactor service files loading
barw4 Nov 28, 2025
566c78b
IBX-10764: Added database URLs handling
barw4 Dec 1, 2025
30dda5b
IBX-10764: Update
barw4 Dec 4, 2025
669073a
IBX-10764: Update loader
barw4 Dec 6, 2025
999982c
IBX-10764: Updated tests
barw4 Dec 8, 2025
89e5974
IBX-10764: Cleared PHPStan baseline
barw4 Dec 8, 2025
299c84b
IBX-10764: CS
barw4 Dec 8, 2025
313bd2b
IBX-10764: Update
barw4 Dec 8, 2025
67bf063
IBX-10764: Update
barw4 Dec 8, 2025
71d77a9
IBX-10764: Updated test
barw4 Dec 8, 2025
1c2bbfc
IBX-10764: Updated loader
barw4 Dec 8, 2025
726d3f3
IBX-10764: Rollback
barw4 Dec 8, 2025
fe60401
Added `APP_SECRET` logic handling
barw4 Jan 16, 2026
2dfd7f0
Updated tests
barw4 Jan 19, 2026
05471ec
Fixup
barw4 Jan 19, 2026
1b1515c
Fixup
barw4 Jan 20, 2026
52de649
Handled Valkey
barw4 Jan 23, 2026
1cf899e
Updated info on Elasticsearch
barw4 Jan 23, 2026
0aba7fc
Fixed handling of HTTPCACHE_VARNISH_INVALIDATE_TOKEN
barw4 Jan 23, 2026
39f0601
Updated deprecation method when using Memcached
barw4 Jan 23, 2026
12c92a5
Applied review remarks
barw4 Jan 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
6 changes: 2 additions & 4 deletions resources/upsun/common/5.0/.platform/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,8 @@ solrsearch:
collection1:
core: collection1

# If you wish to use elasticsearch, uncomment this service and the corresponding relationship in .platform.app.yaml.
#elasticsearch:
# type: elasticsearch:7.17
# disk: 512
# If you wish to use Elasticsearch, uncomment the corresponding relationship in .platform.app.yaml
# and see documentation on how to define ES service: https://docs.upsun.com/add-services/elasticsearch.html

# Due to logic in Ibexa\Bundle\Core\DependencyInjection\IbexaCoreExtension, do not change the service name to something different from 'varnish'
varnish:
Expand Down
47 changes: 47 additions & 0 deletions src/bundle/DependencyInjection/IbexaCloudExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public function load(array $configs, ContainerBuilder $container): void

public function prepend(ContainerBuilder $container): void
{
$this->configureUpsunSetup($container);
$this->prependDefaultConfiguration($container);
$this->prependJMSTranslation($container);
}
Expand Down Expand Up @@ -73,4 +74,50 @@ private function shouldLoadTestServices(ContainerBuilder $container): bool
return $container->hasParameter('ibexa.behat.browser.enabled')
&& true === $container->getParameter('ibexa.behat.browser.enabled');
}

private function configureUpsunSetup(ContainerBuilder $container): void
{
$envVars = (new UpsunEnvVarLoader())->loadEnvVars();

if (($_SERVER['HTTPCACHE_PURGE_TYPE'] ?? $_ENV['HTTPCACHE_PURGE_TYPE'] ?? null) === 'varnish') {
$container->setParameter('ibexa.http_cache.purge_type', 'varnish');
}

// Cannot be placed as env var due to how LiipImagineBundle processes its config
if (\extension_loaded('imagick')) {
$container->setParameter('liip_imagine_driver', 'imagick');
}

$projectDir = $container->getParameter('kernel.project_dir');
assert(is_string($projectDir));

if (isset($envVars['DFS_NFS_PATH'])) {
$loader = new YamlFileLoader(
$container,
new FileLocator($projectDir . '/config/packages/dfs')
);
$loader->load('dfs.yaml');
}

if (!isset($envVars['CACHE_POOL'])) {
return;
}

$cacheType = $envVars['CACHE_POOL'];
$configFile = match ($cacheType) {
'cache.redis' => 'cache.redis.yaml',
'cache.memcached' => 'cache.memcached.yaml',
default => null,
};

if ($configFile === null) {
return;
}

$loader = new YamlFileLoader(
$container,
new FileLocator($projectDir . '/config/packages/cache_pool')
);
$loader->load($configFile);
}
}
Loading
Loading