Skip to content

Commit 451e27e

Browse files
committed
Merge branch 'release/4.0.1' into main
2 parents 8a12c93 + ca89655 commit 451e27e

File tree

9 files changed

+39
-56
lines changed

9 files changed

+39
-56
lines changed

Makefile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,25 @@ clean:
4949
rm -f src/transform/rotation.go
5050
rm -f src/version/build.go
5151

52+
distclean: clean
53+
go clean -modcache -testcache -cache
54+
docker rmi uolibraries/rais:build || true
55+
docker rmi uolibraries/rais:build-alpine || true
56+
docker rmi uolibraries/rais:dev || true
57+
docker rmi uolibraries/rais:dev-alpine || true
58+
5259
# Generate the docker images
5360
docker: | force-getbuild generate
61+
docker pull golang:1
62+
docker pull golang:1-alpine
5463
docker build --rm --target build -f $(MakefileDir)/docker/Dockerfile -t uolibraries/rais:build $(MakefileDir)
55-
docker build --rm -f $(MakefileDir)/docker/Dockerfile -t uolibraries/rais:latest-indev $(MakefileDir)
64+
docker build --rm -f $(MakefileDir)/docker/Dockerfile -t uolibraries/rais:dev $(MakefileDir)
5665
make docker-alpine
5766

5867
# Build just the alpine image for cases where we want to get this updated / cranked out fast
5968
docker-alpine: | force-getbuild generate
6069
docker build --rm --target build -f $(MakefileDir)/docker/Dockerfile-alpine -t uolibraries/rais:build-alpine $(MakefileDir)
61-
docker build --rm -f $(MakefileDir)/docker/Dockerfile-alpine -t uolibraries/rais:latest-alpine $(MakefileDir)
70+
docker build --rm -f $(MakefileDir)/docker/Dockerfile-alpine -t uolibraries/rais:dev-alpine $(MakefileDir)
6271

