Skip to content

Commit

Permalink
Revert "Merge branch 'main' of https://github.com/dasch-swiss/sipi in…
Browse files Browse the repository at this point in the history
…to main"

This reverts commit d0c06cb, reversing
changes made to 5e3db65.
  • Loading branch information
julsraemy committed Mar 11, 2021
1 parent d0c06cb commit 5c68caa
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 79 deletions.
49 changes: 0 additions & 49 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,36 +36,6 @@ jobs:
- name: run integration tests
run: make test-integration

# build documentation
docs-build-test:
name: Docs Build Test
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Disk Free
run: |
df -h
docker system df
docker system prune --all --force --volumes
df -h
- name: run docs build
run: make docs-build
- name: Disk Free After
run: |
df -h
docker system df
# publish only on release
publish:
name: Publish to Dockerhub
Expand Down Expand Up @@ -94,22 +64,3 @@ jobs:
uses: lakto/gren-action@v1.1.0
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

# deploy documentation when merged into main branch
deploy-docs:
name: Deploy docs
needs: [docs-build-test]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout main branch
uses: actions/checkout@v2
- name: Deploy docs
uses: mhausenblas/mkdocs-deploy-gh-pages@master
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
REQUIREMENTS: requirements.txt
- name: Disk Free After
run: |
df -h
docker system df
58 changes: 29 additions & 29 deletions docs/lua.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ used!*

