Skip to content

Commit 9465e1f

Browse files
committed
fix: update env names
1 parent 4f55a48 commit 9465e1f

File tree

17 files changed

+45
-35
lines changed

17 files changed

+45
-35
lines changed

.docker/docker-compose-full.env

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@ SERVER_SSO_DEFAULT_PROJECT='default:ru=по умолчанию,KzMRNEZTetzatIgQP
1717

1818
SERVER_SSO_ADMIN_SECRET=VfKSfPPljhHBXCEohnitursmgDxfAyiD
1919

20-
CLIENT_MINIO_URL=http://localhost:9000
20+
SERVER_CLIENT_MINIO_URL=http://localhost:9000
2121
SERVER_SSO_ADMIN_EMAIL=[email protected]
2222
SERVER_SSO_ADMIN_USERNAME=admin
2323
SERVER_SSO_ADMIN_PASSWORD=SbxcbII7RUvCOe9TDXnKhfRrLJW5cGDA
24-
BASE_URL=http://localhost:9090
25-
SERVER_URL=http://localhost:9090/api
2624
SERVER_MINIO_URL=http://localhost:9000
2725

26+
E2E_CLIENT_URL=http://localhost:9090
27+
E2E_SERVER_URL=http://localhost:9090
28+
2829
SERVER_MINIO_SERVER_HOST=nestjs-mod-sso-minio
2930
SERVER_MINIO_ACCESS_KEY=FWGmrAGaeMKM
3031
SERVER_MINIO_SECRET_KEY=QatVJuLoZRARlJguoZMpoKvZMJHzvuOR

.docker/docker-compose-full.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ services:
115115
SERVER_SSO_CLIENT_URL: '${SERVER_SSO_CLIENT_URL}'
116116
SERVER_SSO_GOOGLE_OAUTH_CLIENT_ID: '${SERVER_SSO_GOOGLE_OAUTH_CLIENT_ID}'
117117
SERVER_SSO_GOOGLE_OAUTH_CLIENT_SECRET_KEY: '${SERVER_SSO_GOOGLE_OAUTH_CLIENT_SECRET_KEY}'
118-
CLIENT_MINIO_URL: '${CLIENT_MINIO_URL}'
118+
SERVER_CLIENT_MINIO_URL: '${SERVER_CLIENT_MINIO_URL}'
119119
restart: 'always'
120120
depends_on:
121121
nestjs-mod-sso-minio:

.docker/server.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ EXPOSE 8080
3737
ENV NODE_ENV=production
3838
ENV TZ=UTC
3939
ENV SERVER_PORT=8080
40-
ENV CLIENT_MINIO_URL=http://localhost:9000
40+
ENV SERVER_CLIENT_MINIO_URL=http://localhost:9000
4141
COPY --from=prod-deps /app/node_modules /app/node_modules
4242
COPY --from=prod-deps /app/apps /app/apps
4343
COPY --from=prod-deps /app/libs /app/libs

.github/workflows/kubernetes.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ jobs:
220220
if: ${{ !contains(github.event.head_commit.message, '[skip e2e]') }}
221221
env:
222222
SERVER_SSO_ADMIN_SECRET: ${{ secrets.SERVER_SSO_ADMIN_SECRET }}
223-
BASE_URL: 'https://${{ secrets.SERVER_DOMAIN }}'
224-
SERVER_URL: 'https://${{ secrets.SERVER_DOMAIN }}'
223+
E2E_CLIENT_URL: 'https://${{ secrets.SERVER_DOMAIN }}'
224+
E2E_SERVER_URL: 'https://${{ secrets.SERVER_DOMAIN }}'
225225
SERVER_MINIO_URL: 'https://files.${{ secrets.SERVER_DOMAIN }}'
226226
run: |
227227
npm run test:e2e

