Skip to content

Commit 580c0ac

Browse files
authored
Enable preloading (#140)
1 parent 4ff0fd6 commit 580c0ac

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.symfony.cloud.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ web:
2020

2121
disk: 2048
2222

23+
variables:
24+
php:
25+
opcache.preload: /app/config/preload.php
26+
2327
mounts:
2428
'/var': { source: local, source_path: var }
2529

config/preload.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
if (file_exists(dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php')) {
4+
require dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php';
5+
}

0 commit comments

Comments
 (0)