Merge branch 'fix/lfx-user-home'

This commit is contained in:
Jonas Miederer 2026-09-14 21:57:17 +02:00
commit ac0401cee2
2 changed files with 8 additions and 2 deletions

View file

@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased] ## [Unreleased]
### Fixed
- LFX runtime user gets a home directory (`useradd -m`, `HOME` set):
without one every flow run failed with "Settings service not found".
### Security ### Security
- Production ops: `scripts/check_prod.py` validates `.env` secrets and - Production ops: `scripts/check_prod.py` validates `.env` secrets and
modes before deploy (with tests); README production checklist modes before deploy (with tests); README production checklist

View file

@ -13,8 +13,11 @@ ENV PYTHONUNBUFFERED=1 \
ARG LFX_VERSION=1.12.0 ARG LFX_VERSION=1.12.0
RUN pip install "lfx~=${LFX_VERSION}" requests RUN pip install "lfx~=${LFX_VERSION}" requests
# Non-root runtime: uploads persist into the mounted volume. # Non-root runtime: uploads persist into the mounted volume. The user needs
RUN useradd -r -s /bin/false lfx && mkdir -p /flows && chown lfx /flows # a home directory: lfx resolves settings/cache paths from $HOME, and
# without one every flow run fails ("Settings service not found").
ENV HOME=/home/lfx
RUN useradd -r -m -s /bin/false lfx && mkdir -p /flows && chown lfx /flows
VOLUME /flows VOLUME /flows
EXPOSE 6004 EXPOSE 6004
USER lfx USER lfx