Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dbp-relay-server-template
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
digital blueprint
Relay API Gateway
dbp-relay-server-template
Commits
13799fa2
Commit
13799fa2
authored
3 years ago
by
Reiter, Christoph
Browse files
Options
Downloads
Patches
Plain Diff
Stop using the APP_ prefix for custom env vars
It's used by symfony, use API_ instead
parent
aa4dc515
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.env
+2
-5
2 additions, 5 deletions
.env
.gitlab-ci/deploy.php
+4
-4
4 additions, 4 deletions
.gitlab-ci/deploy.php
config/packages/dbp_core.yaml
+2
-2
2 additions, 2 deletions
config/packages/dbp_core.yaml
src/Kernel.php
+1
-1
1 addition, 1 deletion
src/Kernel.php
with
9 additions
and
12 deletions
.env
+
2
−
5
View file @
13799fa2
...
@@ -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'
This diff is collapsed.
Click to expand it.
.gitlab-ci/deploy.php
+
4
−
4
View file @
13799fa2
...
@@ -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
(
'AP
P
_DEPLOYMENT_ENV'
,
'development'
)
->
set
(
'AP
I
_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'
),
'AP
P
_DEPLOYMENT_ENV'
=>
get
(
'AP
P
_DEPLOYMENT_ENV'
),
'AP
I
_DEPLOYMENT_ENV'
=>
get
(
'AP
I
_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
\"
AP
P
_BUILDINFO=${commit}
\"
>> .env.local"
);
runLocally
(
"echo
\"
AP
I
_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
\"
AP
P
_BUILDINFO_URL=${build_url}
\"
>> .env.local"
);
runLocally
(
"echo
\"
AP
I
_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'
);
...
...
This diff is collapsed.
Click to expand it.
config/packages/dbp_core.yaml
+
2
−
2
View file @
13799fa2
dbp_core
:
dbp_core
:
build_info
:
'
%env(AP
P
_BUILDINFO)%'
build_info
:
'
%env(AP
I
_BUILDINFO)%'
build_info_url
:
'
%env(AP
P
_BUILDINFO_URL)%'
build_info_url
:
'
%env(AP
I
_BUILDINFO_URL)%'
This diff is collapsed.
Click to expand it.
src/Kernel.php
+
1
−
1
View file @
13799fa2
...
@@ -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
[
'AP
P
_DEPLOYMENT_ENV'
],
[
'local'
,
'development'
],
true
);
$ignoreErrors
=
!
in_array
(
$_ENV
[
'AP
I
_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'
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment