Compare commits

..

4 commits

Author SHA1 Message Date
Jonas Miederer
5e9b0169de Merge branch 'fix/entrypoint-lf'
Some checks failed
/ test (push) Has been cancelled
/ build (push) Has been cancelled
/ validate (push) Has been cancelled
2026-09-15 14:50:56 +02:00
Jonas Miederer
fd5feeaeb5 fix: keep shell scripts LF so dash entrypoint starts 2026-09-15 14:50:56 +02:00
Jonas Miederer
ac0401cee2 Merge branch 'fix/lfx-user-home' 2026-09-14 21:57:17 +02:00
Jonas Miederer
23a3fd6459 fix: give lfx runtime user a home directory 2026-09-14 21:57:16 +02:00
3 changed files with 12 additions and 2 deletions

4
.gitattributes vendored Normal file
View file

@ -0,0 +1,4 @@
# Shell must stay LF: containers execute entrypoint scripts from the bind-mount
# and dash rejects CRLF (a `set -e\r` line aborts startup with
# "set: Illegal option -").
*.sh text eol=lf

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).
## [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
- Production ops: `scripts/check_prod.py` validates `.env` secrets and
modes before deploy (with tests); README production checklist

View file

@ -13,8 +13,11 @@ ENV PYTHONUNBUFFERED=1 \
ARG LFX_VERSION=1.12.0
RUN pip install "lfx~=${LFX_VERSION}" requests
# Non-root runtime: uploads persist into the mounted volume.
RUN useradd -r -s /bin/false lfx && mkdir -p /flows && chown lfx /flows
# Non-root runtime: uploads persist into the mounted volume. The user needs
# 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
EXPOSE 6004
USER lfx