refactor: reorganize project structure and fix broken references

- Move scripts to scripts/ directory (roda.sh, prepara_db.py, etc.)
- Move shell config to shell/ directory (Caddyfile, auth.py, haloy.yml)
- Move basedosdados.duckdb to data/ directory
- Update Dockerfile and start.sh with new file paths
- Update README.md with correct script paths
- Remove Python ask.py (replaced by Rust binary in ask/ask)
- Add Rust source files (schema_filter.rs, sql_generator.rs, table_selector.rs)
- Remove sentence-transformer dependencies from ask
- Move docs and context artifacts to their directories
This commit is contained in:
2026-03-29 20:46:27 +02:00
parent 02cb13362c
commit ed5fa6756e
43 changed files with 302366 additions and 1093 deletions

50
shell/Caddyfile Normal file
View File

@@ -0,0 +1,50 @@
:8080 {
# Route based on Host header (set by haloy)
@ask {
host ask.xn--2dk.xyz
}
@db {
host db.xn--2dk.xyz
}
handle @ask {
reverse_proxy localhost:7682 {
flush_interval -1
}
}
handle @db {
handle /health {
respond 200
}
handle /login {
reverse_proxy 127.0.0.1:8081
}
handle /query {
reverse_proxy 127.0.0.1:8081
}
@websocket {
header Connection *Upgrade*
header Upgrade websocket
}
handle @websocket {
reverse_proxy localhost:7681 {
flush_interval -1
}
}
handle {
forward_auth 127.0.0.1:8081 {
uri /auth
copy_headers Cookie
}
reverse_proxy localhost:7681 {
flush_interval -1
}
}
}
}