Commit graph

64 commits

Author SHA1 Message Date
Ross Patterson
ff66ff5be0
fix(docker): Add default crontab download command (#1321)
* docs(docker): Recommended image DEFAULT_WORKSPACE

* fix(docker): Add default crontab download command

Clarify the `/config/ytdl-sub-configs/cron` script with explanatory comments and a
default `--dry-run` command. Also change the wrapper script to echo commands for easier
debugging. To update an existing script, move the old script aside, restart the
container to regenerate it, and edit the new script.

Also clarify the Automating page in the Getting Started guide docs.

* fix(docker): Unintentional unattended dry runs

[PR feedback](https://github.com/jmbannon/ytdl-sub/pull/1321#discussion_r2315215600)
prompted me to reconsider having a default command at all. We should assume,
unfortunately, that many new users will just skim the docs enough to enable the image's
cron integration but not actually incrementally test their configuration. In those
cases, they'd end up sending dry-run non-download requests for all their subscriptions
every 6 hours for no good reason. There's just no way to provide a default command that
isn't also providing a footgun.

* docs(docker): More open cron schedule generator

From [PR
feedback](https://github.com/jmbannon/ytdl-sub/pull/1321#discussion_r2320521024), this
seems like less of an ad than the previous and the source for the page is itself open source.

* docs(docker): Document image environment footgun

From [PR
feedback](https://github.com/jmbannon/ytdl-sub/pull/1321#discussion_r2320515419).

* docs(automate): Avoid external link 404 responses

* docs(automate): False simultaneous run warning

* docs(automate): Clarify Docker daemon restarts

* docs(automate): Revert run start non-recommended

* docs(automate): Remove footgun manual run command

Addressing this underlying issue requires more thought and should be a separate PR.

* docs(automate): Restore env var footgun in example
2026-03-09 09:27:27 -07:00
Jesse Bannon
24e71ce733
[DOCKER] Make defaults script executable (#1388)
Fixes https://github.com/jmbannon/ytdl-sub/issues/1387 and some potential docker issues by not having this file ran on start.
2025-11-26 20:22:22 -08:00
Maxim Borisov
a74c79d014
[DOCKER] Ensure correct cron log file permissions (#1378)
Co-authored-by: bedlamzd <vcs@bedlamzd.dev>
2025-11-09 09:51:57 -08:00
Colin Davis
2c33c3b49b
[DOCKER] Add curl-cffi and yt-dlp-ejs dependencies
Adds recommended deps from yt-dlp README
2025-11-07 17:01:48 -08:00
Snuffy2
e507e6ed46
[DOCKER] Disable pip break-system-packages (#1373)
Fixes `UPDATE_YT_DLP_ON_START` when set to 'nightly' as the pip command is missing --break-system-packages. Simplifies dockerfiles by setting this globally via pip config file.

Thanks @Snuffy2 for the contribution!
2025-11-06 21:08:10 -08:00
Jesse Bannon
2deafc9f2d
[DOCKER] Include Deno dependency, other fixes (#1345)
Closes
- Deno requirement: https://github.com/jmbannon/ytdl-sub/issues/1340
  - yt-dlp announcement: https://github.com/yt-dlp/yt-dlp/issues/14404
- Docker cron log double-logging: https://github.com/jmbannon/ytdl-sub/issues/1202 (thanks @timetocode for https://github.com/jmbannon/ytdl-sub/pull/1330 !)
- Missing pip dependency when updating yt-dlp: https://github.com/jmbannon/ytdl-sub/issues/1346
2025-09-27 16:43:34 -07:00
Jesse Bannon
609bec8aaf
[DOCKER] Do not remove pip for headless image (#1347)
Closes https://github.com/jmbannon/ytdl-sub/issues/1346

Keeps pip in the image to be able to update yt-dlp
2025-09-27 15:11:56 -07:00
Jesse Bannon
cc3a36e66a [HOTFIX] Fix CRON_SCHEDULE env var 2025-09-27 14:58:29 -07:00
Jesse Bannon
4f8490d88c
[DOCKER] Env variable to update yt-dlp on start (#1344)
Closes https://github.com/jmbannon/ytdl-sub/issues/1154

For docker images, add the ability to set the variable `UPDATE_YT_DLP_ON_START`, which will update yt-dlp to the specified version if a new one exists.

Supports ``stable``,  ``nightly``, ``master``.
2025-09-27 14:09:57 -07:00
Jesse Bannon
a7cf361821
[DOCKER] Make default paths same as docker defaults (#1332)
Changes documentation and default configs to use the `/tv_shows` default path shown in the docker compose setup.
Also changes working directory and file lock directory to not be in /tmp, which often causes permission issues.
2025-09-05 22:50:47 -07:00
Jesse Bannon
3eb838eb40
[DOCKER] Set default workspace separately for GUI image (#1328)
Another attempt to fix some broken cron setups
2025-09-01 11:26:36 -07:00
Jesse Bannon
c2afe05c11
[DOCKER] Fix & issue in cron (#1325)
Fixes the following issue in some people's cron runs:
```
/bin/sh: 4: /config/.cron_wrapper: Syntax error: "&" unexpected
```
2025-08-31 18:59:59 -07:00
Ross Patterson
283ccc8608
fix(docker): Default config available in WORKDIR (#1303)
Adds better support to run commands via `docker exec ...` by setting the working directory to be ytdl-sub's working directory.

Thanks @rpatterson for the contribution 😊
2025-08-27 20:17:57 -07:00
Ross Patterson
26922e1787
[DOCKER] Missing cron script stderr output (#1307) 2025-08-27 09:02:45 -07:00
Ross Patterson
8eb5215a0c
[DOCS]: Large file long cross-device renames (#1301)
From [Discord discussion](https://discord.com/channels/994270357957648404/994270357957648408/1408832178623741993).
2025-08-24 07:55:16 -07:00
Ross Patterson
e1f81e5274
[DOCS] Add Architecture section and Quick Start (#1287)
* docs(config): Clarify preset ordering priority

Refs #1276

* docs(architecture): WIP Narrative how it works

Much of this is repetition of the reference docs and some of the changes here should
also be applied here. The goal is to repeat here the parts of the reference docs that
may hang up a user when reading "Getting Started" without sending them off to get lost
in the weeds of the reference docs.

Note that this references a `Quick Start` document which is just an empty placeholder
and is to be written in a subsequent change.

Fixes #1279

* docs(terms): Glossary redundant with architecture

Now that the introduction includes an architectural overview, that section introduces
new users to necessary concepts and associated terminology and makes the terminology
section redundant in that part of the docs.

* docs(quick): Add a rote quick start guide

This is what I came up with when I tried to write instructions requiring as little
understanding as possible. Doing so really did reinforce my impression that this just
shouldn't be done, that significant understanding is required for *any* use of ytdl-sub
and even offering a quick start may be irresponsible. I'm still on the fence, thoughts?

That said, I also think I got some good explanations out of this and a better
understanding of what the next bits of the Getting Started should be. This Quick Start
is currently redundant with other parts of the Getting Started pages. I suspect that
I'll end up repeating and/or reorganizing parts of this Quick Start into the next bits
of the Getting Started. To that end I might argue that this change is a WIP and that
merging should wait. But I could also argue that this is an incremental improvement and
can be merged before that other work. Your call.

* docs(start): Various rST/Sphinx markup issues
2025-08-19 00:38:39 -07:00
Jesse Bannon
faf9fd8a10
[DOCKER] Update yt-dlp, fix phantomjs (#1240)
Bumps [yt-dlp[default]](https://github.com/yt-dlp/yt-dlp) from 2025.5.22 to 2025.6.9.
- [Release notes](https://github.com/yt-dlp/yt-dlp/releases)
- [Changelog](https://github.com/yt-dlp/yt-dlp/blob/master/Changelog.md)
- [Commits](https://github.com/yt-dlp/yt-dlp/compare/2025.05.22...2025.06.09)

Also fixes phantomjs in docker builds
2025-06-11 23:25:56 -07:00
Jesse Bannon
e27a7c5495
[DOCKER] Fix various cron issues (#1204)
Closes
- https://github.com/jmbannon/ytdl-sub/issues/1200
  - Runs in the background now
- https://github.com/jmbannon/ytdl-sub/issues/1201
  - Was not running as user `abc`, now it is
- https://github.com/jmbannon/ytdl-sub/issues/1202
  - Due to reading stdout and tail of hidden log file. Should only tail from hidden log file now

Will leave crontab as-is if no CRON_SCHEDULE is specified
2025-04-02 21:22:12 -07:00
Jesse Bannon
1264f0c656
[DOCKER] Update Ubuntu-based images (#1185)
- Update Ubuntu-based images to use Python 3.12
- Move hidden files from GUI image's main dir
- Update github workflows to use python 3.12
- Update fixtures
- Minor doc fixes
2025-03-15 21:58:51 -07:00
Jesse Bannon
51c134a036
[DOCKER] Simplify cron (#1184)
Drastically simplifies setting up cron within ytdl-sub. Below is the documentation which is available in readthedocs, and a section on how to migrate from the old way to this.

## New Cron Documentation
Cron is preconfigured in every ytdl-sub docker container. Enable by adding the following ENV variables to your docker setup.

```
services:
  ytdl-sub:
    environment:
    - CRON_SCHEDULE="0 */6 * * *"
    - CRON_RUN_ON_START=false
```  
- CRON_SCHEDULE follows the standard [cron scheduling syntax](https://crontab.guru/#0_*/6_*_*_*). The above value will run the script once every 6 hours.
- CRON_RUN_ON_START toggles whether to run your cron script on container start.

The cron script will reside in the main directory with the file name `cron`. Cron logs should show when viewing the Docker logs.

## Migrating Existing Cron Setup
Containers' cron files will remain intact until you add the `CRON_SCHEDULE` variable. Once you add that with your preferred schedule, it will write that value to /config/crontabs/abc and create a new file `cron` within your working directory. Simply copy everything from your existing `run_cron` script into `cron`.

If you have the ENV variable `DOCKER_MODS` in your docker-compose, remove it. It is now included by default. Not removing this will prevent cron logs from showing in your docker container logs.
2025-03-15 15:47:03 -07:00
Jesse Bannon
2b1e74bc8e
[DOCKER] Export SSL certs (#1163)
Fixes a common issue with downloading channel thumbnails and fanart.
2025-01-26 21:07:54 -08:00
Joey Babcock
fa13ba30cf
[DOCS] Fixing 404 link to presets (#1008) 2024-06-22 23:30:21 -07:00
Jesse Bannon
248e9a15a6
[DOCS] Various doc cleanups (#928) 2024-02-17 08:53:06 -08:00
Jesse Bannon
544af2207b
[FEATURE] Add output_options.keep_max_files to limit number of downloads per subscription (#820)
Adds a new mechanism to limit subscriptions' number of videos to an explicit number (only supported date ranges prior to this).

Example usage:
```
output_options:
  keep_max_files: 10
```
will only keep 10 videos at max.

In addition:
- `keep_max_files` is bundled into the `Only Recent` preset and can be used via setting the `only_recent_max_files` override variable (see examples or README for usage).
- Changed the `date_range` variable name to `only_recent_date_range` for more clarity.  Usage of `date_range` will continue to work.
2023-11-17 09:01:21 -08:00
Jesse Bannon
c7fce5dbdd
[BACKEND] Upgrade yt-dlp to 2023.11.16 (#817) 2023-11-15 16:58:29 -08:00
Jesse Bannon
19eee28f4a
[DOCKER] New default config/subscription in Docker (#798)
The default subscription file in the docker container now matches the one in the repo's README
2023-11-03 17:14:38 -07:00
Jesse Bannon
d64d863175
[DOCKER][BUGFIX] Upgrade base code-server image to fix ytdl-sub-gui image (#797)
As of ~2 days ago, the ytdl-sub-gui image broke from using an older version of the `code-server` image. After this push, it should be fixed + working as intended
2023-11-03 14:04:12 -07:00
Jesse Bannon
c149957b04
[DOCKER] Remove default gui settings (#776) 2023-10-22 14:35:52 -07:00
Jesse Bannon
ee09e85a33
[DOCKER] Move cont-init.d files (#775) 2023-10-22 13:02:06 -07:00
Jesse Bannon
c932583165
[DOCKER] GUI Docker image using Code-Server (#774)
Adds a new docker image: `ytdl-sub-gui:latest` which is ytdl-sub packaged with VS-Code via LinuxServer.io's code-server image: https://hub.docker.com/r/linuxserver/code-server

Proper documentation will be added later
2023-10-22 01:17:09 -07:00
Jesse Bannon
a9e6a80111
[REFACTOR] Support simple download (#671)
* [REFACTOR] Support simple `download`

* fix test

* asdfas
2023-07-26 09:00:00 -07:00
Jesse Bannon
598b1da8a4
[REFACTOR] Purge download_strategy from configs + tests (#670) 2023-07-25 20:26:04 -07:00
Jesse Bannon
3404ed9cc5
[DOCKER][BUGFIX] Use PUID/PGID to chown /config dir (#644)
* [DOCKER][BUGFIX] Use `PUID`/`PGID` to chown `/config` dir

* lint
2023-07-24 10:12:20 -07:00
Jesse Bannon
d8a64ca82c
[DOCKER] Use official phantomjs package, fix system pip install (#658) 2023-07-24 09:36:38 -07:00
Jesse Bannon
f0847cee63
Revert "[BACKEND] Update yt-dlp to latest commit (#655)" (#656)
This reverts commit 3cbd07c9a4.
2023-07-18 13:17:19 -07:00
Jesse Bannon
3cbd07c9a4
[BACKEND] Update yt-dlp to latest commit (#655)
* [BACKEND] Update yt-dlp to latest commit

* git for installing commits
2023-07-18 10:48:16 -07:00
Jesse Bannon
8f4cc5df39
[DOCKER] Fix ubuntu docker build (#589) 2023-04-12 09:13:15 -07:00
Jesse Bannon
c77015353d
[DOCKER] Install aria2 in container (#577) 2023-04-02 22:10:51 -07:00
Jesse Bannon
84cd611f89
[BUGFIX] File name too long with -thumb.jpg, upgrade docker alpine image (#560) 2023-03-24 11:15:54 -07:00
Jesse Bannon
52fdc9a213
[DOCKER] Add ubuntu docker image for device passthrough (#545) 2023-03-15 14:10:32 -07:00
Jesse Bannon
5d57eb14b8
[DOCS] Universal cron mod for docker (#495) 2023-03-02 11:24:04 -08:00
Jesse Bannon
c153185b33
[DOCKER] Relax ffmpeg version requirement (#465) 2023-02-22 09:53:24 -08:00
Jesse Bannon
f713d720e4
[DOCKER] Upgrade ffmpeg, add phantomjs (#448)
* [DOCKER] Upgrade ffmpeg, add phantomjs

* only install phantomjs for x86

* lint
2023-02-20 09:36:41 -08:00
Jesse Bannon
031e17307a
[BACKEND] Check ffmpeg + ytdl-sub versions in Dockerfile to ensure successful installation (#359) 2022-11-24 19:19:42 -08:00
Jesse Bannon
06a9ed2974
[DOCKER][BUGFIX] Fix ffmpeg (#358) 2022-11-24 10:29:38 -08:00
Jesse Bannon
ead5620c5c
[FEATURE] Add mp3 id3v2.4 multi-tag support (#356)
* [FEATURE] Add mp3 id3v2.4 multi-tag support

* docs

* fix new docker issue

* update fixture
2022-11-24 00:56:23 -08:00
Jesse Bannon
21eb36774b
[DOCKER] Use alpine-3.16, update ffmpeg (attempt 2) (#332)
* Revert "Revert "[DOCKER] Use alpine-3.16, update ffmpeg (#330)" (#331)"

This reverts commit 1fa3aa5967.

* update mediafile

* lots of changes

* remove setup py
2022-11-15 13:34:47 -08:00
Jesse Bannon
1fa3aa5967
Revert "[DOCKER] Use alpine-3.16, update ffmpeg (#330)" (#331)
This reverts commit 7b43aa904b.
2022-11-15 11:29:49 -08:00
Jesse Bannon
7b43aa904b
[DOCKER] Use alpine-3.16, update ffmpeg (#330) 2022-11-15 11:16:45 -08:00
Jesse Bannon
d49cd95c08
Revert "[BACKEND] Use latest ffmpeg (#327)" (#329)
This reverts commit 52b0130888.
2022-11-15 09:14:19 -08:00