6372
# Build plugins on any change to their directory or their go files
6473
bin/plugins/%.so : src/plugins/% src/version/build.go src/plugins/%/*.go

docker-compose.override-example.yml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,25 @@
1515
version: "3.4"
1616
services:
1717
rais:
18-
# Uncomment this if you'd like to fire up an Alpine-based container - note
19-
# that it doesn't have any configuration baked in, so you'll have to use
20-
# environment vars for *all configuration*. Good for production, but bad
21-
# for a quick demo.
22-
#image: uolibraries/rais:latest-alpine
18+
# Uncomment one of these if you'd like to use an image built by `make
19+
# docker` rather than testing out the latest uploaded image
20+
#image: uolibraries/rais:dev
21+
#image: uolibraries/rais:dev-alpine
22+
2323
environment:
2424
# These next lines would allow you to pass the various S3 configuration
2525
# options through from the host's environment (or the local .env file)
26-
- RAIS_S3CACHE
27-
- RAIS_S3ZONE
28-
- RAIS_S3ENDPOINT
26+
- RAIS_S3_ENDPOINT
27+
- RAIS_S3_DISABLESSL
28+
- RAIS_S3_FORCEPATHSTYLE
2929
- AWS_ACCESS_KEY_ID
3030
- AWS_SECRET_ACCESS_KEY
31+
- AWS_REGION
3132
- AWS_SESSION_TOKEN
33+
3234
# If you wanted to use a configured AWS credentials file for s3, do this
3335
# and then see the volume config below
3436
- AWS_SHARED_CREDENTIALS_FILE=/etc/aws.credentials
35-
volumes:
36-
# Mount in all binaries so you aren't rebuilding the image to test quick changes
37-
- ./bin:/opt/rais:ro
38-
# Volume config (modify source) for using an AWS credentials file
39-
- /home/myuser/.aws/credentials:/etc/aws.credentials
4037
ports:
4138
- 12415:12415
4239
- 12416:12416

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ services:
1515
- URL
1616
- RAIS_ADDRESS
1717
- RAIS_LOGLEVEL
18-
- RAIS_TILEPATH
18+
- RAIS_TILEPATH=/var/local/images
1919
- RAIS_IIIFWEBPATH
2020
- RAIS_IIIFBASEURL
2121
- RAIS_INFOCACHELEN

docker/Dockerfile

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,37 +7,12 @@
77
#
88
# # Generate the build image to simplify local development
99
# docker build --rm -t uolibraries/rais:build --target build -f ./docker/Dockerfile .
10-
FROM fedora:32 AS build
10+
FROM golang:1 AS build
1111
LABEL maintainer="Jeremy Echols <jechols@uoregon.edu>"
1212

1313
# Install all the build dependencies
14-
RUN dnf update -y
15-
RUN dnf upgrade -y
16-
RUN dnf install -y openjpeg2-devel
17-
RUN dnf install -y ImageMagick-devel
18-
RUN dnf install -y git
19-
RUN dnf install -y gcc
20-
RUN dnf install -y make
21-
RUN dnf install -y tar
22-
RUN dnf install -y findutils
23-
24-
# Installing GraphicsMagick is wholly unnecessary, but helps when using the
25-
# build box for things like converting images. Since opj2_encode doesn't
26-
# support all formats, and ImageMagick has been iffy with some conversions for
27-
# us, "gm convert" is a handy fallback. As this is a multi-stage dockerfile,
28-
# this installation doesn't hurt the final production docker image.
29-
RUN dnf install -y GraphicsMagick
30-
31-
# Go comes after other installs to avoid re-pulling the more expensive
32-
# dependencies when changing Go versions
33-
RUN curl -L https://dl.google.com/go/go1.14.4.linux-amd64.tar.gz > /tmp/go.tgz
34-
RUN cd /opt && tar -xzf /tmp/go.tgz
35-
36-
# "Install" Go
37-
RUN mkdir -p /usr/local/go
38-
ENV GOPATH /usr/local/go
39-
ENV GOROOT /opt/go
40-
ENV PATH /opt/go/bin:/usr/local/go/bin:$PATH
14+
RUN apt-get update -y && apt-get upgrade -y && \
15+
apt-get install -y libopenjp2-7-dev libmagickcore-dev git gcc make tar findutils
4116

4217
# Make sure the build box can lint code
4318
RUN go get -u golang.org/x/lint/golint
@@ -59,16 +34,19 @@ RUN make
5934
# Manually build the ImageMagick plugin since we exclude it by default
6035
RUN make bin/plugins/imagick-decoder.so
6136

37+
38+
6239
# Production image just installs runtime deps and copies in the binaries
63-
FROM fedora:30 AS production
40+
FROM debian:buster AS production
6441
LABEL maintainer="Jeremy Echols <jechols@uoregon.edu>"
6542

6643
# Stolen from mariadb dockerfile: add our user and group first to make sure
6744
# their IDs get assigned consistently
6845
RUN groupadd -r rais && useradd -r -g rais rais
6946

70-
# Deps
71-
RUN dnf update -y && dnf upgrade -y && dnf install -y openjpeg2 ImageMagick
47+
# Install the core dependencies needed for both build and production
48+
RUN apt-get update -y && apt-get upgrade -y && \
49+
apt-get install -y libopenjp2-7 imagemagick
7250

7351
ENV RAIS_TILEPATH /var/local/images
7452
ENV RAIS_PLUGINS "*.so"

docker/demo-rais-entry.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Copy the config and edit it in-place; this allows customizing most pieces of
77
# configuration for demoing
88
url=${URL:-}
9-
if test "$url" == ""; then
9+
if test "$url" = ""; then
1010
echo "No URL provided; defaulting to 'http://localhost'"
1111
echo "If you can't see images, try an explicitly-set URL, e.g.:"
1212
echo

docker/hub.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
# Supported tags and respective `Dockerfile` links
22

3-
- [`3`, `3.3`, `3.3.1`, `latest` (*docker/Dockerfile*)](https://github.com/uoregon-libraries/rais-image-server/blob/v3.3.1/docker/Dockerfile)
4-
- [`alpine`, `3-alpine`, `3.3-alpine`, `3.3.1-alpine` (*docker/Dockerfile-alpine*)](https://github.com/uoregon-libraries/rais-image-server/blob/v3.3.1/docker/Dockerfile-alpine)
5-
- [`3.2`, `3.2.1` (*docker/Dockerfile*)](https://github.com/uoregon-libraries/rais-image-server/blob/v3.2.1/docker/Dockerfile)
6-
- [`3.1`, `3.1.1` (*docker/Dockerfile*)](https://github.com/uoregon-libraries/rais-image-server/blob/v3.1.1/docker/Dockerfile)
7-
- [`3.0`, `3.0.1` (*docker/Dockerfile*)](https://github.com/uoregon-libraries/rais-image-server/blob/v3.0.1/docker/Dockerfile)
8-
- [`2.11`, `2.11.2` (*docker/Dockerfile.prod*)](https://github.com/uoregon-libraries/rais-image-server/blob/v2.11.2/docker/Dockerfile.prod)
3+
- [`4`, `4.0`, `4.0.1`, `latest` (*docker/Dockerfile*)](https://github.com/uoregon-libraries/rais-image-server/blob/v4.0.1/docker/Dockerfile)
4+
- [`4-alpine`, `4.0-alpine`, `4.0.1-alpine`, `alpine` (*docker/Dockerfile*)](https://github.com/uoregon-libraries/rais-image-server/blob/v4.0.1/docker/Dockerfile-alpine)
5+
- [`3`, `3.3`, `3.3.1` (*docker/Dockerfile*)](https://github.com/uoregon-libraries/rais-image-server/blob/v3.3.1/docker/Dockerfile)
6+
- [`3-alpine`, `3.3-alpine`, `3.3.1-alpine` (*docker/Dockerfile-alpine*)](https://github.com/uoregon-libraries/rais-image-server/blob/v3.3.1/docker/Dockerfile-alpine)
97

108
# RAIS
119

src/cmd/rais-server/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func parseConf() {
8181
pflag.Parse()
8282

8383
// Make sure required values exist
84-
if !viper.IsSet("TilePath") {
84+
if viper.GetString("TilePath") == "" {
8585
fmt.Println("ERROR: tile path is required")
8686
pflag.Usage()
8787
os.Exit(1)

src/cmd/rais-server/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ func main() {
7676
address := viper.GetString("Address")
7777
adminAddress := viper.GetString("AdminAddress")
7878

79+
Logger.Debugf("Serving images from %q", tilePath)
7980
ih := NewImageHandler(tilePath, webPath)
8081
ih.Maximums.Area = viper.GetInt64("ImageMaxArea")
8182
ih.Maximums.Width = viper.GetInt("ImageMaxWidth")

src/version/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
package version
44

55
// Version tells us the app version string
6-
const Version = "4.0.0"
6+
const Version = "4.0.1"

0 commit comments

Comments
 (0)