WhatManager2 icon indicating copy to clipboard operation
WhatManager2 copied to clipboard

Docker support

Open faircopy opened this issue 8 years ago • 13 comments

Some things can possibly be improved, but it's a start.

  • Including Nginx may be redundant, since uWSGI can function as an HTTP server.
  • There's a patch included in this commit to modify some WhatManager commands that handle torrent clients, I could incorporate that into WhatManager and make this behavior an option.

I can make the Docker stuff a separate GitHub repo as well, let me know what you think.

faircopy avatar Nov 05 '17 16:11 faircopy

@faircopy Docker support makes me very happy. Since I don't have the time to test this ATM, can you have some other people test it as well? Maybe people will see this here or you can recruit them in the forums. Another point - will you be able to make a Wiki page that's a guide for how to run this and how management becomes different?

karamanolev avatar Nov 05 '17 16:11 karamanolev

@karamanolev Sure, I can ask people to give it a go. There's a detailed README included, which is where I thought to keep all the related information. I can move or copy that to the Wiki so people are able to edit it.

faircopy avatar Nov 05 '17 16:11 faircopy

@faircopy If you think this is ready to go I can merge it now.

karamanolev avatar Nov 06 '17 08:11 karamanolev

@karamanolev @faircopy I've just done a quick smoke test of this. Newly installed Docker for Mac, followed the instructions in the README to set it up. I've tested that the transmission instance is up and running and I can connect to it (using Transmission Remote GUI) and that the WM2 web interface is available and appears to work. But it's not connected to a RED user and I'm not going to download any torrents as this is just a quick test.

But I see no reason why I shouldn't try and migrate my 'production' set up over to this as it seems well thought out. I just need the time!

casedefault avatar Nov 06 '17 11:11 casedefault

@karamanolev, I'd like to modify some of the Compose file based on @casedefault's recommendations and test it some more, so please don't merge yet.

faircopy avatar Nov 06 '17 12:11 faircopy

@faircopy Just keep this thread updated and I'll merge it when you are.

karamanolev avatar Nov 06 '17 12:11 karamanolev

Any update on its stability? Would love to switch to this

LennyPenny avatar Mar 26 '18 22:03 LennyPenny

@LennyPenny I'll try and finish up over the weekend, this project's been haunting me for a long time now. :ghost:

I wouldn't recommend using it yet, there's redundancy in the configuration as well as the setup process. I've been refactoring the Compose definition according to the DRY principle, that part works fine.

The main obstacle is that I wanted to be able to scale Transmission using either docker-compose scale or docker service scale, as opposed to copy-pasting sections in the Compose definitions. The former doesn't seem to be possible, lacking a way to use persistent data volumes. The latter (Docker Swarm) would only work when used on a single node, volumes don't move across swarm nodes.

Todo

  • [x] Come to a conclusion on the Transmission data volume issue.
    • If there isn't a sensible solution, include a script that generates a Compose file for Transmission stacks from a template, to avoid manual copy-paste.
  • [x] Create separate base and configuration Compose files for WM2 and Transmission stacks, so the services can be used independently of each other. Done: WhatManager has its own Compose file, and so does each Transmission group.
  • [x] Remove redundancies in Compose file and WM2 config files.
  • [x] Automate the setup process, if it doesn't add too much complexity. Done: A lot of it is automated, these steps remain manual:
    • Create superuser
    • Add download location
    • Add Transmission instances
  • [x] Fix app's Dockerfile to add application code as late as possible, to speed up development build times.
  • [ ] Move backup scripts to their own files from the README.
  • [x] Update documentation.

faircopy avatar Mar 29 '18 02:03 faircopy

@faircopy You're doing an amazing job. Please keep it up!

karamanolev avatar Mar 29 '18 02:03 karamanolev

Sadly, Transmission instances can only be defined by having the actual service definitions repeated in the Compose file. I've hacked together a script in POSIX Shell to automate this.

Sharing configuration settings between Compose files is not possible. Compose extension fields work by using YAML anchors, and those don't work across files.

So it'll have to be a single monolithic Compose file, if we want to have settings like timezone defined only once. There'll be a separate configuration section at the beginning of the file. Transmission service definitions are generated by a script, and will need to be pasted manually into the Compose file, whenever instance count needs changing.

I'll try and make it so that no other files need manual editing.

The most automatic thing would be a program that takes a single config file as an input, and outputs a single Compose file. Maybe later (probably never), for now I'll complete the rest of the todo list so we can have a usable setup. :slightly_smiling_face:

faircopy avatar Apr 01 '18 23:04 faircopy

@faircopy is this in a usable state now? I'm very excited

LennyPenny avatar Nov 25 '18 19:11 LennyPenny

I will just try it out and provide some feedback :)

LennyPenny avatar Dec 08 '18 21:12 LennyPenny

Okay I got it running, its working perfectly! I don't think the transcoder is working though, is that out of scope for this PR?

LennyPenny avatar Dec 09 '18 00:12 LennyPenny