Skip to content

Commit ee241ac

Browse files
committed
wip
0 parents  commit ee241ac

File tree

15 files changed

+3529
-0
lines changed

15 files changed

+3529
-0
lines changed

.gitignore

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
34+
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.nox/
43+
.coverage
44+
.coverage.*
45+
.cache
46+
nosetests.xml
47+
coverage.xml
48+
*.cover
49+
*.py,cover
50+
.hypothesis/
51+
.pytest_cache/
52+
cover/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
63+
# Flask stuff:
64+
instance/
65+
.webassets-cache
66+
67+
# Scrapy stuff:
68+
.scrapy
69+
70+
# Sphinx documentation
71+
docs/_build/
72+
73+
# PyBuilder
74+
target/
75+
76+
# Jupyter Notebook
77+
.ipynb_checkpoints
78+
79+
# IPython
80+
profile_default/
81+
ipython_config.py
82+
83+
# pyenv
84+
.python-version
85+
86+
# pipenv
87+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
88+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
89+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
90+
# install all needed dependencies.
91+
#Pipfile.lock
92+
93+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
94+
__pypackages__/
95+
96+
# Celery stuff
97+
celerybeat-schedule
98+
celerybeat.pid
99+
100+
# SageMath parsed files
101+
*.sage.py
102+
103+
# Environments
104+
.env
105+
.venv
106+
env/
107+
venv/
108+
ENV/
109+
env.bak/
110+
venv.bak/
111+
112+
# Spyder project settings
113+
.spyderproject
114+
.spyproject
115+
116+
# Rope project settings
117+
.ropeproject
118+
119+
# mkdocs documentation
120+
/site
121+
122+
# mypy
123+
.mypy_cache/
124+
.dmypy.json
125+
dmypy.json
126+
127+
# Pyre type checker
128+
.pyre/
129+
130+
# pytype static type analyzer
131+
.pytype/
132+
133+
# Cython debug symbols
134+
cython_debug/
135+
136+
# data files
137+
data/
138+
139+
notes.md
140+
notes/
141+
142+
stac_search/test.py

Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM python:3.12-slim-bookworm
2+
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
3+
4+
# Set the working directory
5+
WORKDIR /app
6+
7+
COPY pyproject.toml ./
8+
COPY uv.lock ./
9+
10+
COPY stac_search/ ./stac_search/
11+
12+
RUN uv sync --frozen
13+
14+
COPY data/chromadb ./data/chromadb
15+
16+
# Expose the port the app runs on
17+
EXPOSE 8000
18+
19+
# Command to run the FastAPI app
20+
CMD ["uv", "run", "uvicorn", "stac_search.api:app", "--host", "0.0.0.0", "--port", "8000"]

docker-compose.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
services:
2+
app:
3+
build: .
4+
ports:
5+
- "8000:8000"
6+
volumes:
7+
- .:/app
8+
environment:
9+
- PYTHONUNBUFFERED=1
10+
env_file:
11+
- .env
12+
networks:
13+
- caddy
14+
- default
15+
labels:
16+
caddy: stac-semantic-search.labs.sunu.in
17+
caddy.reverse_proxy: "{{upstreams 8000}}"
18+
command: uv run uvicorn stac_search.api:app --host 0.0.0.0 --port 8000 --reload
19+
20+
networks:
21+
caddy:
22+
external: true

frontend/Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM python:3.12-slim
2+
3+
WORKDIR /app
4+
5+
# Copy requirements file
6+
COPY requirements.txt .
7+
8+
# Install dependencies
9+
RUN pip install --no-cache-dir -r requirements.txt
10+
11+
# Copy the application code
12+
COPY streamlit_app.py .
13+
14+
# Expose the port Streamlit runs on
15+
EXPOSE 8501
16+
17+
# Command to run the Streamlit app
18+
CMD ["streamlit", "run", "streamlit_app.py", "--server.address=0.0.0.0"]

frontend/docker-compose.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
services:
2+
streamlit:
3+
build:
4+
context: .
5+
dockerfile: Dockerfile
6+
ports:
7+
- "18501:8501"
8+
environment:
9+
- API_URL=https://stac-semantic-search.labs.sunu.in
10+
volumes:
11+
- ./streamlit_app.py:/app/streamlit_app.py
12+
networks:
13+
- caddy
14+
- default
15+
labels:
16+
caddy: app.stac-semantic-search.labs.sunu.in
17+
caddy.reverse_proxy: "{{upstreams 8501}}"
18+
19+
networks:
20+
caddy:
21+
external: true

frontend/requirements.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
streamlit>=1.22.0
2+
folium>=0.12.1
3+
streamlit-folium>=0.7.0
4+
pandas>=1.5.0
5+
requests>=2.28.1

0 commit comments

Comments
 (0)