Azure-Samples / rag-postgres-openai-python

A RAG app to ask questions about rows in a database table. Deployable on Azure Container Apps with PostgreSQL Flexible Server.
MIT License
106 stars 17 forks source link

Remove unused code from container #52

Open john0isaac opened 1 week ago

john0isaac commented 1 week ago

Description

Currently, we are zipping the whole src folder and uploading it to the container. The code in the frontend/ folder is not needed after we compile the static folder.

https://github.com/Azure-Samples/rag-postgres-openai-python/blob/b05f38ab45698331561b3c252e2a2c5c7da7bae9/azure.yaml#L7

Proposal

[Option 1] Move the frontend folder outside of the src folder

[Option 2] Restructure src folder to this:

src
│
└─── frontend
│    .....
└─── backend
    │    .dockerignore
    │    Dockerfile
    │    .....
    └─── fastapi_app
         │    .....
         └─── static

Then use backend folder in azure.yaml

pamelafox commented 6 days ago

Ah right, that looks like what we do for https://github.com/Azure-Samples/azure-search-openai-demo/tree/main/app, probably a good idea.

john0isaac commented 6 days ago

Yeah, option 2 is based of the ai-search sample. will do a pr for it then