Setting up Tube Archivist with Docker#
Overview#
Tube Archivist depends on three containers:
- The Tube Archivist container running the main application
- Redis for queue and cache storage
- ElasticSearch for your index.
Info
All environment variables are documented at installation/Environment Variables.
Info
Also see installation/Docker for Beginners explaining some core concepts of docker and docker compose.
Tube Archivist requires Docker. Please make sure that Docker is installed and running on your computer before continuing.
Also see:
For minimal system requirements, the Tube Archivist stack needs around 2GB of available memory for a small testing setup and around 4GB of available memory for a mid to large sized installation. Minimum requirements for CPU are usually expected to be dual core with 4 threads, with better performance coming from quad core and higher, and more available threads.
Info
For arm64: Tube Archivist is built as a multi-architecture (multi-arch) container, same for Redis. Elasticsearch should use the official image for arm64 support. Other architectures are not supported.
Untested
ARM64 builds are essentially untested, as none of the devs have access to any ARM64 devices. There are regular unstable builds, for both architecture platforms. Help with testing to verify things are working as expected, also on ARM64.
Save the docker-compose.yml file from the Tube Archivist repository somewhere permanent on your system, keeping it named docker-compose.yml
. You'll need to refer to it whenever starting this application.
Install Tube Archivist#
Quickstart
All you really need to configure is the TA_HOST
environment variable.
Networking#
The main container serves the interface on port 8000
with Nginx. Nginx is packaged in the container and serves the static files and handles proxy requests to the backend.
- For port collisions, see Docker for Beginners/#networking.
- Alternatively to modify the port, see Environment Variables/#TA_PORT
The React TS based frontend is compiled and served by Nginx from the static
folder.
The Python Django based backend is served with uvicorn
on the container internal port 8080
.
- Only container internal. Nginx handles proxying requests to the backend
- To modify, see Environment Variables/#TA_BACKEND_PORT
Volumes#
This container expects two volumes:
/cache
: That is not really a cache any more now in the classical sense but holds persistent data like artwork and more./youtube
: Location for your downloaded video files.
Install Redis#
BE AWARE
Sharing the same Redis container between different projects is not supported.
Redis functions as a cache and temporary link between the application and the file system. Redis is used to store and display messages and configuration variables. Redis is also responsible for keeping track of the queues.
- Communicate by default over port
6379
- Needs a volume to allow persistence at
/data
.
Redis on a custom port#
For some environments, it might be required to run Redis on a non-standard port. For example, to change the Redis port to 6380
, set the following values:
-
For the archivist-redis service, set an additional key:
command: --port 6380
and update theexpose
value for your reference:services: archivist-redis: [...] command: --port 6380 expose: - "6380" [...]
-
For the Tube Archivist service make sure to also update the REDIS_CON value. e.g.:
redis://archivist-redis:6380
Install ElasticSearch#
Elasticsearch Version
Tube Archivist depends on Elasticsearch 8.
Use bbilly1/tubearchivist-es
to automatically get the recommended version, or use the official image with the version tag in the docker-compose.yml
file.
Use the official Elasticsearch image for arm64.
Elasticsearch stores the video metadata and enables searchable functionality for all fields. Elasticsearch is also used to keep track of the download queue.
- Needs to be accessible over the default port
9200
- Needs a volume to store persistent data linked to
/usr/share/elasticsearch/data
Follow the documentation for additional installation details and options.
Elasticsearch on a custom port#
Should you need to change the port for Elasticsearch to, for example 9500
, follow these steps:
- Set the environment variable
http.port=9500
for the ES container - Change the
expose
value for the ES container to match your port number - For the TA container, change the
ES_URL
environment variable, i.e.ES_URL=http://archivist-es:9500
Support#
If you're still having trouble, join us on discord and come to the #support channel.