## Pre-flight function
The pre-fight function is mandatory and located in the init-script (see
[configuarion options](../sipi/#setup-of-directories-needed) of SIPI). It is executed after the incoming
[configuarion options](../sipi/index.html#setup-of-directories-needed) of SIPI). It is executed after the incoming
IIIF HTTP request data has been processed but before an action to respond to the request has been taken. It should
be noted that the pre-flight script is only executed for IIIF-specific requests. All other HTTP requests are being
directed to "normal" HTTP-server part of SIPI. These can utilize the lua functionality by embedding LUA commands
Expand Down Expand Up @@ -78,7 +78,7 @@ to access a authorization server to check if the user (identified by a cookie) i
using [Json Web Tokens](https://jwt.io) (JWT) which are supported by SIPI specific LUA functions. Please note that the
SIPI JTW-functions support an arbitrary payload that has not to follow the JWT recommendations. In order to encode, the
JWT_ALG_HS256 is beeing used together with the key that is defined in the SIPI configuration as
[jwt_secret](../sipi/#jwt-secret).
[jwt_secret](../sipi/index.html#jwt-secret).
```lua
function pre_flight(prefix, identifier, cookie) {
--
Expand Down Expand Up @@ -142,8 +142,8 @@ The pre-flight function uses the following SIPI-specific LUA global variables an

- [config.imgroot](#configimgroot): (Global variable) Root directory of the image repository.
- [server.http()](#serverhttp): (Function) Used to create a RESTful GET request.
- [server.generate_jwt()](#servergenerate_jwt): (Function) Create a new JWT token from a key/value table.
- [server.json_to_table()](#serverjson_to_table): (function) Convert a JSON into a LUA table.
- [server.generate_jwt()](#servergenerate95jwt): (Function) Create a new JWT token from a key/value table.
- [server.json_to_table()](#serverjson95to95table): (function) Convert a JSON into a LUA table.

## LUA embedded in HTML
The HTTP server that is included in SIPI can serve any type of file which are just transfered as is to the client.
Expand Down Expand Up @@ -363,91 +363,91 @@ as command line option when starting the server.
config.hostname

The hostname SIPI is configures to run on
(see [hostname](../sipi/#hostname) in configuration description).
(see [hostname](../sipi/index.html#hostname) in configuration description).

#### config.port

config.port

Portnumber where the SIPI server listens
(see [serverport](../sipi/#port) in configuration description).
(see [serverport](../sipi/index.html#port) in configuration description).

#### config.sslport

config.sslport

Portnumber for SSL connections of SIPI
(see [sslport](../sipi/#sslport) in configuration description).
(see [sslport](../sipi/index.html#sslport) in configuration description).

####config.imgroot

config.imgroot

Root directory for IIIF-served images
(see [imgroot](../sipi/#imgroot) in configuration description).
(see [imgroot](../sipi/index.html#imgroot) in configuration description).

#### config.docroot

config.docroot

Root directory for WEB-Server
(see [docroot](../sipi/#docroot) in configuration description).
(see [docroot](../sipi/index.html#docroot) in configuration description).

#### config.max\_temp\_file\_age

config.max_temp_file_age

maximum age of temporary files
(see [max_temp_file_age](../sipi/#maxtmpfileage) in configuration description).
(see [max_temp_file_age](../sipi/index.html#maxtmpfileage) in configuration description).

#### config.prefix\_as\_path

config.prefix_as_path`

`true` if the prefix should be used as path info
(see [prefix_as_path](../sipi/#prefixaspath) in configuration description).
(see [prefix_as_path](../sipi/index.html#prefixaspath) in configuration description).

#### config.init\_script

config.init_script

Path to initialization script
(see [initscript](../sipi/#initscript) in configuration description).
(see [initscript](../sipi/index.html#initscript) in configuration description).

#### config.scriptdir

config.scriptdir

Path to script directory.
(see [scriptdir](../sipi/#scriptdir) in configuration description).
(see [scriptdir](../sipi/index.html#scriptdir) in configuration description).

#### config.cache\_dir

config.cache_dir

Path to cache directory for iIIF served images.
(see [cachedir](../sipi/#cachedir) in configuration description).
(see [cachedir](../sipi/index.html#cachedir) in configuration description).

#### config.cache\_size

config.cache_size

Maximal size of cache
(see [cachesize](../sipi/#cachesize) in configuration description).
(see [cachesize](../sipi/index.html#cachesize) in configuration description).

#### config.cache\_n\_files

config.cache_n_files

Maximal number of files in cache.
(see [cache_nfiles](../sipi/#cachenfiles) in configuration description).
(see [cache_nfiles](../sipi/index.html#cachenfiles) in configuration description).

#### config.cache\_hysteresis

config.cache_hysteresis

Amount of data to be purged if cache reaches maximum size.
(see [cache_hysteresis](../sipi/#hysteresis) in configuration description).
(see [cache_hysteresis](../sipi/index.html#hysteresis) in configuration description).

#### config.jpeg\_quality

Expand All @@ -458,85 +458,85 @@ allows to configure the compression quality system wide with this parameter. All
\[1..100\] where 1 the worst quality (and highest compression factor = smallest file size) and 100 the highest
quality (with lowest compression factor = biggest file size). Please note that SIPI is not able to provide
lossless compression for JPEG files.
(see [jpeg_quality](../sipi/#jpegquality) in configuration description).
(see [jpeg_quality](../sipi/index.html#jpegquality) in configuration description).

#### config.keep\_alive

config.keep_alive

Maximal keep-alive time for HTTP requests that ask for a keep-alive connection.
(see [keep_alive](../sipi/#keepalive) in configuration description).
(see [keep_alive](../sipi/index.html#keepalive) in configuration description).

#### config.thumb\_size

config.thumb_size

Default thumbnail image size.
(see [thumb_size](../sipi/#thumbsize) in configuration description).
(see [thumb_size](../sipi/index.html#thumbsize) in configuration description).

#### config.n\_threads

config.n_threads

Number of worker threads SIPI uses.
(see [nthreads](../sipi/#nthreads) in configuration description).
(see [nthreads](../sipi/index.html#nthreads) in configuration description).

#### config.max\_post\_size

config.max_post_size

Maximal size of POST data allowed
(see [max_post_size](../sipi/#maxpostsize) in configuration description).
(see [max_post_size](../sipi/index.html#maxpostsize) in configuration description).

#### config.tmpdir

config.tmpdir

Temporary directory to store uploads.
(see [tmpdir](../sipi/#tmpdir) in configuration description).
(see [tmpdir](../sipi/index.html#tmpdir) in configuration description).

#### config.ssl/_certificate

config.ssl_certificate

Path to the SSL certificate that SIPI uses.
(see [ssl_certificate](../sipi/#sslcertificate) in configuration description).
(see [ssl_certificate](../sipi/index.html#sslcertificate) in configuration description).

#### config.ssl/_key

config.ssl_key

Path to the SSL key that SIPI uses.
(see [ssl_key](../sipi/#sslkey) in configuration description).
(see [ssl_key](../sipi/index.html#sslkey) in configuration description).

#### config.logfile

config.logfile

Name of the logfile. SIPI is currently using the [syslog](https://en.wikipedia.org/wiki/Syslog) facility and the
logfile name is ignored.
(see [logfile](../sipi/#logfile) in configuration description).
(see [logfile](../sipi/index.html#logfile) in configuration description).

#### config.loglevel

config.loglevel

Indicates what should be logged. The variable contains a integer that corresponds to the syslog level.
(see [loglevel](../sipi/#loglevel) in configuration description).
(see [loglevel](../sipi/index.html#loglevel) in configuration description).

#### config.adminuser

config.adminuser

Name of admin user.
(see [user](../sipi/#configuration-of-administrator-access) in configuration description).
(see [user](../sipi/index.html#configuration-of-administrator-access) in configuration description).

#### config.password

config.password

Password (plain text, not encrypted) of admin user (*use with caution*)!
(see [password](../sipi/#configuration-of-administrator-access) in configuration description).
(see [password](../sipi/index.html#configuration-of-administrator-access) in configuration description).

### SIPI Server Variables
Sipi server variables are dependent on the incoming request and are created by SIPI automatically for each
Expand Down
1 change: 0 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ edit_uri: blob/main/docs/
copyright: "&copy; 2017 - 2021 <a href='https://dasch.swiss' target='_blank'>Data and Service Center for the Humanities (DaSCH)</a>"

nav:
- Overview: index.md
- Introduction: introduction.md
- Basic information and Reference: sipi.md
- Lua integration: lua.md
Expand Down

0 comments on commit 5c68caa

Please sign in to comment.