Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arkindex
Backend
Commits
918a19fd
Commit
918a19fd
authored
7 years ago
by
Bastien Abadie
Browse files
Options
Downloads
Patches
Plain Diff
Working IIPSrv
parent
fb3c2a6b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docker-compose.yml
+11
-7
11 additions, 7 deletions
docker-compose.yml
iipsrv/Dockerfile
+10
-21
10 additions, 21 deletions
iipsrv/Dockerfile
nginx/proxy.conf
+13
-3
13 additions, 3 deletions
nginx/proxy.conf
with
34 additions
and
31 deletions
docker-compose.yml
+
11
−
7
View file @
918a19fd
---
version
:
'
3'
version
:
"
3.2"
services
:
# Our own build of IIPsrv
...
...
@@ -9,22 +9,26 @@ services:
depends_on
:
-
memcached
links
:
-
memcached
volumes
:
-
type
:
volume
source
:
./logs
target
:
/var/log
-
type
:
bind
source
:
./images
target
:
/images
# Nginx server as a gateway to iipsrv FCGI
nginx
:
build
:
nginx
ports
:
-
"
8000:80"
# Conatiner's 80 is available on host 9000
-
"
9000:80"
depends_on
:
-
iipsrv
links
:
-
iipsrv
# iipsrv cache
memcached
:
image
:
memcached:alpine
This diff is collapsed.
Click to expand it.
iipsrv/Dockerfile
+
10
−
21
View file @
918a19fd
...
...
@@ -2,31 +2,15 @@ FROM debian
MAINTAINER
Bastien Abadie, NextCairn <bastien@nextcairn.com>
# Install dependencies
RUN
apt-get update
-y
RUN
apt-get
install
-y
libtiff5 zlib1g libmemcached11 nginx autoconf make build-essential wget
tar
libtool pkg-config libmemcached-dev libopenjp2-7-dev memcached libjpeg62-turbo libjpeg62-turbo-dev libtiff5 libtiff5-dev libpng16-16 libpng-dev liblcms2-2 liblcms2-dev libgomp1 libpthread-stubs0-dev liblzma5 liblzma-dev libjbig-dev libjbig0 libz80ex1 libz80ex-dev
#Requirements: libtiff, zlib and the IJG JPEG development libraries. Optional: libmemcached (for Memcached) and Kakadu or OpenJPEG (for JPEG2000).
# Merge those lines
RUN
apt
install
-y
libtiff5 zlib1g libmemcached11 nginx libopenjp2-7
RUN
apt-get
install
-y
autoconf make
RUN
apt-get
install
-y
build-essential
RUN
apt-get
install
-y
wget
tar
# Download iipsrc source code
WORKDIR
/tmp/iipsrv
RUN
wget https://github.com/ruven/iipsrv/archive/master.tar.gz
RUN
tar
xvzf master.tar.gz
--strip-components
=
1
# Merge with above apt lines
RUN
apt-get
install
-y
libtool
RUN
apt-get
install
-y
libjpeg-dev
RUN
apt-get
install
-y
libtiff-dev
RUN
apt-get
install
-y
pkg-config
RUN
apt-get
install
-y
libmemcached-dev
RUN
apt-get
install
-y
libopenjp2-7-dev
# Compile & install
RUN
./autogen.sh
RUN
./configure
--enable-openjpeg
...
...
@@ -40,9 +24,14 @@ RUN chmod a+rx /usr/local/bin/iipsrv
WORKDIR
/root
RUN
rm
-rf
/tmp/iipsrv
VOLUME
"/var/log"
VOLUME
"/images"
# Run image server
ENV
"LOGFILE" "/var/log/iipsrv.log"
ENV
"VERBOSITY" "1"
ENV
"VERBOSITY" "1
000
"
ENV
"MEMCACHED_SERVERS" "memcached"
ENV
"FILESYSTEM_PREFIX" "/images/"
CMD
["/usr/local/bin/iipsrv", "--bind", "127.0.0.1:9000"]
EXPOSE
9000
CMD
["/usr/local/bin/iipsrv", "--bind", "0.0.0.0:9000"]
This diff is collapsed.
Click to expand it.
nginx/proxy.conf
+
13
−
3
View file @
918a19fd
upstream
iip
{
server
iipsrv
:
9000
;
}
server
{
listen
80
;
location
/ {
location
/ {
add_header
"Content-Type"
"text/plain"
;
return
200
"Horae"
;
}
fastcgi_pass
iipsrv
:
9000
;
fastcgi_param
PATH_INFO
$
fastcgi_script_name
;
location
/
images
{
fastcgi_param
PATH_INFO
/
iipsrv
.
fcgi
;
#
$fastcgi_script_name;
fastcgi_param
REQUEST_METHOD
$
request_method
;
fastcgi_param
QUERY_STRING
$
query_string
;
fastcgi_param
CONTENT_TYPE
$
content_type
;
...
...
@@ -12,5 +19,8 @@ server {
fastcgi_param
SERVER_PROTOCOL
$
server_protocol
;
fastcgi_param
REQUEST_URI
$
request_uri
;
fastcgi_param
HTTPS
$
https
if_not_empty
;
# Forward to iipsrv instance
fastcgi_pass
iip
;
}
}
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