Corrected failing scss compiling

This commit is contained in:
Marcel Baumgartner
2024-06-30 02:02:33 +02:00
parent 52b3616de4
commit a895372e13

View File

@@ -14,18 +14,17 @@ COPY . .
WORKDIR "/src/Moonlight" WORKDIR "/src/Moonlight"
RUN dotnet build "Moonlight.csproj" -c $BUILD_CONFIGURATION -o /app/build RUN dotnet build "Moonlight.csproj" -c $BUILD_CONFIGURATION -o /app/build
# Install sass FROM build AS publish
ARG BUILD_CONFIGURATION=Release
# Install sass and compile styles
RUN apt-get update RUN apt-get update
RUN apt-get install wget -y RUN apt-get install wget -y
RUN cat /etc/os-release
RUN wget -O /tmp/sass.tar.gz https://github.com/sass/dart-sass/releases/download/1.77.5/dart-sass-1.77.5-linux-x64.tar.gz RUN wget -O /tmp/sass.tar.gz https://github.com/sass/dart-sass/releases/download/1.77.5/dart-sass-1.77.5-linux-x64.tar.gz
RUN tar -xf /tmp/sass.tar.gz -C /tmp RUN tar -xf /tmp/sass.tar.gz -C /tmp
RUN chmod +x /tmp/dart-sass/sass RUN chmod +x /tmp/dart-sass/sass
RUN mkdir -p /app/build/Assets/Core/css/ RUN /tmp/dart-sass/sass /src/Moonlight/Styles/style.scss /app/publish/theme.css
RUN /tmp/dart-sass/sass /src/Moonlight/Styles/style.scss /app/build/Assets/Core/css/theme.css
FROM build AS publish
ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "Moonlight.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false RUN dotnet publish "Moonlight.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
FROM base AS final FROM base AS final
@@ -41,7 +40,8 @@ COPY --from=publish /app/publish .
# Copy default assets # Copy default assets
RUN mkdir -p /app/Assets RUN mkdir -p /app/Assets
COPY ./Moonlight/Assets ./Assets COPY ./Moonlight/Assets /app/Assets
RUN mv /app/theme.css /app/Assets/Core/css/theme.css
# Ensure storage folder exists and is empty # Ensure storage folder exists and is empty
RUN mkdir -p /app/storage RUN mkdir -p /app/storage