Improved docker configuration

This commit is contained in:
Michael Mayer 2018-02-28 10:04:24 +01:00
parent ac0cff5b29
commit fb2d01d2c8
6 changed files with 13 additions and 5 deletions

View file

@ -7,7 +7,7 @@ before_script:
- docker-compose up --build -d
script:
- docker-compose exec photoprism 'go test'
- docker-compose exec photoprism /usr/local/go/bin/go test
after_script:
- docker-compose down

View file

@ -8,7 +8,10 @@ RUN ldconfig
# Hide some warnings
ENV TF_CPP_MIN_LOG_LEVEL 2
# Install Go (https://github.com/docker-library/golang/blob/221ee92559f2963c1fe55646d3516f5b8f4c91a4/1.9/stretch/Dockerfile)
RUN curl -L "https://download.opensuse.org/repositories/graphics:darktable:stable/xUbuntu_16.04/Release.key" | apt-key add -
RUN sh -c "echo 'deb http://download.opensuse.org/repositories/graphics:/darktable:/stable/xUbuntu_16.04/ /' > /etc/apt/sources.list.d/darktable.list"
# Install Go
RUN apt-get update && apt-get install -y --no-install-recommends \
g++ \
gcc \
@ -20,6 +23,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
git \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get upgrade -y
ENV GOLANG_VERSION 1.10
RUN set -eux; \
\

View file

@ -28,6 +28,8 @@ Our goal is to provide the following features (tested as a proof-of-concept):
- Image search with powerful filters
- Easy backup and export
![](https://www.dropbox.com/s/m1cnl8mn4s4ub8h/concept.jpg?dl=1)
Unit Tests
----------

View file

@ -11,7 +11,7 @@ const testDataPath = "testdata"
const testDataUrl = "https://www.dropbox.com/s/na9p9wwt98l7m5b/import.zip?dl=1"
const testDataHash = "ed3bdb2fe86ea662bc863b63e219b47b8d9a74024757007f7979887d"
var darktableCli = "/Applications/darktable.app/Contents/MacOS/darktable-cli"
var darktableCli = "/usr/bin/darktable-cli"
var testDataZip = GetExpandedFilename(testDataPath + "/import.zip")
var originalsPath = GetExpandedFilename(testDataPath + "/originals")
var thumbnailsPath = GetExpandedFilename(testDataPath + "/thumbnails")

View file

@ -34,5 +34,5 @@ func TestImporter_GetDestinationFilename(t *testing.T) {
assert.Empty(t, err)
assert.Equal(t, conf.OriginalsPath + "/2018/02/20180204_170813_B0770443A5F7.cr2", filename)
assert.Equal(t, conf.OriginalsPath + "/2018/02/20180204_180813_B0770443A5F7.cr2", filename)
}

View file

@ -7,8 +7,9 @@ import (
func CreateThumbnail () {
src, err := imaging.Open("testdata/lena_512.png")
if err != nil {
log.Print("Open failed: %v", err)
log.Printf("Open failed: %s", err.Error())
}
// Crop the original image to 350x350px size using the center anchor.