Skip to content

Commit 704d29d

Browse files
authored
[Enhancement] Add support for UMASK environment variable (#582)
* Add umask setting to docker start * Testing adding umask env var * Added umask to README
1 parent 3dd2014 commit 704d29d

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ If you change this setting and it works well for you, please leave a comment on
148148
| --------------------------- | --------- | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
149149
| `TZ` | No | `UTC` | Must follow IANA TZ format |
150150
| `LOG_LEVEL` | No | `debug` | Can be set to `info` but `debug` is strongly recommended |
151+
| `UMASK` | No | `022` | Unraid users may want to set this to `000` |
151152
| `BASIC_AUTH_USERNAME` | No | | See [authentication docs](https://github.com/kieraneglin/pinchflat/wiki/Username-and-Password) |
152153
| `BASIC_AUTH_PASSWORD` | No | | See [authentication docs](https://github.com/kieraneglin/pinchflat/wiki/Username-and-Password) |
153154
| `EXPOSE_FEED_ENDPOINTS` | No | `false` | See [RSS feed docs](https://github.com/kieraneglin/pinchflat/wiki/Podcast-RSS-Feeds) |

docker/selfhosted.Dockerfile

+5-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ARG DEBIAN_VERSION=bookworm-20240612-slim
77
ARG BUILDER_IMAGE="hexpm/elixir:${ELIXIR_VERSION}-erlang-${OTP_VERSION}-debian-${DEBIAN_VERSION}"
88
ARG RUNNER_IMAGE="debian:${DEBIAN_VERSION}"
99

10-
FROM ${BUILDER_IMAGE} as builder
10+
FROM ${BUILDER_IMAGE} AS builder
1111

1212
ARG TARGETPLATFORM
1313
RUN echo "Building for ${TARGETPLATFORM:?}"
@@ -110,9 +110,9 @@ RUN apt-get update -y && \
110110
rm -rf /var/lib/apt/lists/*
111111

112112
# More locale setup
113-
ENV LANG en_US.UTF-8
114-
ENV LANGUAGE en_US:en
115-
ENV LC_ALL en_US.UTF-8
113+
ENV LANG=en_US.UTF-8
114+
ENV LANGUAGE=en_US:en
115+
ENV LC_ALL=en_US.UTF-8
116116

117117
WORKDIR "/app"
118118

@@ -124,6 +124,7 @@ RUN mkdir -p /config /downloads /etc/elixir_tzdata_data /etc/yt-dlp/plugins && \
124124
ENV MIX_ENV="prod"
125125
ENV PORT=${PORT}
126126
ENV RUN_CONTEXT="selfhosted"
127+
ENV UMASK=022
127128
EXPOSE ${PORT}
128129

129130
# Only copy the final release from the build stage

rel/overlays/bin/docker_start

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ if [ $? -ne 0 ]; then
66
exit 1
77
fi
88

9+
echo "Setting umask to ${UMASK}"
10+
umask ${UMASK}
11+
912
/app/bin/migrate
1013

1114
cd -P -- "$(dirname -- "$0")"

0 commit comments

Comments
 (0)