.github/workflows/vercel.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,8 @@ jobs:
115115
- name: Run e2e-tests
116116
if: ${{ !contains(github.event.head_commit.message, '[skip e2e]') }}
117117
run: |
118-
export BASE_URL=https://nestjs-mod-fullstack.vercel.app
119-
export CLIENT_URL=https://nestjs-mod-fullstack.vercel.app
120-
export SERVER_URL=https://nestjs-mod-fullstack.vercel.app/api
118+
export E2E_CLIENT_URL=https://nestjs-mod-fullstack.vercel.app
119+
export E2E_SERVER_URL=https://nestjs-mod-fullstack.vercel.app
121120
cp -r .vercel/.env.production.local .env
122121
npx --yes tsx update-files-for-vercel.ts
123122
npx playwright install chromium --with-deps

.kubernetes/templates/server/1.configmap.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ data:
1919
SERVER_MINIO_ACCESS_KEY: '%SERVER_MINIO_MINIO_ROOT_USER%'
2020
SERVER_MINIO_SECRET_KEY: '%SERVER_MINIO_MINIO_ROOT_PASSWORD%'
2121
SERVER_KEYV_URL: 'redis://:%SERVER_REDIS_REDIS_PASSWORD%@%NAMESPACE%-redis.%NAMESPACE%:6379'
22-
CLIENT_MINIO_URL: 'https://files.%SERVER_DOMAIN%'
22+
SERVER_CLIENT_MINIO_URL: 'https://files.%SERVER_DOMAIN%'
2323
SERVER_SSO_CLIENT_URL: 'https://%SERVER_DOMAIN%'
2424
SERVER_SSO_SERVER_URL: 'https://%SERVER_DOMAIN%'
2525
SERVER_SSO_GOOGLE_OAUTH_CLIENT_ID: '%SERVER_SSO_GOOGLE_OAUTH_CLIENT_ID%'

apps/client-e2e/playwright.config.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { join } from 'path';
99
*/
1010
// require('dotenv').config();
1111

12+
const clientUrl = process.env['E2E_CLIENT_URL'];
1213
const parsed = config(
1314
process.env['ENV_FILE']
1415
? {
@@ -22,8 +23,11 @@ if (parsed.error) {
2223
throw parsed.error;
2324
}
2425

25-
// For CI, you may want to set BASE_URL to the deployed application.
26-
const baseURL = process.env['BASE_URL'] || 'http://localhost:4200';
26+
// For CI, you may want to set E2E_CLIENT_URL to the deployed application.
27+
const baseURL =
28+
clientUrl || process.env['E2E_CLIENT_URL'] || 'http://localhost:4200';
29+
30+
process.env['E2E_CLIENT_URL'] = baseURL;
2731

2832
/**
2933
* See https://playwright.dev/docs/test-configuration.
@@ -33,8 +37,8 @@ export default defineConfig({
3337
/* Run tests in files in parallel */
3438
fullyParallel: false,
3539
workers: 1,
36-
maxFailures: 0,
37-
retries: 4,
40+
maxFailures: 10,
41+
retries: 3,
3842
timeout: 120 * 1000,
3943
reporter: [['list']],
4044
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
export const serverUrl = '';
2-
export const minioURL = '___CLIENT_MINIO_URL___';
2+
export const minioURL = '___SERVER_CLIENT_MINIO_URL___';

apps/server-e2e/src/server/time.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe('Get server time from rest api and ws', () => {
1212
'x-skip-throttle': process.env.SERVER_SSO_ADMIN_SECRET,
1313
},
1414
serverUrl: process.env.IS_DOCKER_COMPOSE
15-
? get('CLIENT_URL').asString()
15+
? get('E2E_SERVER_URL').asString()
1616
: undefined,
1717
});
1818
const timeApi = restClientHelper.getTimeApi();

apps/server-e2e/src/server/timezone-time.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe('Get server time from rest api and ws (timezone)', () => {
1212
'x-skip-throttle': process.env.SERVER_SSO_ADMIN_SECRET,
1313
},
1414
serverUrl: process.env.IS_DOCKER_COMPOSE
15-
? get('CLIENT_URL').asString()
15+
? get('E2E_SERVER_URL').asString()
1616
: undefined,
1717
});
1818

0 commit comments

Comments
 (0)