Giter VIP home page Giter VIP logo

Comments (5)

pkubatrh avatar pkubatrh commented on July 21, 2024

The way APP_HOME is implemented the current working directory is left unchanged and project is used by gunicorn as a package by running gunicorn project.wsgi, same as before. Hence the need for the __init__.py file. The only thing that really changed was that the find command only looks in the directory provided by APP_HOME (or the current working directory if unset) for the presence of wsgi.py

Is there any added value were we to change the working directory before executing an app instead?

from s2i-python-container.

GrahamDumpleton avatar GrahamDumpleton commented on July 21, 2024

If that is what it doing, that wasn't the intent of the original request for adding the feature. The intent was that it would change directory. If all it is doing is using project.wsgi, then you could have just set APP_MODULE to project.wsgi and didn't need to add a new variable. It isn't particular useful in the current form and doesn't solve the reason for asking for it. Will check properly tomorrow then to see what was done. I never validated what it was doing.

from s2i-python-container.

GrahamDumpleton avatar GrahamDumpleton commented on July 21, 2024

Original comment where it was described what feature should do was #134 (comment).

from s2i-python-container.

pkubatrh avatar pkubatrh commented on July 21, 2024

If that is what it doing, that wasn't the intent of the original request for adding the feature. The intent was that it would change directory. If all it is doing is using project.wsgi, then you could have just set APP_MODULE to project.wsgi and didn't need to add a new variable.

The new variable was needed for Django, as I would not call its manage.py a module (and point to it using APP_MODULE) and APP_FILE would be picked up as a regular python script. But you have a point that for gunicorn it would make more sense to just use APP_MODULE.

Also must have missed the mention of changing the cwd in the original issue - thanks for pointing me in the right direction. Will look into modifying the code to change the cwd for both Django and gunicorn (and modifying the tests).

from s2i-python-container.

frenzymadness avatar frenzymadness commented on July 21, 2024

Is this issue still relevant? It seems that APP_HOME is used as an application home and working directory for years and there is no __init__.py file in app-home-test-app/project which this issue was created for.

from s2i-python-container.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.