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

How to edit prestart.sh? #42

Closed
timpal0l opened this issue May 7, 2020 · 2 comments
Closed

How to edit prestart.sh? #42

timpal0l opened this issue May 7, 2020 · 2 comments
Labels

Comments

@timpal0l
Copy link

timpal0l commented May 7, 2020

I appreciate that a lot of parameters are set for you, but how can I manually edit them? I would rather not have a massive line of -e flags in my docker run command.

Such as:

{
    "loglevel": loglevel,
    "workers": workers,
    "bind": bind,
    "graceful_timeout": graceful_timeout,
    "timeout": timeout,
    "keepalive": keepalive,
    "errorlog": errorlog,
    "accesslog": accesslog,
    # Additional, non-gunicorn variables
    "workers_per_core": workers_per_core,
    "use_max_workers": use_max_workers,
    "host": host,
    "port": port,
}
@autoferrit
Copy link

In your own dockerfile, you can add your own prestart.sh to the image with COPY prestart.sh /app/prestart.sh and you can set the path it looks for that with the ENV variable PRE_STARTPATH=path/relative/to/workdir/prestart.sh

@tiangolo
Copy link
Owner

tiangolo commented Jun 6, 2020

Thanks for the help here @autoferrit ! 👏 🙇

If that solves the original problem, then you can close this issue @timpal0l ✔️

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

No branches or pull requests

3 participants