feat: add Dockerfiles for frontend and backend, and a Gitea workflow for building and pushing images.
Build & Push Hospitality / build-and-push (push) Failing after 7s

This commit is contained in:
steinhelge
2025-11-24 11:10:10 +01:00
parent 3736ccc4f5
commit 2264c27032
3 changed files with 111 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
# --- Build stage ---
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
WORKDIR /src
# Kopier alt
COPY . .
# Publiser i Release
RUN dotnet publish "Hospitality.Backend.csproj" -c Release -o /app/publish
# --- Runtime stage ---
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS final
WORKDIR /app
# Kopier publisert output
COPY --from=build /app/publish .
# Appen lytter standard til ASPNETCORE_URLS
EXPOSE 8080
ENV ASPNETCORE_URLS=http://0.0.0.0:8080
ENTRYPOINT ["dotnet", "Hospitality.Backend.dll"]
+23
View File
@@ -0,0 +1,23 @@
# --- Build stage ---
FROM node:22 AS build
WORKDIR /app
# Installer dependencies
COPY package*.json ./
RUN npm ci
# Kopier resten av koden
COPY . .
# Bygg for produksjon
RUN npm run build
# --- Runtime stage ---
FROM nginx:alpine
WORKDIR /usr/share/nginx/html
# Legg inn bygget frontend
COPY --from=build /app/dist .
# Nginx server som statisk side
EXPOSE 80