mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
Improved docker configuration
This commit is contained in:
@@ -7,7 +7,7 @@ before_script:
|
|||||||
- docker-compose up --build -d
|
- docker-compose up --build -d
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- docker-compose exec photoprism 'go test'
|
- docker-compose exec photoprism /usr/local/go/bin/go test
|
||||||
|
|
||||||
after_script:
|
after_script:
|
||||||
- docker-compose down
|
- docker-compose down
|
||||||
@@ -8,7 +8,10 @@ RUN ldconfig
|
|||||||
# Hide some warnings
|
# Hide some warnings
|
||||||
ENV TF_CPP_MIN_LOG_LEVEL 2
|
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 \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
g++ \
|
g++ \
|
||||||
gcc \
|
gcc \
|
||||||
@@ -20,6 +23,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
git \
|
git \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
RUN apt-get upgrade -y
|
||||||
|
|
||||||
ENV GOLANG_VERSION 1.10
|
ENV GOLANG_VERSION 1.10
|
||||||
RUN set -eux; \
|
RUN set -eux; \
|
||||||
\
|
\
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ Our goal is to provide the following features (tested as a proof-of-concept):
|
|||||||
- Image search with powerful filters
|
- Image search with powerful filters
|
||||||
- Easy backup and export
|
- Easy backup and export
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
Unit Tests
|
Unit Tests
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ const testDataPath = "testdata"
|
|||||||
const testDataUrl = "https://www.dropbox.com/s/na9p9wwt98l7m5b/import.zip?dl=1"
|
const testDataUrl = "https://www.dropbox.com/s/na9p9wwt98l7m5b/import.zip?dl=1"
|
||||||
const testDataHash = "ed3bdb2fe86ea662bc863b63e219b47b8d9a74024757007f7979887d"
|
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 testDataZip = GetExpandedFilename(testDataPath + "/import.zip")
|
||||||
var originalsPath = GetExpandedFilename(testDataPath + "/originals")
|
var originalsPath = GetExpandedFilename(testDataPath + "/originals")
|
||||||
var thumbnailsPath = GetExpandedFilename(testDataPath + "/thumbnails")
|
var thumbnailsPath = GetExpandedFilename(testDataPath + "/thumbnails")
|
||||||
|
|||||||
@@ -34,5 +34,5 @@ func TestImporter_GetDestinationFilename(t *testing.T) {
|
|||||||
|
|
||||||
assert.Empty(t, err)
|
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)
|
||||||
}
|
}
|
||||||
@@ -7,8 +7,9 @@ import (
|
|||||||
|
|
||||||
func CreateThumbnail () {
|
func CreateThumbnail () {
|
||||||
src, err := imaging.Open("testdata/lena_512.png")
|
src, err := imaging.Open("testdata/lena_512.png")
|
||||||
|
|
||||||
if err != nil {
|
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.
|
// Crop the original image to 350x350px size using the center anchor.
|
||||||
|
|||||||
Reference in New Issue
Block a user