Skip to content
Snippets Groups Projects
Commit 13799fa2 authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Stop using the APP_ prefix for custom env vars

It's used by symfony, use API_ instead
parent aa4dc515
No related branches found
No related tags found
No related merge requests found
...@@ -30,8 +30,5 @@ KEYCLOAK_CLIENT_ID= ...@@ -30,8 +30,5 @@ KEYCLOAK_CLIENT_ID=
KEYCLOAK_CLIENT_SECRET= KEYCLOAK_CLIENT_SECRET=
# Deployment related # Deployment related
APP_BUILDINFO=unknown # a git hash or something identifying the build API_BUILDINFO=unknown # a git hash or something identifying the build
APP_BUILDINFO_URL='#' API_BUILDINFO_URL='#'
# Defines the deployment environment
APP_DEPLOYMENT_ENV='local'
...@@ -35,7 +35,7 @@ host('development') ...@@ -35,7 +35,7 @@ host('development')
->set('shared_dirs', ['var/log', 'var/sessions']) ->set('shared_dirs', ['var/log', 'var/sessions'])
->set('APP_ENV', 'prod') ->set('APP_ENV', 'prod')
->set('APP_DEBUG', '0') ->set('APP_DEBUG', '0')
->set('APP_DEPLOYMENT_ENV', 'development') ->set('API_DEPLOYMENT_ENV', 'development')
->set('KEYCLOAK_SERVER_URL', 'https://auth-dev.tugraz.at/auth') ->set('KEYCLOAK_SERVER_URL', 'https://auth-dev.tugraz.at/auth')
->set('KEYCLOAK_CLIENT_ID', 'auth-dev-mw-dev') ->set('KEYCLOAK_CLIENT_ID', 'auth-dev-mw-dev')
->set('KEYCLOAK_FRONTEND_CLIENT_ID', 'auth-dev-mw-frontend') ->set('KEYCLOAK_FRONTEND_CLIENT_ID', 'auth-dev-mw-frontend')
...@@ -52,7 +52,7 @@ task('build-custom', function () { ...@@ -52,7 +52,7 @@ task('build-custom', function () {
'KEYCLOAK_CLIENT_SECRET' => getenv('KEYCLOAK_CLIENT_SECRET'), 'KEYCLOAK_CLIENT_SECRET' => getenv('KEYCLOAK_CLIENT_SECRET'),
'APP_ENV' => $APP_ENV, 'APP_ENV' => $APP_ENV,
'APP_DEBUG' => get('APP_DEBUG'), 'APP_DEBUG' => get('APP_DEBUG'),
'APP_DEPLOYMENT_ENV' => get('APP_DEPLOYMENT_ENV'), 'API_DEPLOYMENT_ENV' => get('API_DEPLOYMENT_ENV'),
'KEYCLOAK_SERVER_URL' => get('KEYCLOAK_SERVER_URL'), 'KEYCLOAK_SERVER_URL' => get('KEYCLOAK_SERVER_URL'),
'KEYCLOAK_CLIENT_ID' => get('KEYCLOAK_CLIENT_ID'), 'KEYCLOAK_CLIENT_ID' => get('KEYCLOAK_CLIENT_ID'),
'KEYCLOAK_FRONTEND_CLIENT_ID' => get('KEYCLOAK_FRONTEND_CLIENT_ID'), 'KEYCLOAK_FRONTEND_CLIENT_ID' => get('KEYCLOAK_FRONTEND_CLIENT_ID'),
...@@ -69,7 +69,7 @@ task('build-custom', function () { ...@@ -69,7 +69,7 @@ task('build-custom', function () {
// Add build commit // Add build commit
$commit = runLocally('git rev-parse --short HEAD'); $commit = runLocally('git rev-parse --short HEAD');
runLocally("echo \"APP_BUILDINFO=${commit}\" >> .env.local"); runLocally("echo \"API_BUILDINFO=${commit}\" >> .env.local");
// Add commit url to gitlab // Add commit url to gitlab
$remote = runLocally('git config --get remote.origin.url'); $remote = runLocally('git config --get remote.origin.url');
...@@ -77,7 +77,7 @@ task('build-custom', function () { ...@@ -77,7 +77,7 @@ task('build-custom', function () {
$parts['path'] = substr($parts['path'], 0, (strrpos($parts['path'], '.'))); $parts['path'] = substr($parts['path'], 0, (strrpos($parts['path'], '.')));
$base_url = $parts['scheme'].'://'.$parts['host'].$parts['path']; $base_url = $parts['scheme'].'://'.$parts['host'].$parts['path'];
$build_url = $base_url.'/'.rawurlencode('commit').'/'.rawurlencode($commit); $build_url = $base_url.'/'.rawurlencode('commit').'/'.rawurlencode($commit);
runLocally("echo \"APP_BUILDINFO_URL=${build_url}\" >> .env.local"); runLocally("echo \"API_BUILDINFO_URL=${build_url}\" >> .env.local");
// composer install and optimize // composer install and optimize
runLocally('composer install --no-dev --classmap-authoritative'); runLocally('composer install --no-dev --classmap-authoritative');
......
dbp_core: dbp_core:
build_info: '%env(APP_BUILDINFO)%' build_info: '%env(API_BUILDINFO)%'
build_info_url: '%env(APP_BUILDINFO_URL)%' build_info_url: '%env(API_BUILDINFO_URL)%'
...@@ -17,7 +17,7 @@ class Kernel extends BaseKernel ...@@ -17,7 +17,7 @@ class Kernel extends BaseKernel
{ {
// Ignore all errors in case we are not local/development. We disable some // Ignore all errors in case we are not local/development. We disable some
// bundles in demo/prod which leads to unused config, which symfony fails over. // bundles in demo/prod which leads to unused config, which symfony fails over.
$ignoreErrors = !in_array($_ENV['APP_DEPLOYMENT_ENV'], ['local', 'development'], true); $ignoreErrors = !in_array($_ENV['API_DEPLOYMENT_ENV'], ['local', 'development'], true);
$container->import('../config/{packages}/*.yaml', null, $ignoreErrors); $container->import('../config/{packages}/*.yaml', null, $ignoreErrors);
$container->import('../config/{packages}/'.$this->environment.'/*.yaml'); $container->import('../config/{packages}/'.$this->environment.'/*.yaml');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment