Skip to content

Commit

Permalink
Testing adding umask env var
Browse files Browse the repository at this point in the history
  • Loading branch information
kieraneglin committed Jan 21, 2025
1 parent ed6d63b commit 019791c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
9 changes: 5 additions & 4 deletions docker/selfhosted.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ARG DEBIAN_VERSION=bookworm-20240612-slim
ARG BUILDER_IMAGE="hexpm/elixir:${ELIXIR_VERSION}-erlang-${OTP_VERSION}-debian-${DEBIAN_VERSION}"
ARG RUNNER_IMAGE="debian:${DEBIAN_VERSION}"

FROM ${BUILDER_IMAGE} as builder
FROM ${BUILDER_IMAGE} AS builder

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

# More locale setup
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8

WORKDIR "/app"

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

# Only copy the final release from the build stage
Expand Down
3 changes: 2 additions & 1 deletion rel/overlays/bin/docker_start
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ if [ $? -ne 0 ]; then
exit 1
fi

umask 000
echo "Setting umask to ${UMASK}"
umask ${UMASK}

/app/bin/migrate

Expand Down

0 comments on commit 019791c

Please sign in to comment.