OctopusDeploy/Octopus-Docker

More environment variable overrides for configuration

Closed this issue · 7 comments

I'm using this with Rancher, and the provided environment variables are very meagre and not quite enough to configure Octopus cleanly, since Rancher doesn't support Windows volumes (annoying, I know).

I can override the entrypoint, but how can I set new paths for things like the repository, etc? I'm having to 'net use' a network drive in order to get persistent storage and need to remap those folders into the network mount.

Ideally this would be doable with environment variables, as that's how most Docker apps do things.

You are right @dbsanfte that at the moment getting custom configuration into the container isn't ideal. We have some plans to change the way it starts up to allow passing configuration through, however it is not yet available. Ill leave this ticket open until a better solution is available.

At the moment the only workaround is to build a custom image using the Octopus image as the base, then override some of the configuration. Understand that this is quite far from ideal, but it is something we plan to address at some point.

I've submitted a patch for the folder options at least.

HI @dbsanfte taking a look at this request again im a little unsure what the motivation is behind this change. you can volume mount these directories and get access to their contents. Why do you actually need to change the path that the directories are set to internally?

Actually this request is motivated by the current state of Rancher's (https://rancher.com/) support (namely: not) for Windows volume mounts. Instead I am having to map a network drive in the container and redirect the folders to that location to get Octopus to work. I use an image based on the PRs I've submitted and it works fine.

Glad to hear you got it working 👍

Well I was able to get it working by hacking my own version of configure.ps1 and loading it into the Octopus container at runtime. Really a shoestrings-and-glue sort of thing.

Noticed that it has been broken as of 2018.8.8. Would rather these override options were just added into the main project tbh. Maintaining this kinda sucks.

It feels like the internal folder structure of the application shouldn't be a concern of the consumer who should be able to rely on external mount points and treat the container as a "black-box" of sorts. This sounds like more of an issue with rancher not supporting windows. Do they have a ticket around properly supporting windows volumes? We are looking into porting Octopus to .netcore soon an as part of this we expect to be able to provide a linux container. Would this solve the problem with rancher?