A small application to run queries against a database.
Starting the image
docker-compose \
--file local-deployment/docker-compose.yml \
--profile serivce \
up \
--detach
To test the application, execute
Execute query
SELECT 1=1;
$ curl \
'http://localhost:8080/run-query?query=SELECT%201%3D1%3B' \
--verbose
* Trying 127.0.0.1:8080...
* Connected to localhost (127.0.0.1) port 8080 (#0)
> GET /run-query?query=SELECT%201%3D1%3B HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.81.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< content-length: 0
<
* Connection #0 to host localhost left intact
The status-code will be 200
, indicating the query executed successfully. If a query fails, the status code will be 400
.
Build a container image
./mvnw \
--define native \
--define build-container-image \
clean package
The resulting image will be named de.turing85/run-query:latest
and de.turing85/run-query:native
Starting the image
docker-compose \
--file local-deployment/docker-compose.yml \
--profile native-serivce \
up \
--detach
To test the application, execute
Execute query
SELECT 1=1;
$ curl \
'http://localhost:8080/run-query?query=SELECT%201%3D1%3B' \
--verbose
* Trying 127.0.0.1:8080...
* Connected to localhost (127.0.0.1) port 8080 (#0)
> GET /run-query?query=SELECT%201%3D1%3B HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.81.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< content-length: 0
<
* Connection #0 to host localhost left intact
The status-code will be 200
, indicating the query executed successfully. If a query fails, the status code will be 400
.
Thanks goes to these wonderful people (emoji key):
Marco Bungart 💻 🚧 📖 |