improve deployment

- customer angular app: add base-href and deploy url

- botond_daily.sh : allow daily scripts
This commit is contained in:
Roland Schneider 2021-09-27 21:57:22 +02:00
parent 6b40b5084f
commit 7bd6185334
7 changed files with 23 additions and 13 deletions

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash #!/usr/bin/env bash
php /home/fitnessa/public_html/fitness-web/yii ticket/index php /home/fitnessa/public_html/fitness-web/yii ticket/index
#php /home/fitnessa/public_html/fitness-web/yii ticket/daily php /home/fitnessa/public_html/fitness-web/yii ticket/daily

View File

@ -7,7 +7,7 @@
"build": "ng build", "build": "ng build",
"build:prod": "ng build --configuration production", "build:prod": "ng build --configuration production",
"build:prod-cutler-gyor": "ng build --configuration cutler-gyor", "build:prod-cutler-gyor": "ng build --configuration cutler-gyor",
"build:prod-cutler-movar": "ng build --configuration cutler-movar --base-href group-training", "build:prod-cutler-movar": "ng build --configuration cutler-movar --base-href /group-training/ --deploy-url /group-training/",
"test": "ng test", "test": "ng test",
"lint": "ng lint", "lint": "ng lint",
"e2e": "ng e2e" "e2e": "ng e2e"

View File

@ -17,7 +17,7 @@ import {ReactiveFormsModule} from "@angular/forms";
import { EventsComponent } from './pages/events/events.component'; import { EventsComponent } from './pages/events/events.component';
import { FitEventTypesComponent } from './components/fit-event-types/fit-event-types.component'; import { FitEventTypesComponent } from './components/fit-event-types/fit-event-types.component';
import { registerLocaleData } from '@angular/common'; import {APP_BASE_HREF, PlatformLocation, registerLocaleData} from '@angular/common';
import localeHu from '@angular/common/locales/hu'; import localeHu from '@angular/common/locales/hu';
import {FontAwesomeModule} from "@fortawesome/angular-fontawesome"; import {FontAwesomeModule} from "@fortawesome/angular-fontawesome";
import { library } from '@fortawesome/fontawesome-svg-core'; import { library } from '@fortawesome/fontawesome-svg-core';
@ -90,7 +90,11 @@ registerLocaleData(localeHu, 'hu');
{ provide: LOCALE_ID, useValue: "hu-hu" }, { provide: LOCALE_ID, useValue: "hu-hu" },
{ provide: HTTP_INTERCEPTORS, useClass: JwtInterceptor, multi: true }, { provide: HTTP_INTERCEPTORS, useClass: JwtInterceptor, multi: true },
{ provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true }, { provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true },
{
provide: APP_BASE_HREF,
useFactory: getBaseHref,
deps: [PlatformLocation]
}
// provider used to create fake backend // provider used to create fake backend
// fakeBackendProvider // fakeBackendProvider
], ],
@ -103,3 +107,7 @@ export class AppModule {
} }
} }
export function getBaseHref(platformLocation: PlatformLocation): string {
return platformLocation.getBaseHrefFromDOM();
}

View File

@ -2,7 +2,7 @@
<div class="row h-100"> <div class="row h-100">
<div class="col-lg-4 col-sm-12 offset-lg-4 p-3 "> <div class="col-lg-4 col-sm-12 offset-lg-4 p-3 ">
<div class="d-flex align-items-center justify-content-center h-100 flex-column "> <div class="d-flex align-items-center justify-content-center h-100 flex-column ">
<img class="mw2-sm-80 mw2-80" src="/assets/images/cutlercross-logo-dark.svg"> <img class="mw2-sm-80 mw2-80" [src]=" baseHref + '/assets/images/cutlercross-logo-dark.svg'">
<h1 class="app-font-size-lg app-font-family-secondary mt-3">Bejelentkezés</h1> <h1 class="app-font-size-lg app-font-family-secondary mt-3">Bejelentkezés</h1>
<form class="login-form w-100" [formGroup]="loginForm" (ngSubmit)="onSubmit()"> <form class="login-form w-100" [formGroup]="loginForm" (ngSubmit)="onSubmit()">
<div class="form-group mt-2"> <div class="form-group mt-2">
@ -22,9 +22,9 @@
</div> </div>
</div> </div>
<button [disabled]="loading" class="btn btn-primary mt-2 w-100 ">bejelentkezek</button> <button [disabled]="loading" class="btn btn-primary mt-2 w-100 ">bejelentkezek</button>
<div class="w-100 text-center"> <!-- <div class="w-100 text-center">-->
<button type="button" class="btn btn-link text-dark text-center text-decoration-none">elfelejtett jelszó</button> <!-- <button type="button" class="btn btn-link text-dark text-center text-decoration-none">elfelejtett jelszó</button>-->
</div> <!-- </div>-->
<div *ngIf="error" class="alert alert-danger mt-2">{{error}}</div> <div *ngIf="error" class="alert alert-danger mt-2">{{error}}</div>
</form> </form>
</div> </div>

View File

@ -1,9 +1,10 @@
import { Component, OnInit } from '@angular/core'; import {Component, Inject, OnInit} from '@angular/core';
import {FormBuilder, FormGroup, Validators} from "@angular/forms"; import {FormBuilder, FormGroup, Validators} from "@angular/forms";
import {ActivatedRoute, Router} from "@angular/router"; import {ActivatedRoute, Router} from "@angular/router";
import {AuthenticationService} from "../../services/authentication.service"; import {AuthenticationService} from "../../services/authentication.service";
import { first } from 'rxjs/operators'; import { first } from 'rxjs/operators';
import {ToastrService} from "ngx-toastr"; import {ToastrService} from "ngx-toastr";
import {APP_BASE_HREF} from "@angular/common";
@Component({ @Component({
selector: 'app-login', selector: 'app-login',
@ -22,7 +23,8 @@ export class LoginComponent implements OnInit {
private route: ActivatedRoute, private route: ActivatedRoute,
private router: Router, private router: Router,
private authenticationService: AuthenticationService, private authenticationService: AuthenticationService,
private toastr: ToastrService private toastr: ToastrService,
@Inject(APP_BASE_HREF) public baseHref:string
) { } ) { }
ngOnInit() { ngOnInit() {

View File

@ -61,7 +61,7 @@ html{
body{ body{
min-height: 100%; min-height: 100%;
height: 100%; height: 100%;
background: url("/assets/images/cutlercross-background.jpg"); background: url("~/assets/images/cutlercross-background.jpg");
background-repeat: repeat-y; background-repeat: repeat-y;
} }

View File

@ -1,12 +1,12 @@
@font-face { @font-face {
font-family: "Roboto"; font-family: "Roboto";
src: url("/assets/fonts/RobotoMono-VariableFont_wght.ttf") format("truetype"); src: url("~/assets/fonts/RobotoMono-VariableFont_wght.ttf") format("truetype");
} }
@font-face { @font-face {
font-family: "dcc"; font-family: "dcc";
src: url("/assets/fonts/dcc_sharp_distress_black_by_dccanim.otf") format("truetype"); src: url("~/assets/fonts/dcc_sharp_distress_black_by_dccanim.otf") format("truetype");
//font-weight: $font-weight-normal; //font-weight: $font-weight-normal;
//font-style: normal; //font-style: normal;
} }