Skip to content

Commit 87eebb9

Browse files
committed
chore: Fix embedded proxy broken with new CI/CD implementation
1 parent 4b236b1 commit 87eebb9

File tree

4 files changed

+20
-12
lines changed

4 files changed

+20
-12
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
pull_request:
55
branches: [main, master, dev]
66
push:
7-
branches: [main, master, dev, experimental]
7+
branches: [main, master]
88
workflow_call:
99
secrets:
1010
DOCKERHUB_USERNAME:

.github/workflows/publish_experimental.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ env:
1212
REGISTRY_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/m3u-editor
1313

1414
jobs:
15+
# Run CI checks first
16+
ci-check:
17+
name: CI Validation
18+
uses: ./.github/workflows/ci.yml
19+
secrets: inherit
20+
1521
# Extract version from config/dev.php
1622
get-version:
1723
name: Get Version
@@ -36,7 +42,7 @@ jobs:
3642
push-amd64:
3743
name: Build & Push (amd64)
3844
runs-on: ubuntu-latest
39-
needs: [get-version]
45+
needs: [ci-check, get-version]
4046
outputs:
4147
digest: ${{ steps.build.outputs.digest }}
4248
steps:
@@ -74,7 +80,7 @@ jobs:
7480
push-arm64:
7581
name: Build & Push (arm64)
7682
runs-on: ubuntu-22.04-arm
77-
needs: [get-version]
83+
needs: [ci-check, get-version]
7884
outputs:
7985
digest: ${{ steps.build.outputs.digest }}
8086
steps:

Dockerfile

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ RUN NODE_ENV=production npm run build && \
6666
########################################
6767
# Stage 3: m3u-proxy builder - prepares Python proxy service
6868
########################################
69-
FROM python:3.12-alpine AS proxy_builder
69+
FROM alpine:3.21.3 AS proxy_builder
7070

7171
# Re-declare ARGs for this stage
7272
ARG M3U_PROXY_REPO=https://github.com/sparkison/m3u-proxy.git
@@ -77,17 +77,12 @@ WORKDIR /opt/m3u-proxy
7777
# Install git for cloning
7878
RUN apk add --no-cache git
7979

80-
# Clone and setup m3u-proxy
80+
# Clone m3u-proxy source code
8181
RUN echo "Cloning m3u-proxy from: ${M3U_PROXY_REPO} (branch: ${M3U_PROXY_BRANCH})" && \
8282
git clone -b ${M3U_PROXY_BRANCH} ${M3U_PROXY_REPO} . && \
8383
# Remove .git to reduce image size
8484
rm -rf .git
8585

86-
# Create virtual environment and install dependencies
87-
RUN python3 -m venv .venv && \
88-
.venv/bin/pip install --no-cache-dir --upgrade pip && \
89-
.venv/bin/pip install --no-cache-dir -r requirements.txt
90-
9186
########################################
9287
# Stage 4: Runtime image
9388
########################################
@@ -148,8 +143,9 @@ RUN echo "@edge https://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/rep
148143
postgresql \
149144
postgresql-client \
150145
postgresql-contrib \
151-
# Python runtime (for m3u-proxy)
146+
# Python runtime and pip (for m3u-proxy)
152147
python3 \
148+
py3-pip \
153149
# PHP 8.4 and all required extensions
154150
php84-cli \
155151
php84-fpm \
@@ -220,6 +216,12 @@ COPY --chmod=755 start-container /usr/local/bin/start-container
220216
# Copy m3u-proxy from builder stage
221217
COPY --from=proxy_builder --chown=${WWWUSER}:${WWWGROUP} /opt/m3u-proxy /opt/m3u-proxy
222218

219+
# Install m3u-proxy Python dependencies
220+
# Using --break-system-packages since we control the container and don't need isolation
221+
RUN if [ -f /opt/m3u-proxy/requirements.txt ]; then \
222+
pip3 install --no-cache-dir --break-system-packages -r /opt/m3u-proxy/requirements.txt; \
223+
fi
224+
223225
# Copy application code (changes more frequently)
224226
COPY --chown=${WWWUSER}:${WWWGROUP} . /var/www/html
225227

docker/8.4/supervisord.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ priority=6
9393
; Starts only if M3U_PROXY_START_EMBEDDED=true (when not using external service)
9494
;-----------------------------------------
9595
[program:m3u-proxy]
96-
command=/opt/m3u-proxy/.venv/bin/python /opt/m3u-proxy/main.py
96+
command=/usr/bin/python3 /opt/m3u-proxy/main.py
9797
user=%(ENV_SUPERVISOR_PHP_USER)s
9898
autostart=%(ENV_M3U_PROXY_START_EMBEDDED)s
9999
autorestart=true

0 commit comments

Comments
 (0)