I used docker to set up roapi and it is connecting fine to the example spacex_launches json and github_jobs json.
I tried to connect it to my pihole sqlite database, and I am not able to connect to it.
I have checked multiples times and the path to the database is correct.
Docker compose file -
services:
roapi:
image: ghcr.io/roapi/roapi:${version_latest}
container_name: roapi
command: --config /config/roapi.yml
environment:
- RUST_BACKTRACE=1
ports:
- 8080
- 5432
- 32010
volumes:
- ./config:/config
- <path to my pihole folder>:/pihole:ro
Config roapi.yaml -
addr:
http: 0.0.0.0:8080
postgres: 0.0.0.0:5432
# List All Data Sources
tables:
- name: "pihole"
uri: "sqlite:///pihole/pihole-FTL.db"
- name: "spacex_launches"
uri: "https://api.spacexdata.com/v4/launches"
option:
format: "json"
- name: "github_jobs"
uri: "https://web.archive.org/web/20210507025928if_/https://jobs.github.com/positions.json"
Logs -
[2024-12-12T04:11:24Z INFO roapi::context] loading `uri(sqlite:///pihole/pihole-FTL.db)` as table `pihole`
thread 'main' panicked at /roapi_src/roapi/src/startup.rs:63:14:
Failed to create Roapi context: Whatever { source: Some(TableError { source: LoadDatabase { source: Destination { source: SQLiteArrowTransportError(Source(SQLiteError(SqliteFailure(Error { code: Unknown, extended_code: 1 }, Some("no such table: pihole"))))) } } }), message: "Failed to load table", backtrace: Backtrace(()) }
stack backtrace:
0: rust_begin_unwind
1: core::panicking::panic_fmt
2: core::result::unwrap_failed
3: roapi::startup::Application::build::{{closure}}
4: roapi::main::{{closure}}
5: roapi::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
I used docker to set up roapi and it is connecting fine to the example
spacex_launchesjson and github_jobs json.I tried to connect it to my pihole sqlite database, and I am not able to connect to it.
I have checked multiples times and the path to the database is correct.
Docker compose file -
Config
roapi.yaml-Logs -