Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow defining run_args #185

Open
devanubis opened this issue Feb 28, 2023 · 1 comment
Open

Allow defining run_args #185

devanubis opened this issue Feb 28, 2023 · 1 comment

Comments

@devanubis
Copy link

Is your feature request related to a problem? Please describe.
Defining custom run_args / run_kwargs for a container would be nice.

I've ran into some issues with using timescale/timescaledb-ha (specifically timescale/timescaledb-docker-ha#366) and since the problem is that I can't work around that issue with environment variables, maybe instead adding run parameters here could help.

Describe the solution you'd like
DockerContainerConfig.run_kwargs / run_args to be added and used in wait_for_container() to customise the container's run command.

Describe alternatives you've considered
The problem was only intermittent when using psychopg2 to set up the timescale container, so short term I think I'll go back to using that (but thanks again for #183)

I would also hope that TimescaleDB might bring their -ha image into line with their base image, but that's probably a slow process...

If I had time I'd submit a PR, so if my workaround works with 2.6.10 or I rollback to 2.6.7 I'll carry on for now but would like to submit a PR soon-ish (most likely mid-late March with my current schedule)

@DanCardin
Copy link
Contributor

Per your linked issue, where you mention template1: for what it's worth, you can disable change template1 or disable template_database, if either of those are causing issues. I dont know (anything really) about timescaledb.

run_args should be relatively straightforward to support. Primarily just adding it to the base container config and defaulting to '', and then string splitting on space to deal with how commands work

run_kwargs would be roughly as straightfoward, but wouldn't really make sense in the context of the fallback-uses-env-var-values feature.

I could probably get to run_args being a thing sooner than mid-march, but i'm happy to leave it if you want to contribute

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants