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

Update the env var deployment mapping as well

parent 89a0cd3e
No related branches found
No related tags found
No related merge requests found
Pipeline #64192 passed
......@@ -36,9 +36,10 @@ host('development')
->set('shared_dirs', ['var/log', 'var/sessions'])
->set('APP_ENV', 'prod')
->set('APP_DEBUG', '0')
->set('KEYCLOAK_SERVER_URL', 'https://auth-dev.tugraz.at/auth')
->set('KEYCLOAK_REALM', 'tugraz-vpu')
->set('KEYCLOAK_FRONTEND_CLIENT_ID', 'dbp-api-template-frontend')
->set('AUTH_SERVER_URL', 'https://auth-dev.tugraz.at/auth/realms/tugraz-vpu')
->set('AUTH_APIDOCS_KEYCLOAK_SERVER', 'https://auth-dev.tugraz.at/auth')
->set('AUTH_APIDOCS_KEYCLOAK_REALM', 'tugraz-vpu')
->set('AUTH_APIDOCS_KEYCLOAK_CLIENT_ID', 'dbp-api-template-frontend')
->set('rsync', $rsync_config)
->set('rsync_src', __DIR__.'/../')
->set('rsync_dest', '{{release_path}}')
......@@ -49,12 +50,12 @@ task('build-custom', function () {
$APP_ENV = get('APP_ENV');
$vars = [
'KEYCLOAK_CLIENT_SECRET' => getenv('KEYCLOAK_CLIENT_SECRET'),
'APP_ENV' => $APP_ENV,
'APP_DEBUG' => get('APP_DEBUG'),
'KEYCLOAK_SERVER_URL' => get('KEYCLOAK_SERVER_URL'),
'KEYCLOAK_REALM' => get('KEYCLOAK_REALM'),
'KEYCLOAK_FRONTEND_CLIENT_ID' => get('KEYCLOAK_FRONTEND_CLIENT_ID'),
'AUTH_SERVER_URL' => get('AUTH_SERVER_URL'),
'AUTH_APIDOCS_KEYCLOAK_SERVER' => get('AUTH_APIDOCS_KEYCLOAK_SERVER'),
'AUTH_APIDOCS_KEYCLOAK_REALM' => get('AUTH_APIDOCS_KEYCLOAK_REALM'),
'AUTH_APIDOCS_KEYCLOAK_CLIENT_ID' => get('AUTH_APIDOCS_KEYCLOAK_CLIENT_ID'),
];
// build .env.local file
......@@ -68,7 +69,7 @@ task('build-custom', function () {
// Add build commit
$commit = runLocally('git rev-parse --short HEAD');
runLocally("echo \"API_BUILDINFO=${commit}\" >> .env.local");
runLocally("echo \"CORE_API_BUILDINFO=${commit}\" >> .env.local");
// Add commit url to gitlab
$remote = runLocally('git config --get remote.origin.url');
......@@ -76,7 +77,7 @@ task('build-custom', function () {
$parts['path'] = substr($parts['path'], 0, (strrpos($parts['path'], '.')));
$base_url = $parts['scheme'].'://'.$parts['host'].$parts['path'];
$build_url = $base_url.'/'.rawurlencode('commit').'/'.rawurlencode($commit);
runLocally("echo \"API_BUILDINFO_URL=${build_url}\" >> .env.local");
runLocally("echo \"CORE_API_BUILDINFO_URL=${build_url}\" >> .env.local");
// composer install and optimize
runLocally('composer install --no-dev --classmap-authoritative');
......
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