diff --git a/DockerFile.staging b/DockerFile.staging new file mode 100644 index 0000000000000000000000000000000000000000..5b57e1b90f630ef9e8cb45de7af3e7665025bc72 --- /dev/null +++ b/DockerFile.staging @@ -0,0 +1,12 @@ +### STAGE 1: Build ### +FROM node:12.7-alpine AS build +WORKDIR /usr/src/app +COPY package.json package-lock.json ./ +RUN npm install +COPY . . +RUN npm run build-staging + +### STAGE 2: Run ### +FROM nginx:1.17.1-alpine +COPY nginx.conf /etc/nginx/nginx.conf +COPY --from=build /usr/src/app/dist/register-front /usr/share/nginx/html diff --git a/angular.json b/angular.json index 884e38f996354068b4368c22c7f3f4266b97892a..19162a802a97c4509952b3ebafb9a640cd649781 100644 --- a/angular.json +++ b/angular.json @@ -67,6 +67,14 @@ "maximumError": "10kb" } ] + }, + "staging": { + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.staging.ts" + } + ] } } }, diff --git a/package.json b/package.json index 02da5ba68f1ec8713c870d8ee1c9fc3cc77fd204..a591476af771adeb84f429198106b6daebf63a6c 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "ng": "ng", "start": "ng serve", "build": "ng build --prod", + "build-staging": "ng build --configuration staging", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" diff --git a/src/app/datasets/datasets.component.ts b/src/app/datasets/datasets.component.ts index 39907f918cc48207a632d24c6213cb7b6c97138c..b1979323837003c95be0172b5d2823568a24d6bc 100644 --- a/src/app/datasets/datasets.component.ts +++ b/src/app/datasets/datasets.component.ts @@ -3,7 +3,7 @@ import { DatasetCrudService } from './services/dataset-crud.service'; import { OpenApi } from '../publishapi/class/openapi'; import { ParameterType } from '../publishapi/class/openapi-enum'; import { OpenApiTag } from '../publishapi/class/openapi-dto'; -import { environment } from 'src/environments/environment.prod'; +import { environment } from 'src/environments/environment'; import { NbStepperComponent } from '@nebular/theme'; import { DatasetsDialogComponent } from './datasets-dialog/datasets-dialog.component'; import { MatDialog } from '@angular/material/dialog'; diff --git a/src/app/mapping/mapping.component.ts b/src/app/mapping/mapping.component.ts index 3f2aae0965b8f62b07a75b36d25f9672a252eef7..6e3276728d4805de82e6915187ba1075ef060e1a 100644 --- a/src/app/mapping/mapping.component.ts +++ b/src/app/mapping/mapping.component.ts @@ -8,7 +8,7 @@ import { Router } from '@angular/router'; import { Observable, of, Subscription } from 'rxjs'; import { map } from 'rxjs/operators'; -import { environment } from 'src/environments/environment.prod'; +import { environment } from 'src/environments/environment'; import { TokenStorageService } from '../authentication/services/token-storage.service'; import { DatasetCrudService } from '../datasets/services/dataset-crud.service'; diff --git a/src/app/repository/repository.component.ts b/src/app/repository/repository.component.ts index 2b4f02404296f20a59080951e27ff848192fc65a..e1d5ae3523855cc4868814ca010fb945ff7ebbb2 100644 --- a/src/app/repository/repository.component.ts +++ b/src/app/repository/repository.component.ts @@ -3,7 +3,7 @@ import { Validators } from '@angular/forms'; import { FileSaverService } from 'ngx-filesaver'; import { FormControl } from '@angular/forms'; import { FormGroup } from '@angular/forms'; -import { environment } from 'src/environments/environment.prod'; +import { environment } from 'src/environments/environment'; import { PublishRepositoryService } from './services/publish-repository.service'; import { NbGlobalPhysicalPosition, NbToastrService } from '@nebular/theme'; import { Router } from '@angular/router'; diff --git a/src/app/search/search.component.ts b/src/app/search/search.component.ts index 564ca61ccc73769fee0d9f051ef3591f3992d654..3f21a45cb702910a908d62950eec175fabb40b9a 100644 --- a/src/app/search/search.component.ts +++ b/src/app/search/search.component.ts @@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core'; import { HttpClient, HttpHeaders } from '@angular/common/http'; import { ParseXmlService } from '../services/parse-xml.service'; import { FormBuilder, FormControl, FormGroup } from '@angular/forms'; -import { environment } from 'src/environments/environment.prod'; +import { environment } from 'src/environments/environment'; export interface formData{ diff --git a/src/app/settingfdp/settingfdp.component.ts b/src/app/settingfdp/settingfdp.component.ts index 855e4b96736d752fcab89e627869c3312617eee0..41507546fd1780d8eac37cebc92620a8d7f0f152 100644 --- a/src/app/settingfdp/settingfdp.component.ts +++ b/src/app/settingfdp/settingfdp.component.ts @@ -4,8 +4,8 @@ import { HttpClient } from '@angular/common/http'; import { FileSaverService } from 'ngx-filesaver'; import { FormControl} from '@angular/forms'; import { FormGroup} from '@angular/forms'; -import { Observable } from 'rxjs'; -import { environment } from 'src/environments/environment.prod'; +import { environment } from 'src/environments/environment'; + @Component({ selector: 'app-settingfdp', diff --git a/src/environments/environment.staging.ts b/src/environments/environment.staging.ts new file mode 100644 index 0000000000000000000000000000000000000000..1946fcc6f766811d8acde218cf3e38da8ed99720 --- /dev/null +++ b/src/environments/environment.staging.ts @@ -0,0 +1,5 @@ +export const environment = { + production: false, + smartharvesterUrl: 'https://f2ds-dev.eosc-pillar.eu', + fdpUrl: 'https://f2ds-dev.eosc-pillar.eu' + }; \ No newline at end of file diff --git a/version b/version index 62ccda57fa53241f87ce3c272b4890f98327ed5c..17784d15215829076603fd24083dee3acf3f57f3 100644 --- a/version +++ b/version @@ -1 +1 @@ -v19 +v19.0.1