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

Improve Add Dockerfiles to Django projects #3410

Closed
ucheNkadiCode opened this issue Feb 3, 2022 · 2 comments · Fixed by #3412
Closed

Improve Add Dockerfiles to Django projects #3410

ucheNkadiCode opened this issue Feb 3, 2022 · 2 comments · Fixed by #3412

Comments

@ucheNkadiCode
Copy link
Contributor

Scenario:

User selects add dockerfiles to workspace
Select Application Platform -> no change
Python: Django -> no change
Choose the app's entry point (e.g. manage.py, app.py)

My suggestion is to add a dialog so the user can (optionally) select where their wsgi.py file is in their application. We should try to look for wsgi file in the root folder as well as the [workspace name][workspace_folder of same name]\wsgi.py > ...(e.g. wsgi.py, asgi.py) and pop those to the top, but then also allow them to type it in

Port: 8000 -> no change

If they choose manage.py, need to attempt to locate the wsgi.py, but if they choose wsgi.py or asgi.py then use the path exactly

@bwateratmsft
Copy link
Collaborator

bwateratmsft commented Feb 4, 2022

We still need them to pick manage.py. That can't change, it is necessary for debugging to work properly. I'll alter the logic to better find ASGI/WSGI files. The only variability I've seen so far in common Django apps is in the subfolder name; I think it's sufficient to try to autodiscover WSGI files in other subfolders.

@bwateratmsft
Copy link
Collaborator

This is now released in Docker extension version 1.20.0.

@microsoft microsoft locked and limited conversation to collaborators Mar 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants