Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a0396f33a6 | |||
| ec896c9a83 | |||
| f1d13d49f3 | |||
| e0940fa82e | |||
|
|
6214ea290f | ||
|
|
833c9f9a95 | ||
|
|
4b1a27ab98 | ||
|
|
a4b2b8ff6e | ||
|
|
443b6ba3e2 |
@@ -21,6 +21,65 @@ jobs:
|
|||||||
echo "Docker installation not found. Docker will be installed"
|
echo "Docker installation not found. Docker will be installed"
|
||||||
curl -fsSL https://get.docker.com | sh
|
curl -fsSL https://get.docker.com | sh
|
||||||
fi
|
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
|
- name: Set up Docker Buildx
|
||||||
uses: https://github.com/docker/setup-buildx-action@v3
|
uses: https://github.com/docker/setup-buildx-action@v3
|
||||||
- name: Login to Gitea container registry
|
- name: Login to Gitea container registry
|
||||||
@@ -44,6 +103,12 @@ jobs:
|
|||||||
tags: |
|
tags: |
|
||||||
type=semver,pattern={{raw}}
|
type=semver,pattern={{raw}}
|
||||||
type=sha
|
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
|
- name: Build and push
|
||||||
uses: https://github.com/docker/build-push-action@v5
|
uses: https://github.com/docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
|
|||||||
1
.github/FUNDING.yml
vendored
Normal file
1
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
github: davidclaeysquinones
|
||||||
@@ -8,15 +8,17 @@ ENV START_SCRIPT=$START_SCRIPT_ARG
|
|||||||
COPY config.json /config/config.json
|
COPY config.json /config/config.json
|
||||||
RUN mkdir $(echo "${WORKDIR}") -p
|
RUN mkdir $(echo "${WORKDIR}") -p
|
||||||
COPY start.sh $WORKDIR
|
COPY start.sh $WORKDIR
|
||||||
|
COPY build.sh .
|
||||||
RUN apk update \
|
RUN apk update \
|
||||||
&& apk upgrade --available \
|
&& apk upgrade --available \
|
||||||
&& apk add tzdata bash \
|
&& apk add tzdata bash \
|
||||||
&& npm install -g npm@latest \
|
&& chmod +x build.sh \
|
||||||
&& npm install -g plutotv-scraper \
|
&& bash build.sh \
|
||||||
&& ln -s /config/config.json $(echo "${WORKDIR}/config.json") \
|
&& ln -s /config/config.json $(echo "${WORKDIR}/config.json") \
|
||||||
&& mkdir /public \
|
&& mkdir /public \
|
||||||
&& chmod +x "$START_SCRIPT" \
|
&& chmod +x "$START_SCRIPT" \
|
||||||
&& rm -rf /var/cache/apk/*
|
&& rm -rf /var/cache/apk/* \
|
||||||
|
&& rm build.sh
|
||||||
SHELL ["/bin/bash", "-c"]
|
SHELL ["/bin/bash", "-c"]
|
||||||
ENTRYPOINT bash $START_SCRIPT work-dir="$WORKDIR"
|
ENTRYPOINT bash $START_SCRIPT work-dir="$WORKDIR"
|
||||||
EXPOSE 5050
|
EXPOSE 5050
|
||||||
13
README.md
13
README.md
@@ -4,6 +4,9 @@ This repo builds and Docker image of [pluto_tv_scraper](https://github.com/4v3ng
|
|||||||
The purpose is to make the deployment easier and more suitable for different environments.<br>
|
The purpose is to make the deployment easier and more suitable for different environments.<br>
|
||||||
As a result an m3u8 playlist and xmltv file will be generated for pluto TV.
|
As a result an m3u8 playlist and xmltv file will be generated for pluto TV.
|
||||||
|
|
||||||
|
The original repository of this image is hosted on https://git.claeyscloud.com/david/pluto_tv_scraper-docker.<br>
|
||||||
|
A public mirror is available at https://github.com/davidclaeysquinones/pluto_tv_scraper-docker.
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
[Node](https://nodejs.org/en)<br>
|
[Node](https://nodejs.org/en)<br>
|
||||||
|
|
||||||
@@ -61,3 +64,13 @@ services:
|
|||||||
- TZ=Etc/UTC
|
- TZ=Etc/UTC
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Versions
|
||||||
|
|
||||||
|
- 1.0.0
|
||||||
|
1.1.21
|
||||||
|
- 1.0.1
|
||||||
|
1.1.24
|
||||||
|
- 1.0.2
|
||||||
|
1.1.24<br>
|
||||||
|
Update with an updated version that isn't published on the npm registry
|
||||||
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="92f960ec5423efcda9f84edaf7f37d9c2ff86776"
|
||||||
|
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