Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,21 @@ jobs:
run: |
docker compose exec app test/test.sh

- name: Copy out artifacts
if: ${{ always() }}
run: |
docker compose cp app:/opt/app/artifacts ./
docker compose logs > artifacts/docker-compose-services.log
docker compose config > artifacts/docker-compose.merged.yml

- name: Upload the test report
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: iipsrv Build Report (${{ github.run_id }}_${{ github.run_attempt }})
path: artifacts/*
if-no-files-found: error

push:
runs-on: ubuntu-latest
needs:
Expand Down
15 changes: 13 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# =============================================================================
#
# These ARGs are used to determine the version of IIPImage to
# build. IIPSRV_BUILD_REF is intended to map to a Git tag or
# branch.
ARG IIPSRV_VERSION="1.3"
ARG IIPSRV_BUILD_REF="iipsrv-${IIPSRV_VERSION:-1.3}"

# =============================================================================
# Target: base
#
Expand All @@ -23,6 +31,7 @@ ENV LOGFILE=/dev/stdout
RUN apt-get update && \
apt-get install -y --no-install-recommends \
libgomp1 \
libwebpmux3 \
spawn-fcgi

# ==============================
Expand All @@ -49,6 +58,8 @@ CMD ["./iipsrv-entrypoint.sh"]

FROM base AS development

ARG IIPSRV_BUILD_REF

# ==============================
# Install development tools

Expand All @@ -66,10 +77,10 @@ RUN apt-get install -y --no-install-recommends \

# Clone iipsrv repo
WORKDIR /tmp
RUN git clone --depth 1 --branch iipsrv-1.1 https://github.com/ruven/iipsrv
RUN git clone --depth 1 --branch "${IIPSRV_BUILD_REF}" https://github.com/ruven/iipsrv

# Build iipsrv binary
WORKDIR iipsrv
WORKDIR /tmp/iipsrv
RUN ./autogen.sh && \
./configure && \
make
Expand Down
40 changes: 26 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
A single-container deployment of [IIPImage](https://iipimage.sourceforge.io),
running on [nginx](http://nginx.org/en/) with FastCGI.

(Forked from [iiip-nginx-single](https://git.lib.berkeley.edu/lap/iiip-nginx-single).)

## Configuration

When using this image, either on its own or with the included
Expand All @@ -20,6 +18,13 @@ environment variables:
See the [IIPImage docs](https://iipimage.sourceforge.io/documentation/server/#configuration)
for a full list of environment variables.

In addition, the Dockerfile uses the `IIPSRV_VERSION` and `IIPSRV_BUILD_REF`
build arguments to specify the version of IIPImage to compile for the image.
`IIP_VERSION` assumes Git tags of the format `iipsrv-${IIP_VERSION}` are
being created upstream; `IIPSRV_BUILD_REF` is used to specify an alternate
branch or tag name that may not be in this format.


## Notes for developers

### Default development configuration
Expand All @@ -41,7 +46,7 @@ Note that nginx/IIPImage runs on port 80, and is exposed on host port 80.
By default, the [`iipsrv-entrypoint.sh`](iipsrv-entrypoint.sh) script will
cause files to be served from the `test/data` directory.

You can override this mount by passing a `$FILESYSTEM` value to
You can override this mount by passing a `$FILESYSTEM_PREFIX` value to
the container; see below under ["Custom configuration"](#custom-configuration).

#### Testing
Expand All @@ -53,13 +58,12 @@ To test that the container has come up correctly, using the image file
curl -v 'http://localhost/iiif/test.tif/info.json'
```

This should produce a IIIF [information response](https://iiif.io/api/image/2.0/#information-request)
This should produce a IIIF [information response](https://iiif.io/api/image/3.0/#51-image-information-request)
in JSON format, e.g.:

```json
{
"@context" : "http://iiif.io/api/image/2/context.json",
"@id" : "http://localhost/iiif/test.tif",
"@context" : "http://iiif.io/api/image/3/context.json",
"protocol" : "http://iiif.io/api/image",
"width" : 2769,
"height" : 3855,
Expand All @@ -72,15 +76,23 @@ in JSON format, e.g.:
"tiles" : [
{ "width" : 256, "height" : 256, "scaleFactors" : [ 1, 2, 4, 8, 16 ] }
],
"profile" : [
"http://iiif.io/api/image/2/level1.json",
{ "formats" : [ "jpg" ],
"qualities" : [ "native","color","gray","bitonal" ],
"supports" : ["regionByPct","regionSquare","sizeByForcedWh","sizeByWh","sizeAboveFull","rotationBy90s","mirroring"],
"maxWidth" : 5000,
"maxHeight" : 5000
}
"id" : "http://localhost/iiif/test.tif",
"type": "ImageService3",
"profile" : "level1",
"maxWidth" : 5000,
"maxHeight" : 5000,
"extraQualities": ["color","gray","bitonal"],
"extraFormats": ["tif","webp"],
"extraFeatures": ["regionByPct","sizeByPct","sizeByConfinedWh","sizeUpscaling","rotationBy90s","mirroring"],
"service": [
{
"@context": "http://iiif.io/api/annex/services/physdim/1/context.json",
"profile": "http://iiif.io/api/annex/services/physdim",
"physicalScale": 0.00846667,
"physicalUnits": "cm"
}
]

}
```

Expand Down
Binary file modified test/default.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 17 additions & 10 deletions test/info.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"@context" : "http://iiif.io/api/image/2/context.json",
"@id" : "http://localhost/iiif/test.tif",
"@context" : "http://iiif.io/api/image/3/context.json",
"protocol" : "http://iiif.io/api/image",
"width" : 2769,
"height" : 3855,
Expand All @@ -13,13 +12,21 @@
"tiles" : [
{ "width" : 256, "height" : 256, "scaleFactors" : [ 1, 2, 4, 8, 16 ] }
],
"profile" : [
"http://iiif.io/api/image/2/level1.json",
{ "formats" : [ "jpg" ],
"qualities" : [ "native","color","gray","bitonal" ],
"supports" : ["regionByPct","regionSquare","sizeByForcedWh","sizeByWh","sizeAboveFull","rotationBy90s","mirroring"],
"maxWidth" : 5000,
"maxHeight" : 5000
}
"id" : "http://localhost/iiif/test.tif",
"type": "ImageService3",
"profile" : "level1",
"maxWidth" : 5000,
"maxHeight" : 5000,
"extraQualities": ["color","gray","bitonal"],
"extraFormats": ["tif","webp"],
"extraFeatures": ["regionByPct","sizeByPct","sizeByConfinedWh","sizeUpscaling","rotationBy90s","mirroring"],
"service": [
{
"@context": "http://iiif.io/api/annex/services/physdim/1/context.json",
"profile": "http://iiif.io/api/annex/services/physdim",
"physicalScale": 0.00846667,
"physicalUnits": "cm"
}
]

}