GitIgnore fixes, DockerFile fixes
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
.angular
|
||||
|
||||
# IDEs and editors
|
||||
/.idea
|
||||
|
||||
@@ -31,7 +31,8 @@
|
||||
|
||||
<div *ngIf="retrievedImage">
|
||||
<h2>Image</h2>
|
||||
<img [src]="retrievedImage" alt="Upload Image" [style.height.px]="windowHeight">
|
||||
<img [src]="retrievedImage" alt="Upload Image" [style.height.px]="windowHeight" [title]="imageTitle">
|
||||
<button mat-raised-button color="primary" (click)="downloadImage()">Download Image</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -17,6 +17,7 @@ export class CollectionComponent {
|
||||
title2: any;
|
||||
selectedLogoControl = new FormControl();
|
||||
logoOptionControl = new FormControl();
|
||||
imageTitle: any;
|
||||
|
||||
constructor(private http: HttpClient)
|
||||
{
|
||||
@@ -39,15 +40,25 @@ export class CollectionComponent {
|
||||
fd.append('title', this.title);
|
||||
fd.append('title2', this.title2);
|
||||
|
||||
this.http.post('https://localhost:44369/poster/collection', fd)
|
||||
this.http.post('http://localhost:44369/poster/collection', fd)
|
||||
.subscribe(res => {
|
||||
console.log(res);
|
||||
this.retrieveResponse = res;
|
||||
this.base64Data = this.retrieveResponse.picBytes;
|
||||
this.retrievedImage = 'data:image/jpeg;base64,' + this.base64Data;
|
||||
this.imageTitle = 'poster';
|
||||
});
|
||||
}
|
||||
|
||||
downloadImage(): void {
|
||||
if (this.retrievedImage) {
|
||||
const link = document.createElement('a');
|
||||
link.href = this.retrievedImage;
|
||||
link.download = `${this.imageTitle}.jpeg`; // Specify the filename here
|
||||
link.click();
|
||||
}
|
||||
}
|
||||
|
||||
@HostListener('window:resize')
|
||||
onResize() {
|
||||
this.windowHeight = window.innerHeight - 200;
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
<div *ngIf="retrievedImage">
|
||||
<h2>Image</h2>
|
||||
<img [src]="retrievedImage" alt="Upload Image" [style.height.px]="windowHeight">
|
||||
<button mat-raised-button color="primary" (click)="downloadImage()">Download Image</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -23,6 +23,7 @@ export class MovieComponent {
|
||||
logoOptions = LogoOptions
|
||||
selectedLogoControl = new FormControl();
|
||||
logoOptionControl = new FormControl();
|
||||
imageTitle = 'poster'
|
||||
|
||||
constructor(private http: HttpClient)
|
||||
{
|
||||
@@ -54,7 +55,7 @@ export class MovieComponent {
|
||||
fd.append('logoOption', this.logoOptionControl.value);
|
||||
}
|
||||
|
||||
this.http.post('https://localhost:44369/poster/movie', fd)
|
||||
this.http.post('http://localhost:44369/poster/movie', fd)
|
||||
.subscribe(res => {
|
||||
console.log(res);
|
||||
this.retrieveResponse = res;
|
||||
@@ -63,6 +64,15 @@ export class MovieComponent {
|
||||
});
|
||||
}
|
||||
|
||||
downloadImage(): void {
|
||||
if (this.retrievedImage) {
|
||||
const link = document.createElement('a');
|
||||
link.href = this.retrievedImage;
|
||||
link.download = `${this.imageTitle}.jpeg`; // Specify the filename here
|
||||
link.click();
|
||||
}
|
||||
}
|
||||
|
||||
@HostListener('window:resize')
|
||||
onResize() {
|
||||
this.windowHeight = window.innerHeight - 200;
|
||||
|
||||
@@ -32,5 +32,6 @@ export enum NetworkLogos {
|
||||
AdultSwim = "Adult Swim",
|
||||
Max = "Max",
|
||||
Mtv = "Mtv",
|
||||
ChannelFour = "ChannelFour"
|
||||
ChannelFour = "ChannelFour",
|
||||
Id = "ID"
|
||||
}
|
||||
|
||||
@@ -72,7 +72,8 @@
|
||||
|
||||
<div *ngIf="retrievedImage">
|
||||
<h2>Image</h2>
|
||||
<img [src]="retrievedImage" alt="Upload Image" [style.height.px]="windowHeight">
|
||||
<img [src]="retrievedImage" alt="Upload Image" [style.height.px]="windowHeight" [title]='imageTitle'>
|
||||
<button mat-raised-button color="primary" (click)="downloadImage()">Download Image</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -27,6 +27,7 @@ export class SeriesComponent {
|
||||
logoOptionControl = new FormControl();
|
||||
selectedStudioControl = new FormControl();
|
||||
isLimitedSeries: any;
|
||||
imageTitle: any;
|
||||
|
||||
constructor(private http: HttpClient)
|
||||
{
|
||||
@@ -61,15 +62,25 @@ export class SeriesComponent {
|
||||
if (this.logoOptionControl.value != null){
|
||||
fd.append('logoOption', this.logoOptionControl.value);
|
||||
}
|
||||
this.http.post('https://localhost:44369/poster/series', fd)
|
||||
this.http.post('http://localhost:44369/poster/series', fd)
|
||||
.subscribe(res => {
|
||||
console.log(res);
|
||||
this.retrieveResponse = res;
|
||||
this.base64Data = this.retrieveResponse.picBytes;
|
||||
this.retrievedImage = 'data:image/jpeg;base64,' + this.base64Data;
|
||||
this.imageTitle = 'poster';
|
||||
});
|
||||
}
|
||||
|
||||
downloadImage(): void {
|
||||
if (this.retrievedImage) {
|
||||
const link = document.createElement('a');
|
||||
link.href = this.retrievedImage;
|
||||
link.download = `${this.imageTitle}.jpeg`; // Specify the filename here
|
||||
link.click();
|
||||
}
|
||||
}
|
||||
|
||||
@HostListener('window:resize')
|
||||
onResize() {
|
||||
this.windowHeight = window.innerHeight - 200;
|
||||
|
||||
+31
-14
@@ -1,27 +1,44 @@
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 44404
|
||||
ENV ASPNETCORE_URLS=http://*:44404
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
|
||||
EXPOSE 80
|
||||
EXPOSE 443
|
||||
# Copy the certificate
|
||||
COPY aspnetcore.pfx /https/aspnetcore.pfx
|
||||
RUN ls /https && ls /https/aspnetcore.pfx && echo "Certificate copied successfully."
|
||||
ENV ASPNETCORE_URLS=https://+;http://+
|
||||
ENV ASPNETCORE_HTTPS_PORT=443
|
||||
ENV ASPNETCORE_Kestrel__Certificates__Default__Password=test
|
||||
ENV ASPNETCORE_Kestrel__Certificates__Default__Path=/https/aspnetcore.pfx
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
||||
# Install Node.js
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash - \
|
||||
&& apt-get install -y \
|
||||
nodejs \
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
||||
&& apt-get install -y nodejs \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /src
|
||||
COPY ["PosterMaker.UI/PosterMaker.UI.csproj", "PosterMaker.UI/"]
|
||||
RUN dotnet restore "PosterMaker.UI/PosterMaker.UI.csproj"
|
||||
COPY PosterMaker.UI.csproj .
|
||||
RUN dotnet restore PosterMaker.UI.csproj
|
||||
COPY . .
|
||||
WORKDIR "/src/PosterMaker.UI"
|
||||
RUN dotnet build "PosterMaker.UI.csproj" -c Release -o /app/build
|
||||
|
||||
# Build Angular app
|
||||
WORKDIR "/src/ClientApp"
|
||||
RUN npm install
|
||||
RUN npm run build --prod
|
||||
|
||||
# Build .NET app
|
||||
WORKDIR "/src"
|
||||
RUN dotnet build PosterMaker.UI.csproj -c Release -o /app/build
|
||||
|
||||
FROM build AS publish
|
||||
RUN dotnet publish "PosterMaker.UI.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
||||
RUN dotnet publish PosterMaker.UI.csproj -c Release -o /app/publish /p:UseAppHost=false
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
ENTRYPOINT ["dotnet", "PosterMaker.UI.dll"]
|
||||
|
||||
# Copy Angular build output to wwwroot
|
||||
COPY --from=build /src/ClientApp/dist /app/wwwroot
|
||||
|
||||
# Ensure SpaProxy properly configured
|
||||
ENTRYPOINT ["dotnet", "PosterMaker.UI.dll"]
|
||||
@@ -8,3 +8,5 @@
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user