Skip to content

Commit fe60ef6

Browse files
authored
Deployment (#4)
* Remove Docker and environment files, add cleanup script Deleted Dockerfiles, docker-compose, environment YAMLs, requirements files, and test configs to streamline deployment and remove development artifacts. Added 'cleanup-for-deployment.sh' script to automate repository cleanup before deployment. * Improve DB path handling and remove deprecated config * Update frontend config with live backend URL * Added Dev Container Folder * Add requirements.txt and python version for Streamlit Cloud * Remove requirements-streamlit.txt and update requirements.txt * Handle optional langchain-google-genai dependency * Update render.yaml * Improve DB path fallback logic * Update app.py * Add cache debugging and force refresh for Streamlit Cloud * Fix cache functions to use backend API for Streamlit Cloud
1 parent a194ef6 commit fe60ef6

22 files changed

+335
-1223
lines changed

.devcontainer/devcontainer.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"name": "Python 3",
3+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
4+
"image": "mcr.microsoft.com/devcontainers/python:1-3.11-bullseye",
5+
"customizations": {
6+
"codespaces": {
7+
"openFiles": [
8+
"README.md",
9+
"app.py"
10+
]
11+
},
12+
"vscode": {
13+
"settings": {},
14+
"extensions": [
15+
"ms-python.python",
16+
"ms-python.vscode-pylance"
17+
]
18+
}
19+
},
20+
"updateContentCommand": "[ -f packages.txt ] && sudo apt update && sudo apt upgrade -y && sudo xargs apt install -y <packages.txt; [ -f requirements.txt ] && pip3 install --user -r requirements.txt; pip3 install --user streamlit; echo '✅ Packages installed and Requirements met'",
21+
"postAttachCommand": {
22+
"server": "streamlit run app.py --server.enableCORS false --server.enableXsrfProtection false"
23+
},
24+
"portsAttributes": {
25+
"8501": {
26+
"label": "Application",
27+
"onAutoForward": "openPreview"
28+
}
29+
},
30+
"forwardPorts": [
31+
8501
32+
]
33+
}

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.10

.streamlit/secrets.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# Streamlit Cloud secrets configuration
2-
# Add your actual Render backend URL after deployment
2+
# Updated with actual Render backend URL
33

44
[secrets]
5-
BACKEND_URL = "https://your-app-name.onrender.com"
5+
BACKEND_URL = "https://stocksense-ai-f3lt.onrender.com"
66

7-
# Note: Replace "your-app-name" with your actual Render service name
8-
# Example: https://stocksense-backend.onrender.com
7+
# Your backend is now live at this URL!

Dockerfile.backend

Lines changed: 0 additions & 58 deletions
This file was deleted.

Dockerfile.backend.optimized

Lines changed: 0 additions & 42 deletions
This file was deleted.

Dockerfile.frontend

Lines changed: 0 additions & 73 deletions
This file was deleted.

0 commit comments

Comments
 (0)