Trying to set up Dockerfile, don't know syntax

I’ve tried all sorts of command line options based on the documentation which shows

gunicorn --bind 'wsgi:app(api_keys=True)'

So, the api_keys format is different than the command arguments shown, and different from then environment variables. Maybe next I will try to set the environment variables within the Dockerfile to see if that makes a difference (but I’m not sure if it will with guinicorn)

So, I assumed that a comma would be a delimeter of arguments?

gunicorn --bind 'wsgi:app(api_keys=True, ssl=True, load_only=[en,es,ar])'

However, that’s not working. I’m deploying in google cloud.

Failed to parse arguments as literal values: ‘app(ssl=True,load_only=[en,es,ar])’

What should I use to run the app in gunicorn?

1 Like

I think you might need to use quotes:

gunicorn --bind 'wsgi:app(api_keys=True, ssl=True, load_only=["en","es","ar"])'
1 Like

It looks like there is still some issue when it is trying to split the options. Oddly, if I add the languages in the preload

I can see them downloaded in the build, however when it runs, they aren’t available for use. I think I need to do something to copy them into their correct destination