Pass through environemnt to godot application

develop
Hecht 6 months ago
parent feaea48950
commit 4056013e4f

@ -16,7 +16,7 @@
###> symfony/framework-bundle ###
APP_ENV=dev
APP_SECRET=30741bdb272c30098a12fa66d60c4c85
APP_SECRET=70b8aa8527719d24d913b1193cdc961c
###< symfony/framework-bundle ###
###> doctrine/doctrine-bundle ###

1347
composer.lock generated

File diff suppressed because it is too large Load Diff

@ -1,6 +1,7 @@
<?php
namespace App\Controller;
use App\Kernel;
use App\Security\AccessTokenHandler;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
@ -9,7 +10,7 @@ use Symfony\Component\Routing\Annotation\Route;
class ClientLoaderController extends AbstractController
{
public function __construct(private AccessTokenHandler $handler)
public function __construct(private Kernel $kernel, private AccessTokenHandler $handler)
{}
#[Route('/login/{slug}', name: 'app_client_loader')]
@ -22,6 +23,7 @@ class ClientLoaderController extends AbstractController
return $this->render('client_loader/index.html.twig',
[
'env' => $this->kernel->getEnvironment(),
'controller_name' => $authName,
'token' => $this->handler->encodeMessage($authName, 'AUTH_SEED'),
'size_wasm' => $size_wasm,

@ -137,7 +137,7 @@ body {
<script src="{{ asset('godot/index.js') }}"></script>
<script>
const GODOT_CONFIG = {"args":["--", "--token={{ token }}"],"canvasResizePolicy":2,"executable":"{{ asset('godot/index') }}","experimentalVK":false,"fileSizes":{"{{ asset('godot/index.pck') }}":355472,"{{ asset('godot/index.wasm') }}":35708238},"focusCanvas":true,"gdextensionLibs":[]};
const GODOT_CONFIG = {"args":["--", "--token={{ token }}", "--env={{ env }}"],"canvasResizePolicy":2,"executable":"{{ asset('godot/index') }}","experimentalVK":false,"fileSizes":{"{{ asset('godot/index.pck') }}":355472,"{{ asset('godot/index.wasm') }}":35708238},"focusCanvas":true,"gdextensionLibs":[]};
const engine = new Engine(GODOT_CONFIG);
(function () {

@ -0,0 +1,4 @@
git pull
composer install --no-dev --optimize-autoloade
php bin/console doctrine:migrations:migrate --no-interaction
composer dump-env prod
Loading…
Cancel
Save