mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 16:35:19 +00:00
control/expose symfony through presence of .env file
This commit is contained in:
parent
59dbd66037
commit
52665f6b0f
3 changed files with 12 additions and 37 deletions
37
.env
37
.env
|
@ -1,37 +0,0 @@
|
||||||
|
|
||||||
###> symfony/mailer ###
|
|
||||||
# MAILER_DSN=null://null
|
|
||||||
###< symfony/mailer ###
|
|
||||||
|
|
||||||
###> symfony/framework-bundle ###
|
|
||||||
APP_ENV=dev
|
|
||||||
APP_SECRET=b2e0b4744a825057deefb2b8d6cf7d50
|
|
||||||
###< symfony/framework-bundle ###
|
|
||||||
|
|
||||||
###> doctrine/doctrine-bundle ###
|
|
||||||
# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
|
|
||||||
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
|
|
||||||
#
|
|
||||||
# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db"
|
|
||||||
# DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8.0.32&charset=utf8mb4"
|
|
||||||
# DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=10.11.2-MariaDB&charset=utf8mb4"
|
|
||||||
DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=16&charset=utf8"
|
|
||||||
###< doctrine/doctrine-bundle ###
|
|
||||||
|
|
||||||
###> nelmio/cors-bundle ###
|
|
||||||
CORS_ALLOW_ORIGIN='^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$'
|
|
||||||
###< nelmio/cors-bundle ###
|
|
||||||
|
|
||||||
###> league/oauth2-server-bundle ###
|
|
||||||
OAUTH_PRIVATE_KEY=%kernel.project_dir%/config/jwt/private.pem
|
|
||||||
OAUTH_PUBLIC_KEY=%kernel.project_dir%/config/jwt/public.pem
|
|
||||||
OAUTH_PASSPHRASE=a557f0cd5e33c785227ae08fa111f55a
|
|
||||||
OAUTH_ENCRYPTION_KEY=0a55b0c0d31a601b7a8cfa5427924fa2
|
|
||||||
###< league/oauth2-server-bundle ###
|
|
||||||
|
|
||||||
###> symfony/messenger ###
|
|
||||||
# Choose one of the transports below
|
|
||||||
# MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages
|
|
||||||
# MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages
|
|
||||||
# MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0
|
|
||||||
###< symfony/messenger ###
|
|
6
env
Normal file
6
env
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# define your env variables for the test env here
|
||||||
|
KERNEL_CLASS='App\Kernel'
|
||||||
|
APP_SECRET='$ecretf0rt3st'
|
||||||
|
SYMFONY_DEPRECATIONS_HELPER=999999
|
||||||
|
PANTHER_APP_ENV=panther
|
||||||
|
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots
|
|
@ -18,6 +18,12 @@ use Symfony\Component\HttpFoundation\Request;
|
||||||
require 'vendor/autoload.php';
|
require 'vendor/autoload.php';
|
||||||
require_once 'src/Web/WebServer.php';
|
require_once 'src/Web/WebServer.php';
|
||||||
|
|
||||||
|
if (!file_exists('.env')) {
|
||||||
|
$server = new WebServer();
|
||||||
|
$server->run(null, null, __DIR__);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
(new Dotenv())->bootEnv('.env');
|
(new Dotenv())->bootEnv('.env');
|
||||||
|
|
||||||
global $kernel;
|
global $kernel;
|
||||||
|
|
Loading…
Reference in a new issue