Skip to content

Commit d2cff55

Browse files
revert change
1 parent caa3599 commit d2cff55

File tree

7 files changed

+18
-53
lines changed

7 files changed

+18
-53
lines changed

.github/workflows/docker-image.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ jobs:
7070
- name: Build and Push Docker Image (Multi-Arch)
7171
uses: docker/build-push-action@v5
7272
with:
73-
context: .
74-
file: ./dockflare/Dockerfile
73+
context: ./dockflare
7574
# Build for multiple architectures
7675
platforms: linux/amd64 #,linux/arm64 # Enable multi-architecture builds
7776
# Push only on direct pushes to stable or unstable branches
@@ -82,4 +81,4 @@ jobs:
8281
labels: ${{ steps.meta.outputs.labels }}
8382
# Consider enabling caching once it works
8483
# cache-from: type=gha
85-
# cache-to: type=gha,mode=max
84+
# cache-to: type=gha,mode=max

dockflare/Dockerfile

Lines changed: 16 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -15,56 +15,22 @@
1515
# along with this program. If not, see <https://www.gnu.org/licenses/>.
1616
# Use an official Python runtime as a parent image
1717
# Using slim variant for smaller size
18-
# DockFlare: Automates Cloudflare Tunnel ingress from Docker labels.
19-
# Copyright (C) 2025 ChrispyBacon-Dev <https://github.com/ChrispyBacon-dev/DockFlare>
20-
# (License header remains the same)
21-
# --- Frontend Builder Stage ---
2218
FROM node:20-alpine as frontend-builder
2319
LABEL stage=frontend-builder
24-
WORKDIR /build # Changed WORKDIR to something simple for this stage
25-
26-
# Copy files needed for the build from the 'dockflare' subdirectory of the build context
27-
COPY ./dockflare/package.json ./package.json
28-
COPY ./dockflare/package-lock.json* ./
29-
COPY ./dockflare/tailwind.config.js ./tailwind.config.js
30-
COPY ./dockflare/postcss.config.js ./postcss.config.js
31-
32-
# Create the expected directory structure for input.css and templates
33-
# relative to the WORKDIR (/build)
34-
RUN mkdir -p ./app/templates
35-
COPY ./dockflare/app/templates/input.css ./app/templates/input.css
36-
COPY ./dockflare/app/templates ./app/templates
37-
20+
WORKDIR /usr/src/app
21+
COPY package.json ./
22+
COPY package-lock.json* ./
3823
RUN npm install
39-
40-
RUN echo ">>> Current directory before npm run build:css is $(pwd)" && \
41-
echo ">>> Listing WORKDIR (/build) contents:" && \
42-
ls -la . && \
43-
echo ">>> Listing ./app/ contents:" && \
44-
ls -la ./app/ && \
45-
echo ">>> Listing ./app/templates/ contents:" && \
46-
ls -la ./app/templates/ && \
47-
echo ">>> Running npm run build:css..." && \
48-
npm run build:css
49-
50-
RUN echo ">>> CSS build supposedly complete. Verifying output..." && \
51-
echo ">>> Listing /build/app/ :" && \
52-
ls -la /build/app/ && \
53-
echo ">>> Listing /build/app/static/ :" && \
54-
ls -la /build/app/static/ && \
55-
echo ">>> Listing /build/app/static/css/ :" && \
56-
ls -la /build/app/static/css/ && \
57-
echo ">>> Checking for /build/app/static/css/output.css existence:" && \
58-
(test -f /build/app/static/css/output.css && echo "output.css FOUND" || echo "output.css NOT FOUND")
59-
# End of frontend-builder stage
60-
61-
# --- Runtime Stage ---
24+
COPY tailwind.config.js ./
25+
COPY postcss.config.js ./
26+
COPY ./templates/input.css ./templates/input.css
27+
COPY ./templates ./templates
28+
RUN npm run build:css
6229
FROM python:3.13-slim as runtime
6330
ENV PYTHONDONTWRITEBYTECODE=1
6431
ENV PYTHONUNBUFFERED=1
6532
WORKDIR /app
6633
ENV CLOUDFLARED_VERSION="2024.1.5"
67-
# ... (cloudflared install) ...
6834
RUN apt-get update && apt-get install -y --no-install-recommends \
6935
wget \
7036
ca-certificates \
@@ -82,13 +48,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
8248
rm cloudflared-$CLOUDFLARED_ARCH.deb && \
8349
cloudflared --version && \
8450
mkdir -p /root/.cloudflared
85-
86-
COPY ./dockflare/requirements.txt .
51+
COPY requirements.txt .
8752
RUN pip install --no-cache-dir -r requirements.txt
88-
89-
COPY --from=frontend-builder /build/app/static/css/output.css /app/static/css/output.css
90-
91-
COPY ./dockflare/app /app
92-
COPY ./images /app/static/images/
53+
RUN mkdir -p /app/static/css
54+
RUN mkdir -p /app/static/images
55+
COPY --from=frontend-builder /usr/src/app/static/css/output.css /app/static/css/output.css
56+
COPY app.py .
57+
COPY templates /app/templates/
58+
COPY images /app/static/images/
9359
EXPOSE 5000
94-
CMD ["python", "main.py"]
60+
CMD ["python", "app.py"]

dockflare/images/DockFlare.png

725 KB
Loading

dockflare/images/banner.png

377 KB
Loading

dockflare/images/bannertr.png

113 KB
Loading

dockflare/images/cf.png

18.5 KB
Loading

dockflare/images/status_web.png

432 KB
Loading

0 commit comments

Comments
 (0)