6 Commits
v0.6 ... v0.7

Author SHA1 Message Date
meeb
d92dbde781 bump to 0.7 2020-12-20 18:24:04 +11:00
meeb
e36658e1a1 missing default setting for container build 2020-12-20 17:57:04 +11:00
meeb
51cd942717 use async workers, spawn two workers by default, add TUBESYNC_WORKERS env var to adjust the number of workers, resolves #19 2020-12-20 17:52:45 +11:00
meeb
001554db1a fix format container name, resolves #22 2020-12-20 13:01:14 +11:00
meeb
7cf86bb98d fix attribute name, resolves #21 2020-12-20 04:15:43 +11:00
meeb
c28c095f48 add :latest tag warning 2020-12-19 19:29:26 +11:00
5 changed files with 36 additions and 17 deletions

View File

@@ -22,9 +22,12 @@ hopefully, quite reliable.
# Latest container image
```yaml
ghcr.io/meeb/tubesync:v0.6
ghcr.io/meeb/tubesync:v0.7
```
**NOTE: the `:latest` tag does exist, but will contain in-development commits and may
be broken. Use at your own risk.**
# Screenshots
### Dashboard
@@ -99,7 +102,7 @@ Finally, download and run the container:
```bash
# Pull a versioned image
$ docker pull ghcr.io/meeb/tubesync:v0.6
$ docker pull ghcr.io/meeb/tubesync:v0.7
# Start the container using your user ID and group ID
$ docker run \
-d \
@@ -110,7 +113,7 @@ $ docker run \
-v /some/directory/tubesync-config:/config \
-v /some/directory/tubesync-downloads:/downloads \
-p 4848:4848 \
ghcr.io/meeb/tubesync:v0.6
ghcr.io/meeb/tubesync:v0.7
```
Once running, open `http://localhost:4848` in your browser and you should see the
@@ -122,7 +125,7 @@ Alternatively, for Docker Compose, you can use something like:
```yaml
tubesync:
image: ghcr.io/meeb/tubesync:v0.6
image: ghcr.io/meeb/tubesync:v0.7
container_name: tubesync
restart: unless-stopped
ports:
@@ -210,6 +213,14 @@ every hour" or similar short interval it's entirely possible your TubeSync insta
spend its entire time just indexing the massive channel over and over again without
downloading any media. Check your tasks for the status of your TubeSync install.
If you add a significant amount of "work" due to adding many large channels you may
need to increase the number of background workers by setting the `TUBESYNC_WORKERS`
environment variable. Try around ~4 at most, although the absolute maximum allowed is 8.
**Be nice.** it's likely entirely possible your IP address could get throttled by the
source if you try and crawl extremely large amounts very quickly. **Try and be polite
with the smallest amount of indexing and concurrent downloads possible for your needs.**
# FAQ
@@ -297,15 +308,16 @@ There are a number of other environment variables you can set. These are, mostly
**NOT** required to be set in the default container installation, they are really only
useful if you are manually installing TubeSync in some other environment. These are:
| Name | What | Example |
| ------------------------ | ------------------------------------- | ---------------------------------- |
| DJANGO_SECRET_KEY | Django's SECRET_KEY | YJySXnQLB7UVZw2dXKDWxI5lEZaImK6l |
| DJANGO_FORCE_SCRIPT_NAME | Django's FORCE_SCRIPT_NAME | /somepath |
| TUBESYNC_DEBUG | Enable debugging | True |
| TUBESYNC_HOSTS | Django's ALLOWED_HOSTS | tubesync.example.com,otherhost.com |
| GUNICORN_WORKERS | Number of gunicorn workers to spawn | 3 |
| LISTEN_HOST | IP address for gunicorn to listen on | 127.0.0.1 |
| LISTEN_PORT | Port number for gunicorn to listen on | 8080 |
| Name | What | Example |
| ------------------------ | ------------------------------------------------------------ | ---------------------------------- |
| DJANGO_SECRET_KEY | Django's SECRET_KEY | YJySXnQLB7UVZw2dXKDWxI5lEZaImK6l |
| DJANGO_FORCE_SCRIPT_NAME | Django's FORCE_SCRIPT_NAME | /somepath |
| TUBESYNC_DEBUG | Enable debugging | True |
| TUBESYNC_WORKERS | Number of background workers, default is 2, max allowed is 8 | 2 |
| TUBESYNC_HOSTS | Django's ALLOWED_HOSTS | tubesync.example.com,otherhost.com |
| GUNICORN_WORKERS | Number of gunicorn workers to spawn | 3 |
| LISTEN_HOST | IP address for gunicorn to listen on | 127.0.0.1 |
| LISTEN_PORT | Port number for gunicorn to listen on | 8080 |
# Manual, non-containerised, installation

View File

@@ -315,7 +315,7 @@ def download_media(media_id):
media.downloaded_audio_codec = cformat['acodec']
if cformat['vcodec']:
# Combined
media.downloaded_format = vformat['format']
media.downloaded_format = cformat['format']
media.downloaded_height = cformat['height']
media.downloaded_width = cformat['width']
media.downloaded_video_codec = cformat['vcodec']

View File

@@ -1011,7 +1011,7 @@ class UpdateMediaServerView(FormView, SingleObjectMixin):
def get_context_data(self, *args, **kwargs):
data = super().get_context_data(*args, **kwargs)
data['server_help'] = self.object.help_html
data['server_help'] = self.object.get_help_html
return data
def get_success_url(self):

View File

@@ -28,6 +28,12 @@ DATABASES = {
}
}
DEFAULT_THREADS = 2
MAX_BACKGROUND_TASK_ASYNC_THREADS = 8
BACKGROUND_TASK_ASYNC_THREADS = int(os.getenv('TUBESYNC_WORKERS', DEFAULT_THREADS))
if BACKGROUND_TASK_ASYNC_THREADS > MAX_BACKGROUND_TASK_ASYNC_THREADS:
BACKGROUND_TASK_ASYNC_THREADS = MAX_BACKGROUND_TASK_ASYNC_THREADS
MEDIA_ROOT = CONFIG_BASE_DIR / 'media'
DOWNLOAD_ROOT = DOWNLOADS_BASE_DIR

View File

@@ -6,7 +6,7 @@ CONFIG_BASE_DIR = BASE_DIR
DOWNLOADS_BASE_DIR = BASE_DIR
VERSION = 0.6
VERSION = 0.7
SECRET_KEY = ''
DEBUG = False
ALLOWED_HOSTS = []
@@ -120,8 +120,9 @@ HEALTHCHECK_ALLOWED_IPS = ('127.0.0.1',)
MAX_ATTEMPTS = 10 # Number of times tasks will be retried
MAX_RUN_TIME = 1800 # Maximum amount of time in seconds a task can run
BACKGROUND_TASK_RUN_ASYNC = False # Run tasks async in the background
BACKGROUND_TASK_RUN_ASYNC = True # Run tasks async in the background
BACKGROUND_TASK_ASYNC_THREADS = 1 # Number of async tasks to run at once
MAX_BACKGROUND_TASK_ASYNC_THREADS = 8 # For sanity reasons
BACKGROUND_TASK_PRIORITY_ORDERING = 'ASC' # Use 'niceness' task priority ordering
COMPLETED_TASKS_DAYS_TO_KEEP = 7 # Number of days to keep completed tasks