💄 Restyled web pages

🧱 Add tailwindcss
This commit is contained in:
2025-05-17 15:40:39 +08:00
parent d59dba9c02
commit a77d00c3b9
19 changed files with 1344 additions and 231 deletions

View File

@ -5,12 +5,26 @@ EXPOSE 8080
EXPOSE 8081
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
# Install Node.js
RUN apt-get update && apt-get install -y curl
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs \
&& npm install -g npm@latest
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["DysonNetwork.Sphere/DysonNetwork.Sphere.csproj", "DysonNetwork.Sphere/"]
RUN dotnet restore "DysonNetwork.Sphere/DysonNetwork.Sphere.csproj"
COPY . .
WORKDIR "/src/DysonNetwork.Sphere"
# Install npm packages and build Tailwind CSS
COPY ["DysonNetwork.Sphere/package*.json", "./"]
RUN npm install
COPY ["DysonNetwork.Sphere/postcss.config.js", "./"]
COPY ["DysonNetwork.Sphere/wwwroot/css/site.css", "./wwwroot/css/"]
RUN npx @tailwindcss/cli -i ./wwwroot/css/site.css -o ./wwwroot/css/styles.css
RUN dotnet build "DysonNetwork.Sphere.csproj" -c $BUILD_CONFIGURATION -o /app/build
FROM build AS publish