fix/little-updates #1

Merged
sandre merged 16 commits from fix/little-updates into master 2026-01-12 14:25:51 +00:00
Showing only changes of commit 171b3232ce - Show all commits

View File

@@ -1,38 +1,7 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. #See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
# FROM mcr.microsoft.com/dotnet/aspnet:8.0.16-bookworm-slim-amd64 AS base
# EXPOSE 80
# RUN apt-get -y update
# RUN apt-get -y install nginx
# RUN mkdir -p /app/Front /app/API
# COPY Front/skydivelogs-app/dist /app/Front
# COPY Back/dist /app/API
# RUN rm -f /app/startup.sh
# COPY startup.sh /app
# RUN chmod 755 /app/startup.sh
# RUN update-rc.d nginx defaults
# COPY nginx.conf /etc/nginx/sites-available/default
# VOLUME /app/API/Data
# VOLUME /app/Front/config
# ENV ASPNETCORE_URLS http://+:5001
# ENTRYPOINT ["sh", "/app/startup.sh"]
# Use the official Microsoft ASP.NET Core image to build the backend # Use the official Microsoft ASP.NET Core image to build the backend
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-backend FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-backend
# WORKDIR /src
# COPY ["Back/skydiveLogs-api/skydiveLogs-api.csproj", "backend/"]
# RUN dotnet restore "backend/skydiveLogs-api.csproj"
WORKDIR "/src/backend" WORKDIR "/src/backend"
COPY Back/ . COPY Back/ .
RUN dotnet restore "skydiveLogs-api/skydiveLogs-api.csproj" RUN dotnet restore "skydiveLogs-api/skydiveLogs-api.csproj"
@@ -43,11 +12,10 @@ FROM node:20-alpine AS build-frontend
WORKDIR /app WORKDIR /app
COPY ["Front/skydivelogs-app/package.json", "Front/skydivelogs-app/package-lock.json*", "./"] COPY ["Front/skydivelogs-app/package.json", "Front/skydivelogs-app/package-lock.json*", "./"]
RUN npm install RUN npm install
COPY Front/skydivelogs-app/ . COPY --exclude=Front/skydivelogs-app/node_modules/* Front/skydivelogs-app/ .
RUN npm run build RUN npm run build
# Use a .NET runtime image to serve both the backend and frontend # Use a .NET runtime image to serve both the backend and frontend
# FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final
FROM mcr.microsoft.com/dotnet/aspnet:8.0.16-bookworm-slim-amd64 AS final FROM mcr.microsoft.com/dotnet/aspnet:8.0.16-bookworm-slim-amd64 AS final
WORKDIR /app WORKDIR /app
@@ -55,13 +23,11 @@ WORKDIR /app
RUN apt-get update && apt-get install -y nginx curl && rm -rf /var/lib/apt/lists/* RUN apt-get update && apt-get install -y nginx curl && rm -rf /var/lib/apt/lists/*
# Copy custom nginx configuration # Copy custom nginx configuration
#COPY nginx.conf /etc/nginx/nginx.conf
COPY nginx.conf /etc/nginx/sites-available/default COPY nginx.conf /etc/nginx/sites-available/default
RUN rm -rf /usr/share/nginx/html/* RUN rm -rf /usr/share/nginx/html/*
# Copy frontend dist folder to nginx html directory # Copy frontend dist folder to nginx html directory
COPY --from=build-frontend /app/dist /usr/share/nginx/html COPY --from=build-frontend /app/dist /usr/share/nginx/html
# COPY --from=build-frontend /app/dist/azure-speed-test/browser /usr/share/nginx/html
# Copy backend from the correct build stage # Copy backend from the correct build stage
COPY --from=build-backend /app/publish /app COPY --from=build-backend /app/publish /app