Переделал докер файл под сборку стилей
Some checks failed
Build and deploy / Publish image (push) Failing after 51s

This commit is contained in:
2025-01-02 16:28:45 +03:00
parent 0453befc60
commit bc5f7fae62
2 changed files with 5 additions and 2 deletions

View File

@@ -3,7 +3,7 @@ services:
container_name: Otchislator container_name: Otchislator
image: git.zetcraft.ru/serega404/otchislator:main image: git.zetcraft.ru/serega404/otchislator:main
ports: ports:
- "8025:80" - "8025:8080"
volumes: volumes:
- /srv/otchislator/pdfs:/app/PDFCache - /srv/otchislator/pdfs:/app/PDFCache
environment: environment:

View File

@@ -3,15 +3,18 @@ USER root
RUN apk update && apk add --no-cache curl icu tzdata musl-locales musl-locales-lang RUN apk update && apk add --no-cache curl icu tzdata musl-locales musl-locales-lang
USER $APP_UID USER $APP_UID
WORKDIR /app WORKDIR /app
EXPOSE 80 EXPOSE 8080
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
ARG BUILD_CONFIGURATION=Release ARG BUILD_CONFIGURATION=Release
RUN apt update && apt install npm
WORKDIR /src WORKDIR /src
COPY ["Otchinslator.csproj", "Otchinslator.csproj"] COPY ["Otchinslator.csproj", "Otchinslator.csproj"]
RUN dotnet restore "Otchinslator.csproj" RUN dotnet restore "Otchinslator.csproj"
COPY . . COPY . .
WORKDIR "/src" WORKDIR "/src"
RUN npm ci
RUN npx tailwindcss -i ./wwwroot/css/site.css -o ./wwwroot/css/styles.css --minify
RUN dotnet build "Otchinslator.csproj" -c $BUILD_CONFIGURATION -o /app/build RUN dotnet build "Otchinslator.csproj" -c $BUILD_CONFIGURATION -o /app/build
FROM build AS publish FROM build AS publish