mirror of
https://github.com/DumbWareio/DumbDrop.git
synced 2025-10-23 07:41:58 +00:00
- Update dockerfile to use existing PUID, PGID if exists and create one as fallback.
- include environment variables in docker compose as well
This commit is contained in:
10
Dockerfile
10
Dockerfile
@@ -23,10 +23,12 @@ RUN . /opt/venv/bin/activate && \
|
||||
# Add virtual environment to PATH
|
||||
ENV PATH="/opt/venv/bin:$PATH"
|
||||
|
||||
# Create group and user
|
||||
# We use the ARG values here. The entrypoint script will handle runtime adjustments if ENV vars are set.
|
||||
RUN addgroup -g ${PGID} nodeuser && \
|
||||
adduser -u ${PUID} -G nodeuser -s /bin/sh -D nodeuser
|
||||
# Create group and user with fallback to prevent build failures
|
||||
# We use the ARG values here, but with a fallback mechanism to avoid build failures
|
||||
RUN addgroup -g ${PGID} nodeuser 2>/dev/null || \
|
||||
(echo "Group with GID ${PGID} already exists, creating with alternate GID" && addgroup nodeuser) && \
|
||||
adduser -u ${PUID} -G nodeuser -s /bin/sh -D nodeuser 2>/dev/null || \
|
||||
(echo "User with UID ${PUID} already exists, creating with alternate UID" && adduser -G nodeuser -s /bin/sh -D nodeuser)
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
|
@@ -1,5 +1,3 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
dumbdrop:
|
||||
image: dumbwareio/dumbdrop:latest
|
||||
@@ -25,6 +23,9 @@ services:
|
||||
# APPRISE_MESSAGE: "New file uploaded - {filename} ({size}), Storage used {storage}" # Notification message template with placeholders: {filename}, {size}, {storage}
|
||||
# APPRISE_SIZE_UNIT: "Auto" # Size unit for notifications (B, KB, MB, GB, TB, or Auto)
|
||||
# ALLOWED_EXTENSIONS: ".jpg,.jpeg,.png,.pdf,.doc,.docx,.txt" # Comma-separated list of allowed file extensions (default: all allowed)
|
||||
# PUID: 1000 # User ID for file ownership (default: 1000)
|
||||
# PGID: 1000 # Group ID for file ownership (default: 1000)
|
||||
# UMASK: "000" # File permissions mask (default: 000)
|
||||
restart: unless-stopped
|
||||
# user: "${PUID}:${PGID}" # Don't set user here, entrypoint handles it
|
||||
# Consider adding healthcheck
|
||||
|
Reference in New Issue
Block a user