Docker: Explicitly set HOME environment variable #1525
This commit is contained in:
parent
f7cc61edbc
commit
ed962a36da
14 changed files with 20 additions and 7 deletions
10
.drone.yml
10
.drone.yml
|
@ -42,7 +42,7 @@ steps:
|
|||
- docker-compose -f docker-compose.drone.yml exec -T photoprism make all test install migrate
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
- preview
|
||||
- release
|
||||
|
||||
- name: down
|
||||
|
@ -67,7 +67,7 @@ steps:
|
|||
status:
|
||||
- success
|
||||
branch:
|
||||
- master
|
||||
- preview
|
||||
|
||||
- name: deploy-demo
|
||||
environment:
|
||||
|
@ -83,7 +83,7 @@ steps:
|
|||
status:
|
||||
- success
|
||||
branch:
|
||||
- master
|
||||
- preview
|
||||
|
||||
- name: deploy-release
|
||||
environment:
|
||||
|
@ -139,7 +139,7 @@ name: linux-arm64
|
|||
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
||||
- preview
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
||||
|
@ -176,6 +176,6 @@ steps:
|
|||
|
||||
---
|
||||
kind: signature
|
||||
hmac: 7276095f851d0595a0471e4ec4249e14e7e809f0655883483bfafab2febaef6e
|
||||
hmac: 0d3578ccf3d317b2db0b514ce2614bf4f943a971345176971bbab30cc624a1c5
|
||||
|
||||
...
|
||||
|
|
|
@ -2,4 +2,5 @@ FROM photoprism/development:20210831
|
|||
|
||||
# Set up project directory
|
||||
WORKDIR "/go/src/github.com/photoprism/photoprism"
|
||||
ENV HOME="/go/src/github.com/photoprism/photoprism"
|
||||
COPY . .
|
|
@ -56,6 +56,7 @@ services:
|
|||
PHOTOPRISM_THUMB_SIZE_UNCACHED: 7680 # On-demand rendering size limit (default 7680, min 720, max 7680)
|
||||
PHOTOPRISM_JPEG_SIZE: 7680 # Size limit for converted image files in pixels (720-30000)
|
||||
PHOTOPRISM_JPEG_QUALITY: 92 # Set to 95 for high-quality thumbnails (25-100)
|
||||
HOME: "/photoprism"
|
||||
CODECOV_TOKEN:
|
||||
CODECOV_ENV:
|
||||
CODECOV_URL:
|
||||
|
|
|
@ -19,7 +19,6 @@ services:
|
|||
- "go-mod:/go/pkg/mod"
|
||||
shm_size: "2gb"
|
||||
environment:
|
||||
TF_CPP_MIN_LOG_LEVEL: 0 # Show TensorFlow log messages for development
|
||||
PHOTOPRISM_SITE_URL: "http://localhost:2342/"
|
||||
PHOTOPRISM_SITE_TITLE: "PhotoPrism"
|
||||
PHOTOPRISM_SITE_CAPTION: "Browse Your Life"
|
||||
|
@ -61,6 +60,8 @@ services:
|
|||
PHOTOPRISM_THUMB_SIZE_UNCACHED: 7680 # On-demand rendering size limit (default 7680, min 720, max 7680)
|
||||
PHOTOPRISM_JPEG_SIZE: 7680 # Size limit for converted image files in pixels (720-30000)
|
||||
PHOTOPRISM_JPEG_QUALITY: 92 # Set to 95 for high-quality thumbnails (25-100)
|
||||
TF_CPP_MIN_LOG_LEVEL: 0 # Show TensorFlow log messages for development
|
||||
HOME: "/photoprism"
|
||||
|
||||
postgres:
|
||||
image: postgres:12-alpine
|
||||
|
|
|
@ -20,7 +20,6 @@ services:
|
|||
shm_size: "2gb"
|
||||
environment:
|
||||
UID: ${UID:-1000}
|
||||
TF_CPP_MIN_LOG_LEVEL: 0 # Show TensorFlow log messages for development
|
||||
PHOTOPRISM_SITE_URL: "http://localhost:2342/"
|
||||
PHOTOPRISM_SITE_TITLE: "PhotoPrism"
|
||||
PHOTOPRISM_SITE_CAPTION: "Browse Your Life"
|
||||
|
@ -62,6 +61,8 @@ services:
|
|||
PHOTOPRISM_THUMB_SIZE_UNCACHED: 7680 # On-demand rendering size limit (default 7680, min 720, max 7680)
|
||||
PHOTOPRISM_JPEG_SIZE: 7680 # Size limit for converted image files in pixels (720-30000)
|
||||
PHOTOPRISM_JPEG_QUALITY: 92 # Set to 95 for high-quality thumbnails (25-100)
|
||||
TF_CPP_MIN_LOG_LEVEL: 0 # Show TensorFlow log messages for development
|
||||
HOME: "/photoprism"
|
||||
|
||||
mariadb:
|
||||
image: mariadb:10.5
|
||||
|
|
|
@ -142,6 +142,7 @@ RUN chmod 644 /root/.my.cnf /photoprism/.my.cnf
|
|||
|
||||
# Set up project directory
|
||||
WORKDIR "/go/src/github.com/photoprism/photoprism"
|
||||
ENV HOME="/go/src/github.com/photoprism/photoprism"
|
||||
|
||||
# Expose HTTP port 2342, 2343 plus 9515 for chromedriver
|
||||
EXPOSE 2342 2343 9515
|
||||
|
|
|
@ -74,6 +74,7 @@ services:
|
|||
PHOTOPRISM_SITE_CAPTION: "Browse Your Life"
|
||||
PHOTOPRISM_SITE_DESCRIPTION: ""
|
||||
PHOTOPRISM_SITE_AUTHOR: ""
|
||||
HOME: "/photoprism"
|
||||
# Set a non-root user, group, or custom umask if your Docker environment doesn't support this natively:
|
||||
# UID: 1000
|
||||
# GID: 1000
|
||||
|
|
|
@ -144,6 +144,7 @@ services:
|
|||
PHOTOPRISM_DATABASE_NAME: "photoprism" # MariaDB database schema name
|
||||
PHOTOPRISM_DATABASE_USER: "photoprism" # MariaDB database user name
|
||||
PHOTOPRISM_DATABASE_PASSWORD: "_admin_password_" # MariaDB database user password
|
||||
HOME: "/photoprism"
|
||||
working_dir: "/photoprism"
|
||||
volumes:
|
||||
# Your photo and video files ([local path]:[container path]):
|
||||
|
|
|
@ -71,6 +71,7 @@ services:
|
|||
PHOTOPRISM_SITE_CAPTION: "Browse Your Life"
|
||||
PHOTOPRISM_SITE_DESCRIPTION: ""
|
||||
PHOTOPRISM_SITE_AUTHOR: ""
|
||||
HOME: "/photoprism"
|
||||
# Set a non-root user, group, or custom umask if your Docker environment doesn't support this natively:
|
||||
# UID: 1000
|
||||
# GID: 1000
|
||||
|
|
|
@ -66,6 +66,7 @@ services:
|
|||
PHOTOPRISM_SITE_CAPTION: "Browse Your Life"
|
||||
PHOTOPRISM_SITE_DESCRIPTION: ""
|
||||
PHOTOPRISM_SITE_AUTHOR: ""
|
||||
HOME: "/photoprism"
|
||||
volumes:
|
||||
# Your photo and video files ([local path]:[container path]):
|
||||
- "~/Pictures:/photoprism/originals"
|
||||
|
|
|
@ -73,6 +73,7 @@ services:
|
|||
PHOTOPRISM_SITE_CAPTION: "Browse Your Life"
|
||||
PHOTOPRISM_SITE_DESCRIPTION: ""
|
||||
PHOTOPRISM_SITE_AUTHOR: ""
|
||||
HOME: "/photoprism"
|
||||
# Set a non-root user, group, or custom umask if your Docker environment doesn't support this natively:
|
||||
# UID: 1000
|
||||
# GID: 1000
|
||||
|
|
|
@ -64,6 +64,7 @@ services:
|
|||
PHOTOPRISM_SITE_CAPTION: "Browse Your Life"
|
||||
PHOTOPRISM_SITE_DESCRIPTION: ""
|
||||
PHOTOPRISM_SITE_AUTHOR: ""
|
||||
HOME: "/photoprism"
|
||||
# Set a non-root user, group, or custom umask if your Docker environment doesn't support this natively:
|
||||
# UID: 1000
|
||||
# GID: 1000
|
||||
|
|
|
@ -69,6 +69,7 @@ services:
|
|||
PHOTOPRISM_SITE_CAPTION: "Browse Your Life"
|
||||
PHOTOPRISM_SITE_DESCRIPTION: ""
|
||||
PHOTOPRISM_SITE_AUTHOR: ""
|
||||
HOME: "/photoprism"
|
||||
working_dir: "/photoprism"
|
||||
volumes:
|
||||
# Your photo and video files (multiple directories or drives can be indexed by mounting them as sub-folders):
|
||||
|
|
|
@ -110,6 +110,7 @@ RUN ldconfig
|
|||
# Set default umask and create photoprism user
|
||||
RUN umask 0000 && useradd photoprism -m -d /photoprism && chmod a+rwx /photoprism
|
||||
WORKDIR /photoprism
|
||||
ENV HOME="/photoprism"
|
||||
|
||||
# Copy files to /photoprism
|
||||
COPY --from=build /root/.local/bin/photoprism /photoprism/bin/photoprism
|
||||
|
|
Loading…
Add table
Reference in a new issue