outsource env vars to docker compose vars #7

Closed
csimonis wants to merge 7 commits from feature/docker-env into main
4 changed files with 36 additions and 7 deletions

2
.env
View File

@ -19,4 +19,4 @@ APP_ENV=dev
APP_SECRET=bfc9c288ee3dcce80dec8622c2870f27
###< symfony/framework-bundle ###
DATA_DIR='/var/www/html/data'
DATA_DIR=/var/www/data

View File

@ -1,10 +1,10 @@
name: build
on:
pull_request:
types:
- closed
branches:
- main
on: push
# pull_request:
# types:
# - closed
# branches:
# - main
jobs:
build:
runs-on: ubuntu-latest

View File

@ -18,3 +18,9 @@ RUN pecl install apcu && docker-php-ext-enable apcu
WORKDIR /var/www/project
RUN composer install --optimize-autoloader --no-suggest --no-progress
RUN composer dump-env prod
RUN php bin/console tailwind:build
RUN php bin/console asset-map:compile
RUN mkdir -p /var/www/data
RUN chown -R www-data:www-data /var/www/data
RUN chown -R www-data:www-data .

23
src/test.php Normal file
View File

@ -0,0 +1,23 @@
<?php
declare(strict_types=1);
namespace App;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\ExceptionEvent;
use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
use Symfony\Component\HttpKernel\KernelEvents;
class test implements EventSubscriberInterface
{
public static function getSubscribedEvents()
{
return [KernelEvents::EXCEPTION => 'x'];
}
public function x(ExceptionEvent $event)
{
dd($event->getThrowable());
}
}