Skip to content
Snippets Groups Projects
Commit f6ac918c authored by Robert Butora's avatar Robert Butora
Browse files

README update

parent c2bd5d8d
No related branches found
No related tags found
No related merge requests found
...@@ -18,23 +18,14 @@ The `Dockerfile` uses:: ...@@ -18,23 +18,14 @@ The `Dockerfile` uses::
It needs a properly configured `wsgi.conf` that will be loaded within It needs a properly configured `wsgi.conf` that will be loaded within
the `http/conf.d` of the container. the `http/conf.d` of the container.
Used folders: ### Build and run the container image
- `sed-data` : place to store the SED Models HDF5 file
- `wsgi-scripts` : business logic of the service itself
The `sed-data` must be visible to the application on the host.
### Build the container image
To build the container image: To build the container image:
podman build --tag vlkb-sedmods -f ./Dockerfile podman build --tag vlkb-sedmods -f ./Dockerfile
The tag can be one of your choice. It is suggested to have a dedicated It is suggested to have a dedicated user to run this in production.
user to run this in production.
### Run the container Once the podman image is ready and the two directories are in place, run:
Once the podman image is ready and the two directories are in place, to
run the container it suffices a command like
podman run -dt \ podman run -dt \
--name sedmod-test \ --name sedmod-test \
...@@ -56,16 +47,10 @@ host server, this must be changed if the host's 8080 is already in use. ...@@ -56,16 +47,10 @@ host server, this must be changed if the host's 8080 is already in use.
### Service endpoints ### Service endpoints
How to start service is descripbed [here](README_implementation.md). The service implementation is descripbed [here](README_implementation.md).
Then the service presents the endpoint:
- searchd
Access the service by:
curl localhost:8080/searchd/?arg1_arg2_...-_arg9 > output.json
Response is in JSON format. And the arguments are as in this C++ code fragment: Then the service presents the _/searchd_ endpoint. Arguments are separated
by underscore and their meaning is as in this C++ code snipped:
```cpp ```cpp
QString args = QString("'%1_%2_%3_%4_%5_%6_%7_0_%8_%9'") QString args = QString("'%1_%2_%3_%4_%5_%6_%7_0_%8_%9'")
...@@ -80,9 +65,14 @@ Response is in JSON format. And the arguments are as in this C++ code fragment: ...@@ -80,9 +65,14 @@ Response is in JSON format. And the arguments are as in this C++ code fragment:
.arg(ui->delta_chi2_lineEdit->text()); .arg(ui->delta_chi2_lineEdit->text());
``` ```
Access the service by:
curl localhost:8080/searchd/?arg1_arg2_...-_arg9 > output.json
Response is in JSON format.
### Network Proxy ### Network Proxy
Since it could be annoying to explitly use port 8080 on the host, the The service can be made visible on a specific context path in the host
service can be made visible on a specific context path in the host
server's http using the httpd _ProxyPass_ directive, like server's http using the httpd _ProxyPass_ directive, like
<Location "/sedmods"> <Location "/sedmods">
...@@ -91,5 +81,3 @@ server's http using the httpd _ProxyPass_ directive, like ...@@ -91,5 +81,3 @@ server's http using the httpd _ProxyPass_ directive, like
where _/sedmods_ is an example and the _8080_ port depends on the passed where _/sedmods_ is an example and the _8080_ port depends on the passed
parameters to the podman run command (see above). parameters to the podman run command (see above).
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment