Metube download location?

Joined
Jan 18, 2019
Messages
52
Good afternoon everyone

I install Truenas Scale in a virtual machine to play around with and installed MeTube using the apps and i'm a little lost on setting a new download location for the program. The hub.docker.com page for Metube states.

"Certain values can be set via environment variables, using the -e parameter on the docker command line, or the environment: section in docker-compose. DOWNLOAD_DIR: path to where the downloads will be saved. Defaults to /downloads in the docker image, and . otherwise."

I have jumped into the shell looking for the way to change the download location and found a file to edit which is in /app/main.py which contains the download location but it's read only so can't edit. I am pretty new to docker learning the basics and getting to grips with it but i am totally lost on how to get the download location changed.

I have a mount point added simply titled /MeTube to the docker but that's as far as i have gotten.

Here is the hub link for a better explanation on how to change variables. https://hub.docker.com/r/alexta69/metube

Cheers everyone.
 

Heavy

Explorer
Joined
Aug 12, 2021
Messages
57
1659637994912.png


I have never setup the application..
But you should just be able to change it to hostpath if you wish to see the downloaded files from your servers folder structure.

However, changing to hostpath CAN break rollbacks (application and type of storage dependent, you'd probably be fine with this app), so its best to keep Type of Storage set to PVC, then use a script like heavy_script.sh to mount the volume temporarily. I guess it all depends on what you are trying to do.
 
Joined
Jan 18, 2019
Messages
52
Cheers for the reply

The downloaded files for Metube are downloaded to /home/Downloads which is the typical location of any Linux install when downloading from a web browser. In the Link i added it says

"Certain values can be set via environment variables, using the -e parameter on the docker command line, or the environment: section in docker-compose."

DOWNLOAD_DIR: path to where the downloads will be saved. Defaults to /downloads in the docker image, and . otherwise.

I have done the following in the photo to add a Dataset location to use for the downloads instead of the default /home/downloads which is what MeTube uses, the issue i am having is how to change the default location, i found a config file but it's read only and the information in the link which describes how to set your own download location instead of using the default which i am trying to do has gone right over my head as i'm new to Docker and learning how to set stuff up.
 

Attachments

  • Screenshot from 2022-08-04 19-48-07.png
    Screenshot from 2022-08-04 19-48-07.png
    27.3 KB · Views: 512

Heavy

Explorer
Joined
Aug 12, 2021
Messages
57
Cheers for the reply

The downloaded files for Metube are downloaded to /home/Downloads which is the typical location of any Linux install when downloading from a web browser. In the Link i added it says

"Certain values can be set via environment variables, using the -e parameter on the docker command line, or the environment: section in docker-compose."

DOWNLOAD_DIR: path to where the downloads will be saved. Defaults to /downloads in the docker image, and . otherwise.

I have done the following in the photo to add a Dataset location to use for the downloads instead of the default /home/downloads which is what MeTube uses, the issue i am having is how to change the default location, i found a config file but it's read only and the information in the link which describes how to set your own download location instead of using the default which i am trying to do has gone right over my head as i'm new to Docker and learning how to set stuff up.
Are you using Truecharts version of MeTube? If not, how are you launching the application?

If you are launching it yourself, you can use the env var im assuming, but if not you should not have to use the env var as the storage under the Truecharts app already has an option to change the downloaded path. (if the description is correct).
 
Joined
Jan 18, 2019
Messages
52
I am using the Truecharts version and added the mount path i want to use as the new download location and it still downloads to /home/downloads. Unless i am totally missing something right before my eyes adding a mount point to storage and persistence doesn't change a thing.
 

Heavy

Explorer
Joined
Aug 12, 2021
Messages
57
I am using the Truecharts version and added the mount path i want to use as the new download location and it still downloads to /home/downloads. Unless i am totally missing something right before my eyes adding a mount point to storage and persistence doesn't change a thing.
Yes, you are missing something.
You are attempting to add additional storage. When all you SHOULD have to do is EDIT the existing storage.

1. Go to your edit configuration for MeTube
2. Scroll down to Storage and Persistence
3. Look at my photo
a. Under App Download Storage
b. Look for Type of Storage
c. Change it to Hostpath (simple)
d. Under Hostpath, enter the path you wish to save your files.

IF that does not work, THEN you can try adding additonal storage, and setting the download storage with an environment variable. It looks like right now though, that it is un-needed.

I highlighted all of the stuff to look for under Storage and Persistance in red, in my photo I posted earlier.
 
Joined
Jan 18, 2019
Messages
52
I have followed the steps on the photo you added and all i get is the error in the photo if i use the Hostpath (Simple) and add the location i want to download and then save and it will sit at deploying and do nothing else. How would i set the download storage using an environment variable?
 

Attachments

  • Screenshot from 2022-08-05 10-08-00.png
    Screenshot from 2022-08-05 10-08-00.png
    96.2 KB · Views: 553

Heavy

Explorer
Joined
Aug 12, 2021
Messages
57
Method 1.

Edit the storage to hostpath.. like ive been saying works, I deployed the app as a sanity check, and it did download to the hostpath I specified.

If it didnt work for you, you have to be doing something wrong. Delete the app and retry or something. Also make sure your dataset permissions for the hostpath you are choosing allows apps:apps to access it.
1659722087461.png
 

Heavy

Explorer
Joined
Aug 12, 2021
Messages
57
Method 2.

Replace the default directory with your own hostpath as @danb35 suggests.. Although not as easy as method 1, it does work. Tested it, and my download location was /downloads, not /home/downloads

1659722639322.png
 

Heavy

Explorer
Joined
Aug 12, 2021
Messages
57
Method 3.

Using the ENV Var

Just make sure the two mountpaths are equal

These ALL work. its just that the first one is by far the easiest, and its built into the chart.

1659722955228.png



1659722988279.png
 

Heavy

Explorer
Joined
Aug 12, 2021
Messages
57
By the way, this app does run as apps:apps or 568:568
1659723145549.png


Which means your dataset should look like this:

1659723192633.png
 
Joined
Jan 18, 2019
Messages
52
Thank you for the response, the issue was resolved

i removed the app, reinstalled, hostpath (simple) was pointed towards /Vol5/Downloads/MeTube but it still failed on the container till i realised i had not added the user apps to the Dataset and once i did it downloaded fine.

Regards
 
Top