[![Version][github-version-img]][github-version-uri]
-[![Docker Version][dockerhub-version-img]][dockerhub-version-uri]
[![Downloads][github-downloads-img]][github-downloads-uri]
-[![Docker Pulls][dockerhub-pulls-img]][dockerhub-pulls-uri]
-[![Build Status][github-build-img]][github-build-uri]
[![Size][github-size-img]][github-size-img]
[![Last Commit][github-commit-img]][github-commit-img]
[![Contributors][contribs-all-img]](#contributors-)
@@ -49,26 +24,30 @@ Makes use of the generous work over at [https://github.com/dtankdempse/thetvapp-
- [About](#about)
-- [Docker Images](#docker-images)
-- [Docker Tags](#docker-tags)
-- [Install](#install)
- - [Docker Run](#docker-run)
- - [Docker Compose](#docker-compose)
- - [Traefik](#traefik)
- - [Dynamic.yml](#dynamicyml)
- - [Static.yml](#staticyml)
- - [certificatesResolvers](#certificatesresolvers)
- - [entryPoints (Normal)](#entrypoints-normal)
- - [entryPoints (Cloudflare)](#entrypoints-cloudflare)
-- [Env Variables \& Volumes](#env-variables--volumes)
- - [Environment Variables](#environment-variables)
- - [Volumes](#volumes)
-- [Build](#build)
- - [Troubleshooting](#troubleshooting)
- - [Permission Denied](#permission-denied)
-- [Shell / Bash](#shell--bash)
-- [SSL Certificates](#ssl-certificates)
-- [Logs](#logs)
+- [Building `tvapp` Image](#building-tvapp-image)
+ - [Before Building](#before-building)
+ - [LF over CRLF](#lf-over-crlf)
+ - [Set `+x / 0755` Permissions](#set-x--0755-permissions)
+ - [Build `tvapp` Image](#build-tvapp-image)
+ - [Option 1: Using `docker build`](#option-1-using-docker-build)
+ - [amd64](#amd64)
+ - [arm64 / aarch64](#arm64--aarch64)
+ - [Option 2: Using `docker buildx`](#option-2-using-docker-buildx)
+ - [Build \& Save Local Image](#build--save-local-image)
+ - [amd64](#amd64-1)
+ - [arm64 / aarch64](#arm64--aarch64-1)
+ - [Build \& Upload to Registry](#build--upload-to-registry)
+ - [amd64](#amd64-2)
+ - [arm64 / aarch64](#arm64--aarch64-2)
+ - [Option 3: Using `package.json`](#option-3-using-packagejson)
+ - [Platform Commands](#platform-commands)
+ - [Available Variables](#available-variables)
+- [Using `tvapp` Image](#using-tvapp-image)
+ - [docker run](#docker-run)
+ - [docker-compose.yml](#docker-composeyml)
+- [Extra Notes](#extra-notes)
+ - [Custom Docker Image Scripts](#custom-docker-image-scripts)
+- [Dedication](#dedication)
- [Contributors ✨](#contributors-)
@@ -78,22 +57,17 @@ Makes use of the generous work over at [https://github.com/dtankdempse/thetvapp-
## About
-This container allows you to automatically fetch the latest `.m3u8` playlist, and `.xml` guide files for the TheTvApp IPTV service.
-Once the container is started up, an initial grab will be done immediately. After that initial grab, the container will periodically grab new copies of the files every X hours, which can be adjusted by modifying the docker environment variables.
+- TVApp2 makes fetch request to [tvapp2-externals](https://git.binaryninja.net/pub_projects/tvapp2-externals 'tvapp2-externals') making updates to external formats agnostic to pushing a new container image.
+- TVApp2 makes fetch request to [XMLTV-EPG](https://git.binaryninja.net/pub_projects/XMLTV-EPG 'XMLTV-EPG') making updates to EPG data based on customized channel ids. Channel ids are specific to each EPG record which makes obfusctaing channel ids difficult.
-The fetched .m3u8 and .xml files are then placed in a self-hosted nginx webserver which allows you to add the direct links directly into applications such as Jellyfin without having to go back and update the files on your own.
-
-
-
-Container supports the following:
-- Automatically grabs .m3u8 and .xml files when container started up
-- Every 60 minutes, a new copy of the .m3u8 and .xml files will be fetched
-- Supports both ports `80` and `443`
-- Self-signed SSL certificates (optional)
-- Mountable volume to control Nginx webserver files
-- Customizable URLs via env var should the m3u8 and xml links change
-- Integrated nginx hosted file browser for viewing all downloaded files, along with date and file size
+```mermaid
+graph TD
+A[tvapp2] <--> |Fetch Formats| B(tvapp2-externals)
+A[tvapp2] <--> |Fetch XMLTV/EPG| C(XMLTV-EPG)
+B(tvapp2-externals) --> D{Pull Dynamic Formats}
+C(XMLTV-EPG) ---> E{Pull Dynamic EPG}
+```
@@ -101,386 +75,66 @@ Container supports the following:
-## Docker Images
-Use any of the following images in your `docker-compose.yml` or `run` command:
+## Building `tvapp` Image
+
+These instructions outline how to build your own tvapp2 docker image. When building your images with the commands provided below, ensure you create two sets of tags:
+
+| Architecture | Dockerfile | Tags |
+| ------------ | -------------------- | ----------------------------------------------------------------------- |
+| `amd64` | `Dockerfile` | `tvapp2:latest`
`tvapp2:1.0.0`
`tvapp2:1.0.0-amd64` |
+| `arm64` | `Dockerfile.aarch64` | `tvapp2:1.0.0-arm64` |
+
+The `amd64` arch gets a few extra tags because it should be the default image people clone.
-| Service | Version | Image Link |
-| --- | --- | --- |
-| `Docker Hub` | [![Docker Version][dockerhub-version-ftb-img]][dockerhub-version-ftb-uri] | `aetherinox/thetvapp:latest` |
-| `Github` | [![Github Version][github-version-ftb-img]][github-version-ftb-uri] | `ghcr.io/aetherinox/thetvapp-docker:latest` |
+### Before Building
+
+Prior to building the docker image, you **must** ensure the following conditions are met. If the below tasks are not performed, your docker container will throw the following errors when started:
+
+- `Failed to open apk database: Permission denied`
+- `s6-rc: warning: unable to start service init-adduser: command exited 127`
+- `unable to exec /etc/s6-overlay/s6-rc.d/init-envfile/run: Permission denied`
+- `/etc/s6-overlay/s6-rc.d/init-adduser/run: line 34: aetherxown: command not found`
+- `/etc/s6-overlay/s6-rc.d/init-adduser/run: /usr/bin/aetherxown: cannot execute: required file not found`
----
+#### LF over CRLF
+
+You cannot utilize Windows' `Carriage Return Line Feed`. All files must be converted to Unix' `Line Feed`. This can be done with **[Visual Studio Code](https://code.visualstudio.com/)**. OR; you can run the Linux terminal command `dos2unix` to convert these files.
+
+If you cloned the files from the official repository **[iflip721/tvapp2](https://git.binaryninja.net/pub_projects/tvapp2)** and have not edited them, then you should not need to do this step.
-## Docker Tags
-This repo includes a few different versions of the TheAppTV docker image.
+> [!CAUTION]
+> Be careful using the command to change **ALL** files. You should **NOT** change the files in your `.git` folder, otherwise you will corrupt your git indexes.
+>
+> If you accidentally run dos2unix on your `.git` folder, do NOT push anything to git. Pull a new copy from the repo.
-We release two versions, one docker image with just Nginx, and one with Nginx and PHP. The version that includes PHP is completely optional, and is only needed if you wish to develop your own enhancements for this image.
-
-
-
-The image that comes with Nginx and PHP is slightly larger (roughly `20MB` + more).
-
-
-
-| Tag | Includes Nginx | Includes PHP 8 | Description |
-| --- | --- | --- | --- |
-| `:latest` | ✅ | ❌ | Latest version of the image |
-| `:1.x.x` | ✅ | ❌ | Pull a specific version |
-| `:1.x.x-php` | ✅ | ✅ | Contains both Nginx and PHP; larger image size |
-
-
-
----
-
-
-
-## Install
-Instructions on using this container
-
-
-
-### Docker Run
-If you want to bring the docker container up quickly, use the following command:
-
```shell
-docker run -d --restart=unless-stopped -e CRON_TIME=*/60 * * * * -p 443:443 --name thetvapp -v ${PWD}/thetvapp:/config ghcr.io/aetherinox/thetvapp-docker:latest
+# Change ALL files
+find ./ -type f | grep -Ev '.git|*.jpg|*.jpeg|*.png' | xargs dos2unix --
+
+# Change run / binaries
+find ./ -type f -name 'run' | xargs dos2unix --
```
-### Docker Compose
-Create a new `docker-compose.yml` with the following:
-
-```yml
-services:
- thetvapp:
- container_name: thetvapp
- image: ghcr.io/aetherinox/thetvapp-docker:latest # Github image
- # image: aetherinox/thetvapp:latest # Dockerhub image
- restart: unless-stopped
- volumes:
- - ./thetvapp:/config
- environment:
- - PUID=1000
- - PGID=1000
- - TZ=Etc/UTC
- - CRON_TIME=*/60 * * * *
-```
-
-
-
-> [!CAUTION]
-> Do **not** add `"` quotation marks to `CRON_TIME` environment variable. Automated timer will not function if you do.
->
-> ✔️ Correct
-> ```yml
-> environment:
-> - CRON_TIME=*/60 * * * *
-> ```
->
-> ❌ Incorrect
-> ```yml
-> environment:
-> - CRON_TIME="*/60 * * * *"
-> ```
-
-
-
-### Traefik
-You can put this container behind Traefik if you want to use a reverse proxy and let Traefik handle the SSL certificate.
-
-
-
-> [!NOTE]
-> These steps are **optional**.
->
-> If you do not use Traefik, you can skip this section of steps. This is only for users who wish to put this container behind Traefik.
-
-
-
-#### Dynamic.yml
-Open the Traefik dynamic file which is usually named `dynamic.yml`. We need to add a new `middleware`, `router`, and `service` to our Traefik dynamic file so that it knows about our new TheTVApp container and where it is.
-
-```yml
-http:
- middlewares:
- https-redirect:
- redirectScheme:
- scheme: "https"
- permanent: true
-
- routers:
- thetvapp-http:
- service: thetvapp
- rule: Host(`domain.localhost`) || Host(`thetvapp.domain.com`)
- entryPoints:
- - http
- middlewares:
- - https-redirect@file
-
- thetvapp-https:
- service: thetvapp
- rule: Host(`domain.localhost`) || Host(`thetvapp.domain.com`)
- entryPoints:
- - https
- tls:
- certResolver: cloudflare
- domains:
- - main: "domain.com"
- sans:
- - "*.domain.com"
-
- services:
- thetvapp:
- loadBalancer:
- servers:
- - url: "https://thetvapp:443"
-```
-
-
-
-#### Static.yml
-These entries will go in your Traefik `static.yml` file. Any changes made to this file requires that you reset Traefik afterward.
-
-
-
-##### certificatesResolvers
-
-Open your Traefik `static.yml` file and add your `certResolver` from above. We are going to use Cloudflare in this exmaple, you can use whatever from the list at:
-- https://doc.traefik.io/traefik/https/acme/#providers
-
-
-
-```yml
-certificatesResolvers:
- cloudflare:
- acme:
- email: youremail@address.com
- storage: /cloudflare/acme.json
- keyType: EC256
- preferredChain: 'ISRG Root X1'
- dnsChallenge:
- provider: cloudflare
- delayBeforeCheck: 15
- resolvers:
- - "1.1.1.1:53"
- - "1.0.0.1:53"
- disablePropagationCheck: true
-```
-
-
-
-Once you pick the DNS / SSL provider you want to use from the code above, you need to see if that provider has any special environment variables that must be set. The [Providers Page](https://doc.traefik.io/traefik/https/acme/#providers) lists all providers and also what env variables need set for each one.
-
-
-
-In our example, since we are using Cloudflare for `dnsChallenge` -> `provider`, we must set:
-- `CF_API_EMAIL`
-- `CF_API_KEY`
-
-
-
-Create a `.env` environment file in the same folder where your Traefik `docker-compose.yml` file is located, and add the following:
-
-```yml
-CF_API_EMAIL=yourcloudflare@email.com
-CF_API_KEY=Your-Cloudflare-API-Key
-```
-
-
-
-Save the `.env` file and exit.
-
-
-
-##### entryPoints (Normal)
-Finally, inside the Traefik `static.yml`, we need to make sure we have our `entryPoints` configured. Add the following to the Traefik `static.yml` file only if you **DON'T** have entry points set yet:
-
-```yml
-entryPoints:
- http:
- address: :80
- http:
- redirections:
- entryPoint:
- to: https
- scheme: https
-
- https:
- address: :443
- http3: {}
- http:
- tls:
- options: default
- certResolver: cloudflare
- domains:
- - main: domain.com
- sans:
- - '*.domain.com'
-```
-
-
-
-##### entryPoints (Cloudflare)
-If your website is behind Cloudflare's proxy service, you need to modify your `entryPoints` above so that you can automatically allow Cloudflare's IP addresses through. This means your entry points will look a bit different.
-
-
-
-In the example below, we will add `forwardedHeaders` -> `trustedIPs` and add all of Cloudflare's IPs to the list which are available here:
-- https://www.cloudflare.com/ips/
-
-```yml
- http:
- address: :80
- forwardedHeaders:
- trustedIPs: &trustedIps
- - 103.21.244.0/22
- - 103.22.200.0/22
- - 103.31.4.0/22
- - 104.16.0.0/13
- - 104.24.0.0/14
- - 108.162.192.0/18
- - 131.0.72.0/22
- - 141.101.64.0/18
- - 162.158.0.0/15
- - 172.64.0.0/13
- - 173.245.48.0/20
- - 188.114.96.0/20
- - 190.93.240.0/20
- - 197.234.240.0/22
- - 198.41.128.0/17
- - 2400:cb00::/32
- - 2606:4700::/32
- - 2803:f800::/32
- - 2405:b500::/32
- - 2405:8100::/32
- - 2a06:98c0::/29
- - 2c0f:f248::/32
- http:
- redirections:
- entryPoint:
- to: https
- scheme: https
-
- https:
- address: :443
- http3: {}
- forwardedHeaders:
- trustedIPs: *trustedIps
- http:
- tls:
- options: default
- certResolver: cloudflare
- domains:
- - main: domain.com
- sans:
- - '*.domain.com'
-```
-
-
-
-Save the files and then give Traefik and your TheTvApp containers a restart.
-
-
-
----
-
-
-
-## Env Variables & Volumes
-This section outlines that environment variables can be specified, and which volumes you can mount when the container is started.
-
-
-
-### Environment Variables
-The following env variables can be modified before spinning up this container:
-
-
-
-| Env Var | Default | Description |
-| --- | --- | --- |
-| `PUID` | 1000 |
User ID running the container |
-| `PGID` | 1000 |
Group ID running the container |
-| `TZ` | Etc/UTC |
Timezone |
-| `PORT_HTTP` | 80 |
Defines the HTTP port to run on |
-| `PORT_HTTPS` | 443 |
Defines the HTTPS port to run on |
-| `CRON_TIME` | 0/60 * * * * |
Determines how often the .m3u8 and .xml guide files are updated |
-| `URL_XML` |
https://raw.githubusercontent.com/dtankdempse/thetvapp-m3u/refs/heads/main/guide/epg.xml |
URL to fetch `.xml` file |
-| `URL_XML_GZ` |
https://raw.githubusercontent.com/dtankdempse/thetvapp-m3u/refs/heads/main/guide/epg.xml.gz |
URL to fetch `.xml.gz` file |
-| `URL_M3U` |
https://thetvapp-m3u.data-search.workers.dev/playlist |
URL to fetch `.m3u8` file |
-
-
-
-Please note that you can change the URLs for the files fetched from the internet, but it is highly advised to not do this unless you know for sure that the location paths have changed. To change the URLs to the `m3u8`, `.xml`, and `.xml.gz`; change the following environment variables:
-
-- `URL_XML=https://url/to/file.xml`
-- `URL_XML_GZ=https://url/to/file.xml.gz`
-- `URL_M3U=https://url/to/file.m3u8`
-
-
-
-### Volumes
-The following volumes can be mounted with this container:
-
-
-
-| Volume | Description |
-| --- | --- |
-| `./thetvapp:/config` |
Path which stores downloaded `.m3u8`, `.xml`, nginx configs, and optional SSL certificate/keys |
-
-
-
-By mounting the volume above, you should now have access to the following folders:
-
-
-| Folder | Description |
-| --- | --- |
-| `📁 keys` |
Responsible for storing your ssl certificate `cert.crt` + key `cert.key` |
-| `📁 log` |
All nginx and php logs |
-| `📁 nginx` |
Contains `nginx.conf`, `resolver.conf`, `ssl.conf`, `site-confs` |
-| `📁 php` |
Contains `php-local.ini`, `www2.conf` |
-| `📁 www` |
Folder where downloaded `.m3u8`, `.xml`, and `.xml.gz` will be downloaded to |
-
-
-
----
-
-
-
-## Build
-You can build your own copy of the image by running the following:
+#### Set `+x / 0755` Permissions
+The files contained within this repo **MUST** have `chmod 755` / `+x` executable permissions.
```shell
-git clone https://github.com/Aetherinox/thetvapp-docker.git .
-docker build -t thetvapp:latest thetvapp:1.0.0 .
+find ./ -name 'run' -exec sudo chmod +x {} \;
```
-### Troubleshooting
-These are issues you may experience when building and deploying your own custom image.
-
-
-
-#### Permission Denied
-
-```console
-Failed to open apk database: Permission denied
-unable to exec /etc/s6-overlay/s6-rc.d/init-envfile/run: Permission denied
-unable to exec /etc/s6-overlay/s6-rc.d/init-envfile/run: Permission denied
-```
-
-
-
-If you receive any type of `permission denied` error when running your custom image, you must ensure that certain files have executable `+x` (or `0755`) permissions. Once you fix the file permissions, re-build the image. A full list of files requiring elevated permissions are listed below:
+**[Optional]**: If you want to set the permissions manually, run the following below. If you executed the `find` command above, you don't need to run the list of commands below:
```shell
sudo chmod +x /root/etc/s6-overlay/s6-rc.d/init-adduser/run
@@ -498,8 +152,303 @@ sudo chmod +x /root/etc/s6-overlay/s6-rc.d/init-version-checks/run
sudo chmod +x /root/etc/s6-overlay/s6-rc.d/svc-cron/run
sudo chmod +x /root/etc/s6-overlay/s6-rc.d/svc-nginx/run
sudo chmod +x /root/etc/s6-overlay/s6-rc.d/svc-php-fpm/run
-sudo chmod +x /run.sh
-sudo chmod +x /download.sh
+```
+
+
+
+### Build `tvapp` Image
+After completing the items above, you can now build the **[iflip721/tvapp2](https://git.binaryninja.net/pub_projects/tvapp2)** image. You can now build the TvApp2 docker image. Pick your platform below and run the associated command. Most people will want to use [amd64](#amd64).
+
+
+
+Instructions have been provided below on two different ways you can build the TvApp2 docker image. You can use either one, it depends on what tools you have available on the system you're.
+
+- [Using docker build commands](#option-1-using-docker-build)
+- [Using docker buildx commands](#option-2-using-docker-buildx)
+- [Using available node commands](#option-3-using-packagejson)
+
+
+
+#### Option 1: Using `docker build`
+
+This method will show you how to build the TVApp2 docker image using `docker build`; this is typically what most people should use.
+
+
+
+##### amd64
+
+```shell ignore
+# Build tvapp2 amd64
+docker build --network=host --build-arg VERSION=1.0.0 --build-arg BUILDDATE=20250224 -t tvapp2:latest -t tvapp2:1.0.0 -t tvapp2:1.0.0-amd64 -f Dockerfile .
+```
+
+
+
+##### arm64 / aarch64
+
+```shell ignore
+# Build tvapp2 arm64
+docker build --network=host --build-arg VERSION=1.0.0 --build-arg BUILDDATE=20250224 -t tvapp2:1.0.0-arm64 -f Dockerfile.aarch64 .
+```
+
+
+
+
+#### Option 2: Using `docker buildx`
+
+This section explains how to build the TVApp2 docker image using `docker buildx` instead of `docker build`. It is useful when generating your app's image for multiple platforms.
+
+
+
+All of the needed Docker files already exist in the repository. To get started, clone the repo to a folder
+
+```shell ignore
+mkdir tvapp2 && cd tvapp2
+
+# to clone from our gitea website
+git clone https://git.binaryninja.net/pub_projects/tvapp2.git ./
+
+# to clone from our github website
+git clone https://github.com/iFlip721/tvapp2.git ./
+```
+
+
+
+Once the files are downloaded, create a new container for **buildx**
+
+```shell ignore
+docker buildx create --driver docker-container --name container --bootstrap --use
+```
+
+
+
+**
Optional** If you have previously created this image and have not restarted your system, clean up the original container before you build again:
+
+```shell ignore
+docker buildx rm container
+
+docker buildx create --driver docker-container --name container --bootstrap --use
+```
+
+
+
+You are now ready to build the TVApp2 docker image. Two different options are provided below:
+- **Option 1:** [Build & Save Local Image](#build--save-local-image)
+ - Use this option if you only wish to build the image and use it.
+- **Option 2:** [Build & Upload to Registry](#build--upload-to-registry)
+ - Use this option if you wish to build the image and publish it to a registry online for others to use.
+
+
+
+##### Build & Save Local Image
+The command below will build your TVApp2 docker image, and save a local copy of your docker app, which can be immediately used, or seen using `docker ps`.
+
+
+
+
+###### amd64
+```shell ignore
+# Build tvapp2 amd64
+docker buildx build --no-cache --pull --build-arg VERSION=1.0.0 --build-arg BUILDDATE=20250224 -t tvapp2:latest -t tvapp2:1.0.0 --platform=linux/amd64 --output type=docker --output type=docker .
+```
+
+
+
+###### arm64 / aarch64
+```shell ignore
+# Build tvapp2 arm64
+docker buildx build --no-cache --pull --build-arg VERSION=1.0.0 --build-arg BUILDDATE=20250224 -t tvapp2:latest -t tvapp2:1.0.0 --platform=linux/arm64 --output type=docker --output type=docker .
+```
+
+
+
+If we list our docker images, we should see our new one:
+
+```
+$ docker images
+
+tvapp2 1.0.0 122e9b2c6046 1 minute ago 107MB
+tvapp2 1.0.0-amd64 122e9b2c6046 1 minute ago 107MB
+tvapp2 latest 122e9b2c6046 1 minute ago 107MB
+```
+
+
+
+
+##### Build & Upload to Registry
+
+This option builds your TVApp2 docker image, and then pushes the new image to a registry such as hub.docker.com or Github's registry ghcr.
+
+Before you can push the image, ensure you are signed into Docker CLI. Open your Linux terminal and see if you are already signed in:
+
+```shell ignore
+docker info | grep Username
+```
+
+
+
+If nothing is printed; then you are not signed in. Initiate the web login:
+
+```shell ignore
+docker login
+```
+
+
+
+Some text will appear on-screen, copy the code, open your browser, and go to https://login.docker.com/activate
+
+```console
+USING WEB BASED LOGIN
+To sign in with credentials on the command line, use 'docker login -u
'
+
+Your one-time device confirmation code is: XXXX-XXXX
+Press ENTER to open your browser or submit your device code here: https://login.docker.com/activate
+
+Waiting for authentication in the browser…
+```
+
+
+
+Once you are finished in your browser, you can return to your Linux terminal, and it should bring you back to where you can type a command. You can now verify again if you are signed in:
+
+```shell ignore
+docker info | grep Username
+```
+
+
+
+You should see your name:
+```console
+ Username: Aetherinox
+```
+
+
+
+You are ready to build the TVApp2 docker image, run the command for your platform:
+
+###### amd64
+
+```shell ignore
+docker buildx build --no-cache --pull --build-arg VERSION=1.0.0 --build-arg BUILDDATE=20250224 -t tvapp2:latest -t tvapp2:1.0.0 --platform=linux/amd64 --provenance=true --sbom=true --builder=container --push .
+```
+
+###### arm64 / aarch64
+
+```shell ignore
+docker buildx build --no-cache --pull --build-arg VERSION=1.0.0 --build-arg BUILDDATE=20250224 -t tvapp2:latest -t tvapp2:1.0.0 --platform=linux/arm64 --provenance=true --sbom=true --builder=container --push .
+```
+
+
+
+
+#### Option 3: Using `package.json`
+
+This node project includes build commands. In order to use them you must install node on your machine.
+
+```shell ignore
+sudo apt-get install node
+```
+
+
+
+To build the project, `cd` into the project folder and run the build command:
+
+```shell ignore
+cd /home/docker/tvapp2/
+
+npm run docker:build:amd64 --VERSION=1.0.1 --BUILDDATE=20250220
+```
+
+
+
+##### Platform Commands
+
+The following is a list of the available commands you can pick from depending on how you would like to build TvAPP2:
+
+| Command | Description |
+| --- | --- |
+| `docker:build:amd64` | Build image using `docker build` for `amd64` |
+| `docker:build:arm64` | Build image using `docker build` for `arm64 / aarch64` |
+| `docker:buildx:amd64` | Build image using `docker buildx` for `amd64` |
+| `docker:buildx:arm64` | Build image using `docker buildx` for `arm64 / aarch64` |
+
+
+
+##### Available Variables
+The run command above has several variables you must specify:
+
+| Variable | Description |
+| --- | --- |
+| `--VERSION=1.X.X` | The version to assign to the docker image |
+| `--BUILDDATE=20250220` | The date to assign to the docker image.
Date format: `YEAR / MONTH / DAY` |
+
+
+
+
+---
+
+
+
+## Using `tvapp` Image
+To use the new TVApp2 image, you can either call it with the `docker run` command, or create a new `docker-compose.yml` and specify the image:
+
+
+
+### docker run
+If you want to use the tvapp docker image in the `docker run` command, execute the following:
+```shell ignore
+docker run -d --restart=unless-stopped -p 4124:4124 --name tvapp2 -v ${PWD}/tvapp:/config ghcr.io/iflip721/tvapp2:latest
+```
+
+
+
+### docker-compose.yml
+If you'd much rather use a `docker-compose.yml` file and call the tvapp image that way, create a new folder somewhere:
+```shell ignore
+mkdir -p /home/docker/tvapp2
+```
+
+
+
+Then create a new `docker-compose.yml` file and add the following:
+```shell ignore
+sudo nano /home/docker/tvapp2/docker-compose.yml
+```
+
+
+
+Add the following to your `docker-compose.yml`:
+
+```yml ignore
+services:
+ tvapp:
+ container_name: tvapp2
+ image: ghcr.io/iflip721/tvapp2:latest # Github image
+ # image: iflip721/tvapp:latest # Dockerhub image
+ restart: unless-stopped
+ volumes:
+ - ./tvapp:/config
+ environment:
+ - PUID=1000
+ - PGID=1000
+ - TZ=Etc/UTC
+```
+
+
+
+Once the `docker-compose.yml` is set up, you can now start your TVApp2 container:
+
+```shell ignore
+cd /home/docker/tvapp2/
+docker compose up -d
+```
+
+
+
+TVApp2 should now be running as a container. You can access it by opening your browser and going to:
+
+```shell ignore
+http://container-ip:4124
```
@@ -508,51 +457,64 @@ sudo chmod +x /download.sh
-## Shell / Bash
-You can access the docker container's shell by running:
+## Extra Notes
+
+The following are other things to take into consideration when creating the TVApp2 image:
+
+
+
+### Custom Docker Image Scripts
+
+These instructions are for **Advanced Users Only**
+
+The `🔀 iflip721/tvapp2` image supports the ability of adding custom scripts that will be ran when the container is started. To create / add a new custom script to the container, you need to create a new folder in the container source files `/root` folder
```shell
-docker exec -it thetvapp ash
+mkdir -p /root/custom-cont-init.d/
```
----
+Within this new folder, add your custom script:
+
+```shell
+nano /root/custom-cont-init.d/my_customs_script
+```
-## SSL Certificates
-This docker image automatically generates an SSL certificate when the nginx server is brought online.
+Your new custom script should be populated with the bash code you want to perform actions with such as the example below:
+
+```bash
+#!/bin/bash
+
+echo "**** INSTALLING BASH ****"
+apk add --no-cache bash
+```
-
-
-
-
-You may opt to either use the generated self-signed certificate, or you can add your own. If you decide to use your own self-signed certificate, ensure you have mounted the `/config` volume in your `docker-compose.yml`:
+When you create the docker image, this new script will automatically be loaded. You can also do this via the `📄 docker-compose.yml` file by mounting a new volume:
```yml
services:
- thetvapp:
- container_name: thetvapp
- image: ghcr.io/aetherinox/thetvapp-docker:latest # Github image
- restart: unless-stopped
+ tvapp2:
volumes:
- - ./thetvapp:/config
+ - ./tvapp2:/config
+ - ./custom-scripts:/custom-cont-init.d:ro
```
-Then navigate to the newly mounted folder and add your `📄 cert.crt` and `🔑 cert.key` files to the `📁 /thetvapp/keys/*` folder.
-
-
-
> [!NOTE]
-> If you are generating your own certificate and key, we recommend a minimum of:
-> - RSA: `2048 bits`
-> - ECC: `256 bits`
-> - ECDSA: `P-384 or P-521`
+> if using compose, we recommend mounting them **read-only** (`:ro`) so that container processes cannot write to the location.
+
+> [!WARNING]
+> The folder `📂 /root/custom-cont-init.d` **MUST** be owned by `root`. If this is not the case, this folder will be renamed and a new empty folder will be created. This is to prevent remote code execution by putting scripts in the aforesaid folder.
+
+
+
+The `🔀 iflip721/tvapp2` image already contains a custom script called `📄 /root/custom-cont-init.d/plugins`. Do **NOT** edit this script. It is what automatically downloads the official TVApp2 plugins and adds them to the container.
@@ -560,42 +522,9 @@ Then navigate to the newly mounted folder and add your `📄 cert.crt` and `🔑
-## Logs
-This image spits out detailed information about its current progress. You can either use `docker logs` or a 3rd party app such as [Portainer](https://portainer.io/) to view the logs.
+## Dedication
-
-
-```shell
-───────────────────────────────────────────────────────────────
- TheTvApp Docker Container
-───────────────────────────────────────────────────────────────
-
- This container automatically downloads the m3u8 and xml guide
- data from
- - https://github.com/dtankdempse/thetvapp-m3u
-
- Once the data is downloaded, you can access the files from
- the container's webserver.
-
- User ID ........... 1000
- Group ID .......... 1000
- Port HTTP ......... 80
- Port HTTPS ........ 443
-
-───────────────────────────────────────────────────────────────
-
- SSL : Using existing keys found in /config/keys
- Loader : No custom files found, skipping...
- Core : Completed loading container
- Config : Setting task to run */60 * * * *
- Setting timezone Etc/UTC
-
- Start : Downloading latest thetvapp m3u + xml
- Getting thetvapp.xml › https://raw.githubusercontent.com/dtankdempse/thetvapp-m3u/refs/heads/main/guide/epg.xml
- Getting thetvapp.xml.gz › https://raw.githubusercontent.com/dtankdempse/thetvapp-m3u/refs/heads/main/guide/epg.xml.gz
- Getting thetvapp.m3u8 › https://thetvapp-m3u.data-search.workers.dev/playlist
- End : Finished update at 12-01-2024 15:00:00
-```
+This repository and this project serves in memory of the developer [dtankdemp](https://hub.docker.com/r/dtankdemp). His work lives on in this project, and while a lot of it has changed, it all started because of him.
@@ -612,15 +541,11 @@ We are always looking for contributors. If you feel that you can provide somethi
Want to help but can't write code?
-- Review [active questions by our community](https://github.com/Aetherinox/thetvapp-docker/labels/help%20wanted) and answer the ones you know.
+- Review [active questions by our community](https://github.com/iFlip721/tvapp2/labels/help%20wanted) and answer the ones you know.
-
-
-
-
-
+
@@ -638,12 +563,19 @@ The following people have helped get this project going:
@@ -653,86 +585,43 @@ The following people have helped get this project going: