fix: use tailwindcss cli
This commit is contained in:
+14
-2
@@ -4,7 +4,12 @@ FROM python:3.13-slim AS builder
|
||||
# Create working directory
|
||||
WORKDIR /app
|
||||
|
||||
# poetry export -f requirements.txt --output requirements.txt --without-hashes
|
||||
# Install tools needed for Tailwind CSS build
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
curl \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy dependency files
|
||||
COPY requirements.txt ./
|
||||
|
||||
@@ -12,6 +17,12 @@ COPY requirements.txt ./
|
||||
RUN --mount=type=cache,target=/root/.cache/pip \
|
||||
pip install --no-deps --disable-pip-version-check -r requirements.txt
|
||||
|
||||
# Build Tailwind CSS
|
||||
COPY index.html style-input.css tailwind.config.js ./
|
||||
RUN curl -sL https://github.com/tailwindlabs/tailwindcss/releases/download/v3.4.17/tailwindcss-linux-x64 -o tailwindcss \
|
||||
&& chmod +x tailwindcss \
|
||||
&& ./tailwindcss -i ./style-input.css -o ./style.css --minify
|
||||
|
||||
# Runtime stage
|
||||
FROM python:3.13-slim AS runtime
|
||||
|
||||
@@ -29,8 +40,9 @@ RUN useradd --home-dir /app --no-create-home --uid 1000 myice
|
||||
# Copy installed packages from builder stage
|
||||
COPY --from=builder /usr/local/lib/python3.13/site-packages /usr/local/lib/python3.13/site-packages
|
||||
|
||||
# Copy application code
|
||||
# Copy application code and compiled assets
|
||||
COPY index.html favicon.ico ./
|
||||
COPY --from=builder /app/style.css ./style.css
|
||||
COPY myice ./myice
|
||||
|
||||
# Change ownership of copied files
|
||||
|
||||
Reference in New Issue
Block a user