Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
slide-index
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Welter, Felix
slide-index
Commits
008de909
Commit
008de909
authored
4 years ago
by
Welter, Felix
Browse files
Options
Downloads
Patches
Plain Diff
Link main project, remove nginx and SRF info
parent
58f3c7f9
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+2
-50
2 additions, 50 deletions
README.md
REQUEST_FORMAT.md
+0
-46
0 additions, 46 deletions
REQUEST_FORMAT.md
with
2 additions
and
96 deletions
README.md
+
2
−
50
View file @
008de909
# Slide index
This micro service enables you to upload pdf slides (e.g. lecture slides) and query them.
It adheres to the standard request format of the
[
Related Items project
](
https://gitlab.rrz.uni-hamburg.de/bay1620/wilps-related-items/
)
.
# Setup
Pull the image. Replace the version number. If unknown look up the latest version here: https://hub.docker.com/r/fwelter/wilps_slide_index
...
...
@@ -21,52 +22,3 @@ fwelter/wilps_slide_index:<VERSION_NUMBER>
The volume mounts are optional. If left out the container will start without content on every restart.
# Nginx
Most often nginx ist available via the package eco system, e.g.
```
sudo apt update
sudo apt install nginx
```
Make sure that the domain name is set up in the configuration e.g.
`/etc/nginx/sites-available/default`
The configuration needs to contain a line like
`server_name example.com www.example.com`
;
Most likely the directive
`server_name`
is present and only the domain names need to be added.
# SSL certificates
Install certbot and request SSL certificates.
```
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install python-certbot-nginx
sudo certbot --nginx -d example.com
```
More details can be found here: https://www.digitalocean.com/community/tutorials/how-to-set-up-let-s-encrypt-with-nginx-server-blocks-on-ubuntu-16-04
# Setup the reverse proxy
Setup a reverse proxy in your nginx config (e.g.
`/etc/nginx/sites-available/default`
)
If the slide index is hosted with a suffix (e.g.
`<YOUR_DOMAIN>/slide-index/search`
) make sure
to adjust the environment variable, which set during the container start.
```
location / {
proxy_pass http://127.0.0.1:8080/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_buffering off;
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
send_timeout 600;
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
}
```
This diff is collapsed.
Click to expand it.
REQUEST_FORMAT.md
deleted
100644 → 0
+
0
−
46
View file @
58f3c7f9
# Request format
All micro services for the related items system adhere to the following conventions.
The micro service is queried via the POST endpoint:
`/search`
.
The request contains the POST params
`term`
and
`context`
.
The micro service returns a json object containing the response
`type`
and type-dependent data. e.g.
```
{
"type": "image",
"paths": [
{
path: "/path/to/image/",
url: "/url/to/more/information/or/full/size/image"
},
{
path: "/path/to/image2/",
url: "/different/url/to/more/information/or/full/size/image2"
}
]
}
```
```
{
"type": "text",
"texts": [
{
"text": "This will hopefully be useful information.",
"url": "http://example.com/"
},
{
"text": "This is about funny frog.",
"url": "/link/to/external/page"
}
]
}
```
```
{
"type": "miss"
}
```
Currently the three types shown above are supporting along side with the shown type-dependent data.
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment