Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5f1bcbf40d | |||
| 56a03e2e82 | |||
| 78e1d1a392 | |||
| 45ebfc57e7 | |||
| a0396f33a6 | |||
| ec896c9a83 | |||
| f1d13d49f3 | |||
| e0940fa82e | |||
|
|
6214ea290f |
@@ -21,6 +21,65 @@ jobs:
|
||||
echo "Docker installation not found. Docker will be installed"
|
||||
curl -fsSL https://get.docker.com | sh
|
||||
fi
|
||||
- name: Install npm dependencies
|
||||
run: |
|
||||
echo "Installing fetch"
|
||||
install_node=$false
|
||||
if ! command -v node &> /dev/null; then
|
||||
echo "No version of NodeJS detected"
|
||||
install_node=true
|
||||
else
|
||||
node_version=$(node -v)
|
||||
node_version=${node_version:1} # Remove 'v' at the beginning
|
||||
node_version=${node_version%\.*} # Remove trailing ".*".
|
||||
node_version=${node_version%\.*} # Remove trailing ".*".
|
||||
node_version=$(($node_version)) # Convert the NodeJS version number from a string to an integer.
|
||||
if [ $node_version -lt 24 ]; then
|
||||
echo "node version : " $node_version
|
||||
echo $"removing outdated npm version"
|
||||
install_node=true
|
||||
apt-get update
|
||||
apt-get remove nodejs npm
|
||||
apt-get purge nodejs
|
||||
rm -rf /usr/local/bin/npm
|
||||
rm -rf /usr/local/share/man/man1/node*
|
||||
rm -rf /usr/local/lib/dtrace/node.d
|
||||
rm -rf ~/.npm
|
||||
rm -rf ~/.node-gyp
|
||||
rm -rf /opt/local/bin/node
|
||||
rm -rf opt/local/include/node
|
||||
rm -rf /opt/local/lib/node_modules
|
||||
rm -rf /usr/local/lib/node*
|
||||
rm -rf /usr/local/include/node*
|
||||
rm -rf /usr/local/bin/node*
|
||||
fi
|
||||
fi
|
||||
|
||||
if $install_node; then
|
||||
NODE_MAJOR=24
|
||||
echo "Installing node ${NODE_MAJOR}"
|
||||
if test -f /etc/apt/keyrings/nodesource.gpg; then
|
||||
rm /etc/apt/keyrings/nodesource.gpg
|
||||
fi
|
||||
if test -f /etc/apt/sources.list.d/nodesource.list; then
|
||||
rm /etc/apt/sources.list.d/nodesource.list
|
||||
fi
|
||||
apt-get update
|
||||
apt-get install -y -q ca-certificates curl gnupg
|
||||
mkdir -p /etc/apt/keyrings
|
||||
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
||||
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODE_MAJOR}.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
|
||||
apt-get update
|
||||
apt-get install -y -q nodejs
|
||||
npm install npm --global
|
||||
fi
|
||||
|
||||
echo "node version : " $(node -v)
|
||||
|
||||
package='node-fetch'
|
||||
if [ `npm list -g | grep -c $package` -eq 0 ]; then
|
||||
npm install -g $package
|
||||
fi
|
||||
- name: Set up Docker Buildx
|
||||
uses: https://github.com/docker/setup-buildx-action@v3
|
||||
- name: Login to Gitea container registry
|
||||
@@ -44,6 +103,12 @@ jobs:
|
||||
tags: |
|
||||
type=semver,pattern={{raw}}
|
||||
type=sha
|
||||
- name: Docker Hub Description
|
||||
uses: peter-evans/dockerhub-description@v5
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||
repository: davidquinonescl/hyperion-docker
|
||||
- name: Build and push
|
||||
uses: https://github.com/docker/build-push-action@v5
|
||||
with:
|
||||
|
||||
@@ -8,15 +8,17 @@ ENV START_SCRIPT=$START_SCRIPT_ARG
|
||||
COPY config.json /config/config.json
|
||||
RUN mkdir $(echo "${WORKDIR}") -p
|
||||
COPY start.sh $WORKDIR
|
||||
COPY build.sh .
|
||||
RUN apk update \
|
||||
&& apk upgrade --available \
|
||||
&& apk add tzdata bash \
|
||||
&& npm install -g npm@latest \
|
||||
&& npm install -g plutotv-scraper \
|
||||
&& chmod +x build.sh \
|
||||
&& bash build.sh \
|
||||
&& ln -s /config/config.json $(echo "${WORKDIR}/config.json") \
|
||||
&& mkdir /public \
|
||||
&& chmod +x "$START_SCRIPT" \
|
||||
&& rm -rf /var/cache/apk/*
|
||||
&& rm -rf /var/cache/apk/* \
|
||||
&& rm build.sh
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
ENTRYPOINT bash $START_SCRIPT work-dir="$WORKDIR"
|
||||
EXPOSE 5050
|
||||
23
README.md
23
README.md
@@ -67,13 +67,22 @@ services:
|
||||
|
||||
### Versions
|
||||
|
||||
This image is bound to the content of the [iptv-org/epg](https://github.com/iptv-org/epg) repository. In the underlying list you can see to which commit each version of the docker image is bound.
|
||||
|
||||
Normally when a change is made in the source repository the documentation is updated and a new tag is created in this repository. This is completely normal since the source repository is only cloned during the build process of the docker image.
|
||||
|
||||
Sometimes a new version of this image will be bound to the same source commit. This will happen when improvements are made to the image.
|
||||
|
||||
- 1.0.0
|
||||
1.1.21
|
||||
- 1.0.1
|
||||
1.1.24
|
||||
1.1.24
|
||||
- 1.0.2
|
||||
1.1.24<br>
|
||||
Update with an updated version that isn't published on the npm registry
|
||||
- 1.0.3
|
||||
1.1.24<br>
|
||||
Fixes the generated channels not being playable
|
||||
- 1.0.4
|
||||
1.1.24<br>
|
||||
Generated channels with V2 API and correct JWT implementaton
|
||||
- 1.0.5
|
||||
1.1.24<br>
|
||||
Url caching improvements
|
||||
- 1.0.6
|
||||
1.1.24<br>
|
||||
Addition of extra logging
|
||||
21
build.sh
Normal file
21
build.sh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
GIT_REPO_URL="https://github.com/4v3ngR/pluto_tv_scraper.git"
|
||||
GIT_COMMIT="cf3c05f67002b1d1b4036dbaaa7d373405b4b5a6"
|
||||
BUILD_FOLDER="/build"
|
||||
BIN_FOLDER=$"/bin/pluto"
|
||||
|
||||
apk add git
|
||||
git clone --revision=$GIT_COMMIT $GIT_REPO_URL $BUILD_FOLDER
|
||||
cd $BUILD_FOLDER
|
||||
npm install -g npm@latest
|
||||
npm install
|
||||
npm install -g .
|
||||
apk del git
|
||||
#remove unnecessary files to run the binary to save space
|
||||
rm -rf .git
|
||||
rm config.json
|
||||
rm LICENSE
|
||||
rm README.md
|
||||
rm package-lock.json
|
||||
rm .gitignore
|
||||
Reference in New Issue
Block a user