Jump to content

Squid

Community Developer
  • Posts

    28,769
  • Joined

  • Last visited

  • Days Won

    314

Everything posted by Squid

  1. Not noticeably, if at all. SQL is designed for VERY large databases, and any quantity of movies, tv shows, music stored on your server would all be classified by MySQL / MariaDB as small. Links Regardless of the size of the media being indexed by the SQL database, its size is immaterial compared to the size of the media itself. IE: I think that 500MB to index 60TB is meaningless. Your mileage of course will vary, but it'll still be peanuts in the grand scheme.
  2. Can you show me this via screenshots or something? The process you're following...
  3. Nope. Its my fault... I did an update this morning and updated the md5, but forgot to update the version number. My bad... And I didn't even have a beer. (But probably not enough coffee) Should be good now...
  4. It's sorted alphabetically by the folder name. Rename the folders as you choose then rename via the hover to whatever you want Sent from my LG-D852 using Tapatalk
  5. If everything is fine as is, hit Ignore. Ideally, ask in Binhex's thread about the ramifications of not having that port defined in your template. (BTW, IIRC @binhex's template references both 58846 and 58946, so simply changing your container port is just going to change the wording (ie the port number) that FCP is complaining about)
  6. Squid

    Docker FAQ

    How Do I Pass Through A device To A Container? To pass through a device to a container you use the device tag in the Extra Parameters field in the container template. It is only visible in advanced mode. The device tag looks like this: --device=/path/to/device Let's say we want to pass through a USB to RS232 adapter to a container. When you connect the adapter to the unRAID server you will see that a device is created in /dev/. If this is the only USB to RS232 adapter you have it will most likely get /dev/ttyUSB0. To pass this through to the container we add the below in the Extra Parameters field. --device=/dev/ttyUSB0 When you start the container again, you should have the device available. If the device do not get a device created in /dev/ you can pass it through using the bus path. Let's say we want to pass through a PC/SC card reader. To find the correct path go to Tools --> System Device in the webgui and find your device in the USB device section. In my case I want to pass through my OmniKey CardMan 6121. Bus 002 Device 003: ID 076b:6622 OmniKey AG CardMan 6121 The important info here is the Bus and Device number. The first part of the path is always the same, /dev/bus/usb/. After that comes the Bus number, then the Device number like this: /dev/bus/usb/Bus/Device. So in my case it will be like below. --device=/dev/bus/usb/002/003 USB device can be passed through without installing the driver in unRAID, but will need the driver installed in the container. For devices like a PCIe DVB card, the driver must be installed in unRAID. In short I guess one could say that a device can be passed through as long as a device is created in /dev/. The device tag will follow the path recursively and add every device found to the container.
  7. Squid

    Docker FAQ

    How do I Stop/Start/Restart Docker via Command Line Easily with these simple commands. docker stop dockername [Stops Docker] docker start dockername [Starts Docker] docker restart dockername [Stops and restarts running Docker, if not running starts Docker] Want to put it in a script? Start Plex for example: #!/bin/bash docker start Plex
  8. Squid

    Docker FAQ

    I want to change the port my docker container is running on or I have two containers that want to use the same port, how do I do that? So say you had four apps with random docker container ports, just edit like this... Don't change the container port as you can see in this bit of a Dockerfile (code used to generate a container) from nzbget, only 6789 is actually "exposed" so even if you change it in the app's webui to 6788, it won't be able to communicate as only 6789 is exposed to the host at the container/host interface. # ports and volumes VOLUME /config /downloads EXPOSE 6789
  9. Squid

    Docker FAQ

    I want to run a container from docker hub, how do I interpret the instructions. Using the duplicati container as an example. Basically looking at the instructions: docker run --rm -it \ -v /root/.config/Duplicati/:/root/.config/Duplicati/ \ -v /data:/data \ -e DUPLICATI_PASS=duplicatiPass \ -e MONO_EXTERNAL_ENCODINGS=UTF-8 \ -p 8200:8200 \ intersoftlab/duplicati:canary --rm = remove the container when exits (Not sure we want that) But if you did then you could add it into the extra parameters box -it = open an interactive pseudoterminal (Not sure why with a webui) But if you did then you could add it into the extra parameters box -v /root/.config/Duplicati/:/root/.config/Duplicati/ = map a volume host:container therefore I would suggest -v /mnt/cache/appdata/duplicati:/root/.config/Duplicati -v /data:/data = map a volume host:container therefore I would suggest -v /mnt/user/share:/data -e DUPLICATI_PASS=duplicatiPass = Set webui password -e MONO_EXTERNAL_ENCODINGS=UTF-8 = Encoding - Leave at UTF-8 -p 8200:8200 = Port mapping container:port intersoftlab/duplicati:canary = dockerhub repository/image:tag Pasting all that into Unraid: And hey presto...
  10. Squid

    Docker FAQ

    Can I switch Docker containers, same app, from one author to another? How do I do it? For a given application, how do I change Docker containers, to one from a different author or group? Answer is based on Kode's work here. Some applications have several Docker containers built for them, and often they are interchangeable, with few or only small differences in style, users, permissions, Docker base, support provided, etc. For example, Plex has a number of container choices built for it, and with care you can switch between them. Stop your current Docker container Click the Docker icon, select Edit on the current docker, and take a screenshot of the current Volume Mappings; if there are Advanced settings, copy them too Click on the Docker icon, select Remove, and at the prompt select "Container and Image" Find the new version in Community Applications and click Add Make the changes and additions necessary, so that the volume and port mappings and advanced settings match your screenshots and notes Click Create and wait (it may take awhile); that's it, you're done! Test it of course The last step may take quite awhile, in some cases a half hour or more. The setup may include special one-time tasks such as checking and correcting permissions.
  11. Squid

    Docker FAQ

    How should I set up my appdata share? NOTE There still seem to be some applications that prefer to have their /config folder mapping set to /mnt/cache/appdata/... instead of /mnt/user/... The most trouble-free experience with docker applications will always be directly referencing disk shares (/mnt/cache/appdata/...) instead of user shares. If you are doing this, then you should have the appdata share set up to be use cache drive: only. Original Posting: Assuming that you have a cache drive, the appdata share should be set up as use cache drive: prefer and not use cache only Why? What difference does it make? The difference is because of what happens should the cache drive happen to fill up (due to downloads, or the cache floor setting within Global Share Settings). If the appdata share is set up to use cache: only, then any docker application writing to its appdata will fail with a disk full error (which may in turn have detrimental effects on your apps) If the appdata share is set up to use cache: prefer then should the cache drive become full, then any additional write by the apps to appdata will be redirected to the array, and the app will not fail with an error. Once space is freed up on the cache drive, then mover will automatically move those files back to the cache drive where they belong
  12. Squid

    Docker FAQ

    Why can't I delete / modify files created by CouchPotato (or another docker app)? You may see something like Quote This is because the standard permissions that CP is setting on the newly downloaded media does not allow access via unRaid's share system. Within CP's settings, change the permissions to something like this: EDIT: Photobucket sucks, and has removed the ability to show pictures on a forum without paying them something like $300US per year. Basically you're going to set CP to store the files with permissions of 0777 (probably need to hit advanced settings) While the New Permissions tool can be run to fix the permissions on media already moved to the array, running this tool may have adverse affects on docker applications, since those apps usually have unique permission requirements within their appdata folder / files. Either run New Permissions, and specifically exclude the drive your appdata is stored on (and CA's appdata backup folder if backing up the appdata via CA), or use the Docker Safe New Permissions Tools included with the Fix Common Problems plugin which excludes appdata and CA's appdata backup automatically
  13. Squid

    Docker FAQ

    With 6.2, do I need to move my appdata and/or docker image into unRaid's recommended shares? (/mnt/user/appdata for appdata and /mnt/user/system for the docker.img) No you do not need to move the files at all, and everything will still work 100%. For docker.img, unRaid 6.2 will automatically pick up where your image was stored previously. For new installs of docker, just change the default Docker storage location to whatever you want. (Settings - Docker Settings) For appdata, for already installed applications, nothing will change if the appdata is not stored in the default location. However on new application installations, unRaid will tend to fill out the /config volume mapping to whatever it's default is set to. Go to Settings - Docker Settings to change the default appdata storage location to your existing appdata path. NOTE: Neither of those settings will allow you to outright specifiy a drive (ie: cache) as the location. To force the defaults onto anything other than a user share, you will have to type in the path. IE: /mnt/cache/myAppdataShare). Another NOTE: With 6.2 properly supporting hardlinks / symlinks on user shares, its not as big a deal as it was to set the appdata onto a user share, and then use the share settings to make sure that it is set to be a cache-only share. If you already have an appdata share, and do not change the default docker appdata location to point to your pre-existing share, then new applications that you add will use the LT default share, while your old ones will use your pre-existing share. Not a problem in and by itself, but at the very least its confusing, and if you also happen to use CA's appdata module then only one of them is going to get backed up so you have the potential for data loss in the event of a cache-drive failure.
  14. Squid

    Docker FAQ

    I've recreated my docker.img file. How do I re-add all my old apps? Two ways: Old Way: From the Docker Tab, go to Add Container, and select one of the my* templates then hit add New Way: From within Community Applications, go to previous apps, and hit Reinstall on the app. Using either method, no adjustment of the template should be necessary, as it will be automatically populated with all of your old volume and port mappings, etc. After the downloads are complete, you're back in business like nothing happened at all.
  15. Squid

    Docker FAQ

    How do I limit the memory usage of a docker application? Personally, on my system I limit the memory of most of my docker applications so that there is always (hopefully) memory available for other applications / unRaid if the need arises. IE: if you watch CA's resource monitor / cAdvisor carefully when an application like nzbGet is unpacking / par-checking, you will see that its memory used skyrockets, but the same operation can take place in far less memory (albeit at a slightly slower speed). The memory used will not be available to another application such as Plex until after the unpack / par check is completed. To limit the memory usage of a particular app, add this to the extra parameters section of the app when you edit / add it: --memory=4G This will limit the memory of the application to a maximum of 4G
  16. Squid

    Docker FAQ

    How do I limit the CPU resources of a docker application? Two methods: The first is the easiest and doesn't involve much thought about what's going on under the covers: Pin the application to one or more cores of the CPU. This way the application will only execute on that particular core(s), leaving the other cores open for other applications / vms / etc On 6.6+ on the Settings - CPU Pinning you can select which core(s) the docker application will run on. NOTE though that if you are also isolating CPU cores from the OS, then you do not want to pin a docker container to multiple isolated cores. If you do that the container will only run on the lowest isolated core. (This may seem counter-intuitive, but it is NOT a bug anywhere but is actually correct operation) Alternatively, you can also prioritize one docker app over another: eg: You're running the folding@home app and plex. When Plex starts transcoding you want to give it as much CPU as possible at the expense of folding@home To do something like this, you would add to the extra parameters section of folding@home the following: --cpu-shares=2 This gives folding@home the absolute lowest cpu priority, so that if another docker app requires / wants to use all the cpu available it will. Note that if the other docker apps are idle and doing nothing, then folding@home will use as much as it can (subject to its own internal settings) This is a rather simple example, only utilizing 2 apps. Here is a better example (and an explanation of what's actually happening when using 3+ apps) (from the docker run reference): Note that it is more complicated (and beyond the scope of a FAQ) to prioritize non-docker applications over a docker application. For those so-inclined, review the docker run reference and play around
  17. Squid

    Docker FAQ

    Why does Sonarr keep telling me that it cannot import a file downloaded by nzbGet? (AKA Linking between containers) This problem seems to continually be brought back up, and the reasons all go back to host / container volume mapping. (note that I'm using nzbget / sonarr as an example, but the concept is the same for any apps that communicate via their APIs and not by "blackhole" method) First and foremost, within Sonarr's settings, tell it to communicate to nzbGet via the IP address of the server, not via localhost Here is how a file gets found by Sonarr, downloaded by nzbGet, post-processed by Sonarr, and moved to your array. Sonarr searches the indexers for the file, and then tells nzbGet (utilizing its API key) to download the file. Very few users have trouble with this section. nzbGet downloads the file, and then tells Sonarr the path that the file exists at. This is the section this FAQ entry is going to deal with. Sonarr performs whatever post processing you want them to do (see their appropriate project pages for help with this. Sonarr then moves the file from the downloaded location to the array. Once again, very few users have trouble with this section. nzbGet downloads the file, and then tells Sonarr the path that the file exists at Let's imagine some host / container volume mappings set up as follows (this set up seems to be a common set up for users having trouble) App Name Container Volume Host Volume nzbGet /config /mnt/cache/appdata/nzbget sonarr /config /mnt/cache/appdata/sonarr /downloads /mnt/cache/appdata/nzbget/downloads/completed/ Within nzbGet's settings, the downloads are set to go to /config/downloads/completed So after the download is completed, nzbGet tells sonarr that the file exists at /config/downloads/completed Sonarr dutifully looks at /config/downloads/completed and sees that nothing exists there and throws errors into its log stating that it can't import the file. Error will be something like can't import /config/downloads/completed/filename Why? Because the mappings don't match. Sonarr's /config mapping is set to /mnt/cache/appdata/sonarr, whereas nzbGet's /config mapping is set to /mnt/cache/appdata/nzbget. Ultimately, the file is stored at /mnt/cache/appdata/nzbget/downloads/completed/, and sonarr winds up looking for it at /mnt/cache/appdata/sonarr/downloads/completed. Another common set up issue (which is closer to working) App Name Container Volume Host Volume nzbGet /config /mnt/cache/appdata/nzbget /downloads /mnt/cache/appdata/downloads sonarr /config /mnt/cache/appdata/sonarr /downloads /mnt/cache/appdata/downloads/completed Here's what happens with this setup nzbGet is setup to download the files to /downloads/completed After a successful download, the file exists (as far as nzbGet is concerned) at /downloads/completed/...., and nzbGet tells sonarr that. Sonarr then looks for the file, and is unable to find it and throws errors into the logs. And the kicker is that the error states something along the lines of "Can't import /downloads/completed/whateverFilenameItIs" Everything kinda looks right. After all the error message is showing the correct path... No its not, because the mappings don't match between sonarr and nzbGet for the downloads nzbGet puts the file to /downloads/completed/filename (host mapping of /mnt/cache/appdata/downloads/completed/filename) sonarr is looking for the file at /downloads/filename (host mapped of /mnt/cache/appdata/downloads/completed/completed/filename) Huh? I don't get it. -> The container paths match between the two apps, but the host paths are different, which means that communication isn't going to work correctly. Think of the "container" path as a shortcut to the host path. Proper way to set up the mappings: App Name Container Volume Host Volume nzbGet /config /mnt/cache/appdata/nzbget /downloads /mnt/cache/appdata/downloads sonarr /config /mnt/cache/appdata/sonarr /downloads /mnt/cache/appdata/downloads Tell nzbget to store the files in /downloads/completed, and sonarr will be able to find and import the files because both the host and container volume paths match. TLDR: Trust me the above works
  18. Squid

    Docker FAQ

    How Do I Create My Own Docker Templates? (See also https://forums.unraid.net/topic/101424-how-to-publish-docker-templates-to-community-applications-on-unraid/ for a video which covers much of this) Edit: This FAQ entry is for developers only. Users do not need to worry about any of this. This question keeps coming up, and rather than have the answer continually buried in the Programming forum I elected to put it here instead. On the Settings tab, docker, select Docker Authoring Mode (The docker service has to be stopped to do this) On The Docker tab, select Add Container Fill out all of the relevant information, including the advanced section. Note that you DO NOT need to fill out host volumes. It is OK however to fill out the host ports. I would however recommend against filling out any host paths. Click Save Copy and paste the ENTIRE XML that appears to an appropriately named XML file somewhere. Side note, the Categories which dockerMan generates are unofficial. The only official entries for that are generated by the Application Template Categorizer. (Although at this time and for the foreseeable future the two do match) Also, these are Categories. They are not Tags IE: You can't just make one up by yourself. - Add in whatever other tags you wish that are documented here (http://lime-technology.com/forum/index.php?topic=40299.0 ) * NOTE: It is recommended (by not required) to host the icon yourself on your own github repository, or a website which you are in control of. Random icon links on the web can and do change. Publishing to CA Create a GitHub repository and upload the XML(s). Use a separate repository for your xml files. (Keep it separate from the docker associated files if you've built your own container). If you have multiple templates, put them all into the same repository. NOTE: The XML files must be within the "master" or "main" branch of the repository. 2FA Authentication must be enabled on your GitHub repository for security. Drop myself (squid) a PM asking for it to be published with a link to the github repo. I'm going to insist you create a <Support> thread. Just create it anywhere (as you won't be able to create in the docker Containers) and a moderator will move it. Update the XML with the support link. I will also insist on Categories being set. I do a quick check on the xml(s) and then add it to CA. If there are no major problems, within 2 hours all users of CA will have access to it under normal circumstances. Time permitting after its available to all users of CA, I will update the Repositories thread If you like, also add a developer profile https://forums.unraid.net/topic/38619-docker-template-xml-schema/page/3/?tab=comments#comment-919111 Note: After you have a repository added, I do not need to know about any new xml's being added. CA (and more to the point the appfeed) will handle all changes to the xml's automatically every 2 hours. Regarding "Developer Status": Side Note: You can always see what errors are made in the template by going to the Apps Tab, Statistics and then viewing template errors. The apps tab reserves the right to modify any template values in the XML for varying reasons. The reasons could be Relatively minor issues that may affect CA The templateURL entry will ALWAYS be filled out or changed by CA to be correct The Icon URL may get changed to ensure that its a valid URL, it points to HTTPS, and if a HTTPS version is not available (but HTTP is), then it will get changed to a cached HTTPS version NOTE: Also see here for the various policies regarding applications and CA
  19. Squid

    Docker FAQ

    How do I know if I've set up my paths, ports, etc correctly? There is a new plugin Fix Common Problems that will scan your installed application settings (paths and ports) looking for some common issues with them (amongst other checks)
  20. Port 58946 isn't listed in your template, but it is in the template supplied by binhex
  21. The message was by design. To let you know that the script wasn't found. The plugin cannot update the cron when the script is manually deleted. But, I now see how this can mess people up, especially with rapid cron schedules, so I've switched it to suppress the message.
  22. Edit the template (click on the icon). Next to your path mappings, hit edit, then set the access mode for them to be RW:Slave Without Slave mode set, anything mounted in /mnt/disks may not be visible within a docker application consistently (the folder will always appear, but the contents may not depending upon the circumstances)
  23. http://kodi.wiki/view/Advancedsettings.xml Section 2.3.15 Set it on whatever is going to do the initial scan. Personally before I ever trash my library, I always export the library (to separate files). This will store the xml for each movie within its folder to speed up rescans, and also winds up storing the watched status.
×
×
  • Create New...