Skip to content

Commit 029fea4

Browse files
author
Diogo Ferraz
committed
fix(client): add docker-specific environment for OIDC and API hostnames
1 parent dcb5d88 commit 029fea4

4 files changed

Lines changed: 33 additions & 2 deletions

File tree

.github/workflows/docker-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
context: .
3232
file: Dockerfile
3333
build-args: |
34-
BUILD_CONFIGURATION=development
34+
BUILD_CONFIGURATION=docker
3535
platforms: linux/amd64,linux/arm64
3636
push: true
3737
tags: |

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ RUN npm ci
77

88
COPY . .
99

10-
ARG BUILD_CONFIGURATION=production
10+
ARG BUILD_CONFIGURATION=docker
1111
RUN npm run build -- --configuration=${BUILD_CONFIGURATION}
1212

1313
FROM nginx:1.27-alpine AS runtime

angular.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,17 @@
7070
"with": "src/environments/environment.development.ts"
7171
}
7272
]
73+
},
74+
"docker": {
75+
"optimization": false,
76+
"extractLicenses": false,
77+
"sourceMap": false,
78+
"fileReplacements": [
79+
{
80+
"replace": "src/environments/environment.ts",
81+
"with": "src/environments/environment.docker.ts"
82+
}
83+
]
7384
}
7485
},
7586
"defaultConfiguration": "production"
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { AppEnvironment } from '../app/core/config/app-environment';
2+
3+
export const environment: AppEnvironment = {
4+
production: false,
5+
apiBaseUrl: 'https://api.localhost',
6+
authApiBaseUrl: 'https://auth.localhost',
7+
activityHubPath: '/hubs/activity',
8+
debugAuth: {
9+
enabled: false,
10+
allowedHosts: ['app.localhost']
11+
},
12+
auth: {
13+
authority: 'https://auth.localhost',
14+
clientId: 'angular-client',
15+
redirectUri: 'https://app.localhost/callback',
16+
postLogoutRedirectUri: 'https://app.localhost',
17+
responseType: 'code',
18+
scopes: ['openid', 'profile', 'email', 'roles', 'api1']
19+
}
20+
};

0 commit comments

Comments
 (0)