Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
memoriav
Memobase 2020
services
Cantaloupe on Docker
Commits
29d8c8bc
Unverified
Commit
29d8c8bc
authored
Feb 12, 2021
by
Sebastian Schüpbach
Browse files
merge with branch 4.1.5-http
parent
a36a5ea4
Pipeline
#21686
passed with stage
in 6 minutes and 28 seconds
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
cantaloupe.properties
View file @
29d8c8bc
...
...
@@ -46,7 +46,7 @@ base_uri =
# you can define an alternate character or character sequence to substitute
# for a slash. Supply the non-percent-encoded version here, and use the
# percent-encoded version in URLs.
slash_substitute
=
#
slash_substitute =
$
# Maximum number of pixels to return in a response, to prevent overloading
# the server. Requests for more pixels than this will receive an error
...
...
@@ -64,7 +64,7 @@ print_stack_trace_on_error_pages = true
# Enables the delegate script: a Ruby script containing various delegate
# methods. (See the user manual.)
delegate_script.enabled
=
fals
e
delegate_script.enabled
=
tru
e
# !! This can be an absolute path, or a filename; if only a filename is
# specified, it will be searched for in the same folder as this file, and
...
...
@@ -73,7 +73,7 @@ delegate_script.pathname = delegates.rb
# Enables the invocation cache, which caches method invocations and return
# values in memory. See the user manual for more information.
delegate_script.cache.enabled
=
fals
e
delegate_script.cache.enabled
=
tru
e
###########################################################################
# ENDPOINTS
...
...
@@ -119,11 +119,11 @@ endpoint.api.secret =
# Uses one source for all requests. Available values are `FilesystemSource`,
# `HttpSource`, `JdbcSource`, `S3Source`, and `AzureStorageSource`.
source.static
=
Filesystem
Source
#
source.static =
Http
Source
# If true, `source.static` will be overridden, and the `source()` delegate
# method will be used to select a source per-request.
source.delegate
=
fals
e
source.delegate
=
tru
e
#----------------------------------------
# FilesystemSource
...
...
@@ -132,11 +132,11 @@ source.delegate = false
# How to look up files. Allowed values are `BasicLookupStrategy` and
# `ScriptLookupStrategy`. ScriptLookupStrategy uses the delegate script for
# dynamic lookups; see the user manual.
FilesystemSource.lookup_strategy
=
Basic
LookupStrategy
FilesystemSource.lookup_strategy
=
Script
LookupStrategy
# Server-side path that will be prefixed to the identifier in the URL.
# Trailing slash is important!
FilesystemSource.BasicLookupStrategy.path_prefix
=
/home/cantaloupe/images/
FilesystemSource.BasicLookupStrategy.path_prefix
=
# Server-side path or extension that will be suffixed to the identifier in
# the URL.
...
...
@@ -155,11 +155,11 @@ HttpSource.request_timeout =
# Tells HttpSource how to look up resources. Allowed values are
# `BasicLookupStrategy` and `ScriptLookupStrategy`. ScriptLookupStrategy
# uses a delegate method for dynamic lookups; see the user manual.
HttpSource.lookup_strategy
=
Basic
LookupStrategy
HttpSource.lookup_strategy
=
Script
LookupStrategy
# URL that will be prefixed to the identifier in the request URL.
# Trailing slash is important!
HttpSource.BasicLookupStrategy.url_prefix
=
http://localhost/images/
HttpSource.BasicLookupStrategy.url_prefix
=
# Path, extension, query string, etc. that will be suffixed to the
# identifier in the request URL.
...
...
delegates.rb
0 → 100644
View file @
29d8c8bc
class
CustomDelegate
attr_accessor
:context
def
deserialize_meta_identifier
(
meta_identifier
)
end
def
pre_authorize
(
options
=
{})
true
end
def
authorize
(
options
=
{})
true
end
def
extra_iiif2_information_response_keys
(
options
=
{})
{}
end
def
extra_iiif3_information_response_keys
(
options
=
{})
{}
end
def
azurestoragesource_blob_key
(
options
=
{})
end
def
httpsource_resource_info
(
option
=
{})
return
context
[
'identifier'
].
gsub
(
'$'
,
'/'
).
gsub
(
'"'
,
'%22'
)
end
def
jdbcsource_database_identifier
(
options
=
{})
end
def
jdbcsource_media_type
(
options
=
{})
end
def
jdbcsource_lookup_sql
(
options
=
{})
end
def
s3source_object_info
(
options
=
{})
end
def
overlay
(
options
=
{})
end
def
redactions
(
options
=
{})
[]
end
def
metadata
(
options
=
{})
end
def
source
(
options
=
{})
uri
=
context
[
'identifier'
]
if
uri
.
start_with?
(
"file:"
)
return
'FilesystemSource'
else
return
'HttpSource'
end
end
def
filesystemsource_pathname
(
options
=
{})
return
"/home/cantaloupe/images/
#{
context
[
'identifier'
].
split
(
"$"
).
last
}
"
end
end
k8s-manifests/imageserver-ingress.yml
View file @
29d8c8bc
...
...
@@ -5,6 +5,7 @@ metadata:
name
:
imageserver-ingress
annotations
:
cert-manager.io/cluster-issuer
:
letsencrypt-prod
nginx.ingress.kubernetes.io/enable-cors
:
"
true"
nginx.ingress.kubernetes.io/force-ssl-redirect
:
"
true"
nginx.ingress.kubernetes.io/rewrite-target
:
/
labels
:
...
...
k8s-manifests/imageserver-test-deployment.yml
0 → 100644
View file @
29d8c8bc
apiVersion
:
apps/v1
kind
:
Deployment
metadata
:
name
:
cantaloupe-test-deployment
namespace
:
memobase
labels
:
app
:
imageserver-test-app
spec
:
selector
:
matchLabels
:
app
:
imageserver-test-app
replicas
:
1
template
:
metadata
:
labels
:
app
:
imageserver-test-app
tier
:
web
spec
:
containers
:
-
name
:
cantaloupe-test-container
image
:
cr.gitlab.switch.ch/memoriav/memobase-2020/services/cantaloupe-docker:4.1.5-http-jp2
ports
:
-
containerPort
:
8182
name
:
http
protocol
:
TCP
resources
:
requests
:
cpu
:
"
0.5"
memory
:
"
1Gi"
limits
:
cpu
:
"
2"
memory
:
"
4Gi"
imagePullPolicy
:
Always
volumeMounts
:
-
name
:
media-volume
mountPath
:
/home/cantaloupe/images
env
:
-
name
:
CACHE_SERVER_DERIVATIVE_ENABLED
value
:
'
true'
-
name
:
CACHE_SERVER_DERIVATIVE
value
:
'
RedisCache'
-
name
:
REDISCACHE_HOST
value
:
'
redis-test-service'
restartPolicy
:
Always
volumes
:
-
name
:
media-volume
persistentVolumeClaim
:
claimName
:
media-volume-claim
k8s-manifests/imageserver-test-ingress.yml
0 → 100644
View file @
29d8c8bc
apiVersion
:
networking.k8s.io/v1beta1
kind
:
Ingress
metadata
:
namespace
:
memobase
name
:
imageserver-test-ingress
annotations
:
cert-manager.io/cluster-issuer
:
letsencrypt-prod
nginx.ingress.kubernetes.io/enable-cors
:
"
true"
nginx.ingress.kubernetes.io/force-ssl-redirect
:
"
true"
nginx.ingress.kubernetes.io/rewrite-target
:
/
labels
:
app
:
imageserver-test-app
spec
:
tls
:
-
hosts
:
-
images-test.memobase.k8s.unibas.ch
secretName
:
images-test.memobase.k8s.unibas.ch-tls
rules
:
-
host
:
images-test.memobase.k8s.unibas.ch
http
:
paths
:
-
path
:
/
backend
:
serviceName
:
imageserver-test-service
servicePort
:
8182
k8s-manifests/imageserver-test-service.yml
0 → 100644
View file @
29d8c8bc
apiVersion
:
v1
kind
:
Service
metadata
:
namespace
:
memobase
name
:
imageserver-test-service
labels
:
app
:
imageserver-test-app
spec
:
ports
:
-
port
:
8182
selector
:
app
:
imageserver-test-app
tier
:
web
clusterIP
:
None
k8s-manifests/redis-test-deployment.yml
0 → 100644
View file @
29d8c8bc
apiVersion
:
apps/v1
kind
:
Deployment
metadata
:
name
:
redis-test-deployment
namespace
:
memobase
labels
:
app
:
redis-test-app
spec
:
selector
:
matchLabels
:
app
:
redis-test-app
replicas
:
1
template
:
metadata
:
labels
:
app
:
redis-test-app
tier
:
web
spec
:
containers
:
-
name
:
redis-test-container
image
:
redis:5-buster
resources
:
requests
:
cpu
:
"
0.2"
memory
:
"
2Gi"
limits
:
cpu
:
"
1.0"
memory
:
"
8Gi"
imagePullPolicy
:
Always
ports
:
-
containerPort
:
6379
name
:
http
protocol
:
TCP
restartPolicy
:
Always
k8s-manifests/redis-test-service.yml
0 → 100644
View file @
29d8c8bc
apiVersion
:
v1
kind
:
Service
metadata
:
namespace
:
memobase
name
:
redis-test-service
labels
:
app
:
redis-test-app
spec
:
ports
:
-
port
:
6379
selector
:
app
:
redis-test-app
tier
:
web
clusterIP
:
None
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment