Skip to content

Commit fcdafc8

Browse files
committed
hotfix deployment
1 parent 9f2b9b5 commit fcdafc8

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ RUN composer install --no-dev --optimize-autoloader
3333
COPY . .
3434

3535
# Move vendor folder to the correct location
36-
RUN mv vendor src/private/vendor
36+
RUN rm -rf src/private/vendor && mv vendor src/private/vendor
3737

3838
# Set permissions
3939
RUN chown -R www-data:www-data /var/www/html/src/private/uploads

src/private/utils.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,17 @@
1111
use PDO;
1212

1313
# start vendors
14-
require realpath(__DIR__ . '/vendor/autoload.php');
14+
$autoloadPath = __DIR__ . '/vendor/autoload.php';
15+
if (!is_file($autoloadPath)) {
16+
$nestedPath = __DIR__ . '/vendor/vendor/autoload.php';
17+
if (is_file($nestedPath)) {
18+
$autoloadPath = $nestedPath;
19+
}
20+
}
21+
if (!is_file($autoloadPath)) {
22+
throw new \RuntimeException('Composer autoload.php not found.');
23+
}
24+
require $autoloadPath;
1525

1626
# change timezone
1727
date_default_timezone_set('Europe/Madrid');

0 commit comments

Comments
 (0)