Skip to content

Commit 8434f59

Browse files
committed
adding CLIENT_URL(GOOGLE) and API_URL(target_backend) as env-vars
1 parent 2e720a5 commit 8434f59

File tree

9 files changed

+13
-2
lines changed

9 files changed

+13
-2
lines changed

.github/workflows/CD-time-tracker-ui.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ jobs:
2828

2929
- name: Inject Secrets
3030
env:
31+
API_URL: ${{ secrets.api_url }}
3132
SCOPES: ${{ secrets.scopes }}
3233
CLIENT_ID: ${{ secrets.client_id }}
34+
CLIENT_URL: ${{ secrets.client_url }} #IMPORTANT THIS PROPERTY HAS TO BE REQUESTED FROM ALEXANDER ARCOS he is the owner and this secrets needs to be created in github-repo
3335
AUTHORITY: ${{ secrets.authority }}
3436
STACK_EXCHANGE_ID: ${{ secrets.stack_exchange_id }}
3537
STACK_EXCHANGE_ACCESS_TOKEN: ${{ secrets.stack_exchange_access_token }}

.github/workflows/CI-time-tracker-ui.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ jobs:
4141

4242
- name: Inject Secrets
4343
env:
44+
API_URL : ${{ secrets.API_URL }}
45+
CLIENT_URL : ${{ secrets.CLIENT_URL }}
4446
SCOPES: ${{ secrets.SCOPES }}
4547
CLIENT_ID: ${{ secrets.CLIENT_ID }}
4648
AUTHORITY: ${{ secrets.AUTHORITY }}

.github/workflows/time-tracker-ui-cd-stage.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
- name: Inject Secrets
3636
env:
3737
SCOPES: ${{ secrets.SCOPES }}
38+
API_URL: ${{ secrets.API_URL_STAGE }}
3839
CLIENT_ID: ${{ secrets.CLIENT_ID_STAGE }}
3940
CLIENT_URL: ${{ secrets.CLIENT_URL_STAGE }}
4041
AUTHORITY: ${{ secrets.AUTHORITY }}

.github/workflows/time-tracker-ui-ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535

3636
- name: Inject Secrets
3737
env:
38+
API_URL: ${{ secrets.API_URL_STAGE }}
3839
SCOPES: ${{ secrets.SCOPES }}
3940
CLIENT_ID: ${{ secrets.CLIENT_ID_STAGE }}
4041
CLIENT_URL: ${{ secrets.CLIENT_URL_STAGE }}

docker-compose.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ services:
1010
- 4200:4200
1111
- 9876:9876
1212
environment:
13+
API_URL: ${API_URL}
1314
AUTHORITY: ${AUTHORITY}
1415
CLIENT_ID: ${CLIENT_ID}
1516
CLIENT_URL: ${CLIENT_URL}
@@ -40,7 +41,9 @@ services:
4041
- 9876:9876
4142
environment:
4243
CHROME_BIN: /opt/google/chrome/google-chrome
44+
API_URL: ${API_URL}
4345
AUTHORITY: ${AUTHORITY}
46+
CLIENT_URL: ${CLIENT_URL}
4447
CLIENT_ID: ${CLIENT_ID}
4548
SCOPES: ${SCOPES}
4649
STACK_EXCHANGE_ID: ${STACK_EXCHANGE_ID}

scripts/populate-keys.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22

33
> .env
4+
echo "API_URL='$API_URL'" >> .env
45
echo "AUTHORITY='$AUTHORITY'" >> .env
56
echo "CLIENT_ID='$CLIENT_ID'" >> .env
67
echo "CLIENT_URL='$CLIENT_URL'" >> .env

src/environments/environment.prod.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
export const environment = {
33
production: true,
4-
timeTrackerApiUrl: 'https://timetracker-api.azurewebsites.net',
4+
timeTrackerApiUrl: process.env["API_URL"],
55
stackexchangeApiUrl: 'https://api.stackexchange.com',
66
};
77

src/environments/environment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
export const environment = {
66
production: false,
7-
timeTrackerApiUrl: 'http://localhost:7071/api',
7+
timeTrackerApiUrl: process.env["API_URL"],
88
stackexchangeApiUrl: 'https://api.stackexchange.com',
99
};
1010

webpack.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ module.exports = (config) => {
99
...config.plugins,
1010
new webpack.DefinePlugin({
1111
'process.env.AUTHORITY': JSON.stringify(process.env["AUTHORITY"]),
12+
'process.env.API_URL':JSON.stringify(process.env["API_URL"]),
1213
'process.env.CLIENT_ID':JSON.stringify(process.env["CLIENT_ID"]),
1314
'process.env.CLIENT_URL':JSON.stringify(process.env["CLIENT_URL"]),
1415
'process.env.SCOPES':JSON.stringify(process.env["SCOPES"]),

0 commit comments

Comments
 (0)