Commit c88f8f14 authored by rajkumar's avatar rajkumar
Browse files

changes done for setting basePath for docker build

parent da508418
Pipeline #136220 canceled with stages
in 9 minutes and 28 seconds
......@@ -22,7 +22,7 @@ docker-build-dev:
- triggers
script:
- docker login $CI_REGISTRY -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
- docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG --build-arg configuration=dev context=/ena/dev/submit/webin .
- docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG --build-arg configuration=dev --build-arg --basePath=/ena/dev/submit/webin/ .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
docker-build-test:
......@@ -34,7 +34,7 @@ docker-build-test:
- triggers
script:
- docker login $CI_REGISTRY -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
- docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG --build-arg configuration=test .
- docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG --build-arg configuration=test --build-arg --basePath=/ena/submit/webin/ .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
#docker-build-prod:
......@@ -59,7 +59,7 @@ docker-build-prod:
- triggers
script:
- docker login $CI_REGISTRY -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
- docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG --build-arg configuration=production .
- docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG --build-arg configuration=production --build-arg --basePath=/ena/submit/webin/ .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
......
......@@ -5,10 +5,12 @@ COPY package.json package-lock.json ./
RUN npm install
COPY . .
ARG configuration
RUN node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng build --configuration $configuration --base-href=$context --deploy-url=$contect --build-arg
ARG basePath
RUN node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng build --configuration $configuration --base-href=$basePath
### STAGE 2: Run ###
FROM nginx:1.17.1-alpine
COPY nginx.conf /etc/nginx/nginx.conf
COPY --from=build /usr/src/app/dist/webin-portal /usr/share/nginx/html
COPY --from=build /usr/src/app/dist/webin-portal /usr/share/nginx/html/ena/submit/webin
ARG basePath
COPY --from=build /usr/src/app/dist/webin-portal /usr/share/nginx/html${basePath}
\ No newline at end of file
......@@ -11,8 +11,6 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"baseHref": "/ena/submit/webin/",
"deployUrl": "/ena/submit/webin/",
"outputPath": "dist/webin-portal",
"index": "src/index.html",
"main": "src/main.ts",
......@@ -172,4 +170,4 @@
"prefix": "app"
}
}
}
}
\ No newline at end of file
......@@ -44,7 +44,7 @@ export class LoginComponent implements OnInit {
ngOnInit() {
// console.log('LoginComponent.ngOnInit');
if (this._webinAuthenticationService.authenticated) {
this._router.navigateByUrl('');
//this._router.navigateByUrl('');
}
this.getTweet();
......
......@@ -17,7 +17,7 @@
<ul id="local-nav" class="dropdown menu float-left" data-description="navigational">
<li><a href="https://www.ebi.ac.uk/ena/browser/support">Support <i class="icon icon-generic"
data-icon="x"></i></a></li> <!-- ** Application specific content ** -->
<li *ngIf="isAuthenticated()"><a href="logout">Logout
<li *ngIf="isAuthenticated()"><a [routerLink]="['/login']">Logout
<span>({{getAccount()}})</span> <!-- ** Application specific content ** -->
</a></li>
</ul>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment