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

[New azd-template] Flask surveys container app #88

Closed
pamelafox opened this issue Feb 2, 2023 · 12 comments · Fixed by #110
Closed

[New azd-template] Flask surveys container app #88

pamelafox opened this issue Feb 2, 2023 · 12 comments · Fixed by #110

Comments

@pamelafox
Copy link
Member

New azd-template Submission

Fill in the sections below to populate a new gallery card for your template. All fields are mandatory unless explicitly identified as optional

1. Description

1-2 sentence description of the architecture or solution that is defined by the template. If this is a requested template, please tag the GitHub issue containing the request.

A survey app written with the Python Flask framework which uses Flask-SQLAlchemy with a PostgreSQL database. Can be developed locally with Docker Compose and then deployed to Azure Container Apps (using KeyVault SDK for Flask secrets).

2. Author Information

Name: Pamela Fox

Link: https://github.com/pamelafox

3. Template Repo

The GitHub repo containing the template being contributed-- must be a valid, complete template

https://github.com/pamelafox/flask-surveys-container-app

4. Link to PR where you made your repo azd compatible

To allow us to provide feedback on your template, please include a link to the PR where you added azd compatibility

Sorry, there's not one particular PR, but you can check azure.yaml, the infra/ folder, and .github/workflows.

5. Tags

Standard: One or more tags representing the template. Look at the currently available tags on the Gallery page. Provide at least 1 tag for programming language used and at least 1 tag for Azure services integrated. Also tag the IaC provider (Bicep or Terraform)

Python, Flask, Azure Container Apps, Azure Key Vault, Web Apps, Azure DB for PostgreSQL

Additional: Don't see a relevant tag for your template? Suggest tags to be added and used for your template. These could be new languages, services, or application domains.

6. Architecture Diagram or Application Screenshot

Used as display image for gallery card-- should include all services and their connections. Example

flaskdb_container drawio (1)

7. Related Issues (optional)

Is this a template that was requested in a separate issue? If so, please tag the related issue here.

Next Steps

Once submitted, the issue will be reviewed - we plan to do reviews on a rolling basis at regular intervals. The process will include verifying all information required for the template gallery is provided and the template works (i.e., successfully deploys to Azure with azd up).

  • If we have questions or enhancements, we will add comments in issue thread (issue stays open)
  • If the contribution is approved, we'll update the gallery directly (issue will then be closed)
@rajeshkamal5050
Copy link
Contributor

@v-xuto can you do a dry-run on this template and update here for any issues/feedback?

@v-xuto
Copy link
Member

v-xuto commented Feb 22, 2023

@pamelafox We tested this template, encountered an issue, and filed this issue (pamelafox/flask-surveys-container-app#5).
Please help to check and solve it.

@pamelafox
Copy link
Member Author

Replied there, thanks!

@v-xuto
Copy link
Member

v-xuto commented Feb 23, 2023

@jongio We have run this template without any issues. Please review it.

@pamelafox
Copy link
Member Author

(Writing similar comment here as I wrote on my other ACA submission)

After a discussion with some App Service and ACA PMs last week, I've realized that websites aren't the most appropriate use of ACA. A website should be hosted as a BYOC Web App, which azd does not yet support (Azure/azure-dev#1608).
This article goes more into optimal uses of ACA:
https://learn.microsoft.com/en-us/azure/container-apps/compare-options

So my proposal is to table this template until azd supports BYOC, and I will submit another template instead that's more of a service than a website. The infrastructure will be largely the same.

@jongio
Copy link
Member

jongio commented Feb 27, 2023

As there are many tradeoffs when it comes to consider where to host an app, and it being possible to host a site on ACA, then I don't think it does any harm to create a sample showing a website hosted on ACA. I 1000% guarantee a customer will try it. In addition, a website may be a small portion of a complete ACA solution, that includes a site, api, db, etc.

@pamelafox
Copy link
Member Author

True. For me, the primary downside is people not realizing that App Service BYOC is also an option (I keep forgetting about it myself). You're welcome to put this in the templates gallery if you think it's useful.
I still would like to build an API-oriented template, using PostGIS on top of PostgreSQL, but haven't built that one yet.

@rajeshkamal5050
Copy link
Contributor

@jongio @pamelafox do we want to add this template to gallery or hold off?

@pamelafox
Copy link
Member Author

I'm good with adding it now, I realize that ACA is a compelling option due to the way it's billed. (I did a price comparison of my own ACA/AppService apps which helped me realize that- http://blog.pamelafox.org/2023/03/hosting-python-web-apps-on-azure-price.html)

@rajeshkamal5050
Copy link
Contributor

@jongio please review when you get a chance.

@hemarina please add it to gallery post Jon's approval.

@rajeshkamal5050 rajeshkamal5050 assigned hemarina and unassigned v-xuto Mar 14, 2023
@jongio
Copy link
Member

jongio commented Mar 15, 2023

:shipit:

@rajeshkamal5050
Copy link
Contributor

@hemarina please add it to the gallery

hemarina added a commit that referenced this issue Mar 17, 2023
…t API ACA and CDN, and FastAPI on Azure Functions

fix #88 #89 #103 #98
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment