openfaas / templates

OpenFaaS Classic templates
https://www.openfaas.com
MIT License
276 stars 228 forks source link

[Question] Python Templates - Why two requirements.txt? #208

Closed Kryan90 closed 3 years ago

Kryan90 commented 3 years ago

Sorry if this isn't the right forum for this question, but I couldn't find anywhere else for general questions related to templates.

I am curious as to why all the python templates define a requirements.txt at the same level as the Dockerfile and then an additional requirements.txt in the function directory.

Can anyone provide context on what sort of design pattern this is supposed to enable? I can see how it might be useful if you are building out multiple functions and want to have a single Dockerfile that builds images for each one, but there isn't any built in handling for that in the templates.

What would be the ideal use-case here?

alexellis commented 3 years ago

No worries, you can ask about this on the OpenFaaS Slack.

alexellis commented 3 years ago

/msg: slack

derek[bot] commented 3 years ago

-- Join Slack to connect with the community https://docs.openfaas.com/community