mirror of
https://github.com/roapi/roapi.git
synced 2026-06-05 21:04:02 +08:00
add docker support (#11)
This commit is contained in:
parent
fe9543163d
commit
59eb2ffca7
9
Dockerfile
Normal file
9
Dockerfile
Normal file
@ -0,0 +1,9 @@
|
||||
FROM rust:1.50 as builder
|
||||
RUN cargo install --git https://github.com/roapi/roapi --branch main --bin roapi-http
|
||||
|
||||
FROM debian:buster-slim
|
||||
RUN apt-get update && apt-get install -y libssl-dev && rm -rf /var/lib/apt/lists/*
|
||||
COPY test_data /test_data
|
||||
COPY --from=builder /usr/local/cargo/bin/roapi-http /usr/local/bin/roapi-http
|
||||
|
||||
CMD ["roapi-http"]
|
||||
13
README.md
13
README.md
@ -32,6 +32,12 @@ See below for a high level diagram:
|
||||
cargo install --git https://github.com/roapi/roapi --branch main --bin roapi-http
|
||||
```
|
||||
|
||||
```bash
|
||||
# docker build
|
||||
docker build . -t roapi-http
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
### Quick start
|
||||
@ -45,6 +51,13 @@ roapi-http \
|
||||
--table 'spacex_launches:test_data/spacex-launches.json'
|
||||
```
|
||||
|
||||
```bash
|
||||
# docker run
|
||||
docker run --rm -t -p 8080:8080 roapi-http roapi-http --addr 0.0.0.0:8080 \
|
||||
--table 'uk_cities:test_data/uk_cities_with_headers.csv' \
|
||||
--table 'spacex_launches:test_data/spacex-launches.json'
|
||||
```
|
||||
|
||||
Query tables using SQL, GraphQL or REST:
|
||||
|
||||
```bash
|
||||
|
||||
Loading…
Reference in New Issue
Block a user