Compare commits
1 Commits
5aca0038b6
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
2502f005e3
|
+13
@@ -23,6 +23,18 @@ RUN apk add --no-cache gcc musl-dev libffi-dev openssl-dev
|
|||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
|
# Build Tailwind CSS
|
||||||
|
COPY templates/index.html templates/index.html
|
||||||
|
COPY style-input.css tailwind.config.js ./
|
||||||
|
RUN case "$(uname -m)" in \
|
||||||
|
x86_64) arch="x64" ;; \
|
||||||
|
aarch64|arm64) arch="arm64" ;; \
|
||||||
|
*) echo "Unsupported architecture: $(uname -m)"; exit 1 ;; \
|
||||||
|
esac \
|
||||||
|
&& curl -sL "https://github.com/tailwindlabs/tailwindcss/releases/download/v3.4.17/tailwindcss-linux-${arch}" -o tailwindcss \
|
||||||
|
&& chmod +x tailwindcss \
|
||||||
|
&& ./tailwindcss -i ./style-input.css -o ./style.css --minify
|
||||||
|
|
||||||
#############################################
|
#############################################
|
||||||
# Final stage
|
# Final stage
|
||||||
#############################################
|
#############################################
|
||||||
@@ -35,6 +47,7 @@ COPY --from=builder /usr/local/bin /usr/local/bin
|
|||||||
# Copy application files
|
# Copy application files
|
||||||
COPY main.py .
|
COPY main.py .
|
||||||
COPY templates/ templates/
|
COPY templates/ templates/
|
||||||
|
COPY --from=builder /app/style.css ./style.css
|
||||||
|
|
||||||
# Change ownership to non-root user
|
# Change ownership to non-root user
|
||||||
RUN chown -R app:app /app
|
RUN chown -R app:app /app
|
||||||
|
|||||||
Reference in New Issue
Block a user