From 9135b6488bb34744c1480ae948ae17826859cb4e Mon Sep 17 00:00:00 2001
From: Bastien Abadie <bastien@nextcairn.com>
Date: Tue, 17 Oct 2017 10:42:40 +0200
Subject: [PATCH] Move docker files in sub dir

---
 docker-compose.yml |  41 ------------------
 iipsrv/Dockerfile  |  37 ----------------
 loris/Dockerfile   |  40 -----------------
 loris/loris2.conf  | 105 ---------------------------------------------
 nginx/Dockerfile   |   9 ----
 nginx/proxy.conf   |  14 ------
 6 files changed, 246 deletions(-)
 delete mode 100644 docker-compose.yml
 delete mode 100644 iipsrv/Dockerfile
 delete mode 100644 loris/Dockerfile
 delete mode 100644 loris/loris2.conf
 delete mode 100644 nginx/Dockerfile
 delete mode 100644 nginx/proxy.conf

diff --git a/docker-compose.yml b/docker-compose.yml
deleted file mode 100644
index 83dbad94c4..0000000000
--- a/docker-compose.yml
+++ /dev/null
@@ -1,41 +0,0 @@
----
-version: "3.2"
-services:
-
-  # Our own build of IIPsrv
-  #iipsrv:
-  #  build: iipsrv
-
-  #  depends_on:
-  #    - memcached
-
-  #  volumes:
-  #    - type: volume
-  #      source: ./logs
-  #      target: /var/log
-  #    - type: bind
-  #      source: ./images
-  #      target: /images
-
-  # iipsrv cache
-  #memcached:
-  #  image: memcached:alpine
-
-  loris:
-    build: loris
-
-    volumes:
-      - type: bind
-        source: ./images
-        target: /loris/images
-
-  # Nginx server as a gateway to iipsrv FCGI
-  nginx:
-    build: nginx
-
-    ports:
-      # Conatiner's 80 is available on host 9000
-      - "9000:80"
-
-    depends_on:
-      - loris
diff --git a/iipsrv/Dockerfile b/iipsrv/Dockerfile
deleted file mode 100644
index 5761fe0b7c..0000000000
--- a/iipsrv/Dockerfile
+++ /dev/null
@@ -1,37 +0,0 @@
-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 
-
-# 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
-
-# Compile & install
-RUN ./autogen.sh
-RUN ./configure --enable-openjpeg 
-RUN make
-RUN make install
-RUN mkdir -p /usr/local/bin
-RUN cp ./src/iipsrv.fcgi /usr/local/bin/iipsrv
-RUN chmod a+rx /usr/local/bin/iipsrv
-
-# Cleanup
-WORKDIR /root
-RUN rm -rf /tmp/iipsrv
-
-VOLUME "/var/log"
-VOLUME "/images"
-
-# Run image server
-ENV "LOGFILE" "/var/log/iipsrv.log"
-ENV "VERBOSITY" "1000"
-ENV "MEMCACHED_SERVERS" "memcached"
-ENV "FILESYSTEM_PREFIX" "/images/"
-
-EXPOSE 9000
-CMD ["/usr/local/bin/iipsrv", "--bind", "0.0.0.0:9000"]
diff --git a/loris/Dockerfile b/loris/Dockerfile
deleted file mode 100644
index f888401daf..0000000000
--- a/loris/Dockerfile
+++ /dev/null
@@ -1,40 +0,0 @@
-FROM debian
-
-MAINTAINER Bastien Abadie, NextCairn <bastien@nextcairn.com>
-
-# Install dependencies
-RUN apt-get update -y
-RUN apt-get install -y wget tar python python-pip python-setuptools libjpeg62-turbo-dev libfreetype6-dev zlib1g-dev liblcms2-dev liblcms2-utils libtiff5-dev python-dev libwebp-dev
-RUN pip install Pillow gunicorn
-
-# Add loris user and conf
-RUN addgroup loris
-RUN adduser --home=/loris --ingroup=loris --disabled-password loris
-RUN mkdir -p /loris/cache /loris/tmp /loris/www /loris/logs
-VOLUME "/loris/images"
-COPY loris2.conf /etc/loris2.conf
-
-# Download loris source code
-WORKDIR /tmp/loris
-RUN wget https://github.com/loris-imageserver/loris/archive/v2.2.0.tar.gz -O loris.tar.gz
-RUN tar xzf loris.tar.gz --strip-components 1
-
-# Build loris
-RUN pip install -r requirements.txt
-RUN python setup.py install \
-	--image-cache=/loris/cache \
-	--info-cache=/loris/cache \
-	--tmp-dir=/loris/tmp \
-	--www-dir=/loris/www \
-	--log-dir=/loris/logs \
-	--source-images=/loris/images
-RUN cp www/icons/* /loris/www/icons
-RUN ln -s /loris/www/loris2.wsgi /loris/www/loris2.py
-
-# Cleanup
-WORKDIR /loris
-RUN rm -rf /tmp/loris
-
-# Run loris on port 9000
-EXPOSE 9000
-CMD ["gunicorn", "--bind=0.0.0.0:9000", "--chdir=/loris/www", "loris2"]
diff --git a/loris/loris2.conf b/loris/loris2.conf
deleted file mode 100644
index 7eadc6e1f4..0000000000
--- a/loris/loris2.conf
+++ /dev/null
@@ -1,105 +0,0 @@
-[loris.Loris]
-tmp_dp = '/loris2/tmp' # r--
-www_dp = '/loris2/www' # r-x
-run_as_user = 'loris'
-run_as_group = 'loris'
-enable_caching = True
-redirect_canonical_image_request = False
-redirect_id_slash_to_info = True
-
-# max_size_above_full restricts interpolation of images on the server.
-# Default value 200 means that a user cannot request image sizes greater than
-# 200% of original image size (width or height).
-# Set this value to 100 to disallow interpolation. Set to 0 to remove
-# size restriction.
-max_size_above_full = 200
-
-[logging]
-log_to = 'console'    # 'console'|'file'
-log_level = 'INFO' # 'DEBUG'|'INFO'|'WARNING'|'ERROR'|'CRITICAL'
-format = '%(asctime)s (%(name)s) [%(levelname)s]: %(message)s'
-
-[resolver]
-impl = 'loris.resolver.SimpleFSResolver'
-src_img_root = '/loris/images'
-
-#Example of one version of SimpleHTTResolver config
-
-#[resolver]
-#impl = 'loris.resolver.SimpleHTTPResolver'
-#source_prefix='https://<server>/fedora/objects/'
-#source_suffix='/datastreams/accessMaster/content'
-#cache_root='/usr/local/share/images/loris'
-#user='<if needed else remove this line>'
-#pw='<if needed else remove this line>'
-#cert='<SSL client cert for authentication>'
-#key='<SSL client key for authentication>'
-#ssl_check='<Check for SSL errors. Defaults to True. Set to False to ignore issues with self signed certificates>'
-
-# Sample config for TemplateHTTResolver config
-# [resolver]
-# impl = 'loris.resolver.TemplateHTTPResolver'
-# cache_root='/usr/local/share/images/loris'
-## optional settings
-# delimiter = "|" # optional delimiter for splitting identifier, allowing for n-values to be inserted into the template
-# default_format
-# head_resolvable = False
-# templates = 'a, b, fedora, devfedora, fedora_obj_ds'
-# [[a]]
-# url='http://example.edu/images/%s'
-# [[b]]
-# url='http://example.edu/images-elsewhere/%s'
-## optional overrides for requests using this template
-# user='otheruser'
-# pw='secret'
-# [[fedora]]
-# url='http://<server>/fedora/objects/%s/datastreams/accessMaster/content'
-## optional overrides for requests using this template
-# cert='/path/to/client.pem'
-# key='/path/to/client.key'
-# [[fedora_obj_ds]]
-# url = 'http://<server>/fedora/objects/%s/datastreams/%s/content' # as used with delimiter option below
-
-[img.ImageCache]
-# must be on the same volume as tmp_dp, for atomic move operations
-# will crash if on another volume
-cache_dp = '/loris/cache' # rwx
-
-[img_info.InfoCache]
-# must be on the same volume as tmp_dp, for atomic move operations
-# will crash if on another volume
-cache_dp = '/loris/cache' # rwx
-
-[transforms]
-dither_bitonal_images = False
-target_formats = ['jpg','png','gif','webp']
-
-    [[jpg]]
-    impl = 'JPG_Transformer'
-
-    [[tif]]
-    impl = 'TIF_Transformer'
-
-    [[png]]
-    impl = 'PNG_Transformer'
-
-#    [[jp2]]
-#    impl = 'KakaduJP2Transformer'
-#    tmp_dp = '/tmp/loris/tmp/jp2' # rwx
-#    kdu_expand = '/usr/local/bin/kdu_expand' # r-x
-#    kdu_libs = '/usr/local/lib' # r--
-#    num_threads = '4' # string!
-#    mkfifo = '/usr/bin/mkfifo' # r-x
-#    map_profile_to_srgb = False
-#    srgb_profile_fp = '/usr/share/color/icc/colord/sRGB.icc' # r--
-
-   [[jp2]]
-   src_format = 'jp2'
-   impl = 'OPJ_JP2Transformer'
-   tmp_dp = '/loris/tmp/jp2' # rwx
-   opj_decompress = '/usr/local/bin/opj_decompress' # r-x
-   opj_libs = '/usr/local/lib' # r--
-   mkfifo = '/usr/bin/mkfifo' # r-x
-   map_profile_to_srgb = True
-   srgb_profile_fp = '/usr/share/color/icc/colord/sRGB.icc' # r--
-
diff --git a/nginx/Dockerfile b/nginx/Dockerfile
deleted file mode 100644
index daba26d1e3..0000000000
--- a/nginx/Dockerfile
+++ /dev/null
@@ -1,9 +0,0 @@
-FROM nginx
-
-EXPOSE 80
-ENV NGINX_PORT 80
-
-RUN rm /etc/nginx/conf.d/default.conf
-COPY proxy.conf /etc/nginx/conf.d/proxy.conf
-
-CMD nginx -g 'daemon off;'
diff --git a/nginx/proxy.conf b/nginx/proxy.conf
deleted file mode 100644
index b797f25265..0000000000
--- a/nginx/proxy.conf
+++ /dev/null
@@ -1,14 +0,0 @@
-upstream loris {
-  server loris:9000;
-}
-
-server {
-  listen 80;
-
-  location / {
-    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-    proxy_set_header Host $http_host;
-    proxy_redirect off;
-    proxy_pass http://loris;
-  }
-}
-- 
GitLab