mirror of
https://github.com/BetterCorp/BetterFrame.git
synced 2026-05-27 02:56:33 +00:00
fix: entrypoint wrapper chowns /var/lib/betterframe on startup
Named volume mounts as root-owned. BSB runs as uid 1000. bf-entrypoint.sh fixes ownership before exec'ing BSB entrypoint. Removed VOLUME directive (compose handles mount). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
6b2f56f092
commit
5fa34d0568
1 changed files with 4 additions and 2 deletions
|
|
@ -46,7 +46,9 @@ ARG BF_MQTT_TOPIC_PREFIX=betterframe
|
|||
|
||||
RUN apk add --no-cache gettext ffmpeg
|
||||
|
||||
RUN mkdir -p /var/lib/betterframe && chown 1000:1000 /var/lib/betterframe
|
||||
RUN mkdir -p /var/lib/betterframe \
|
||||
&& printf '#!/bin/sh\nchown -R 1000:1000 /var/lib/betterframe 2>/dev/null || true\nexec /root/entrypoint.sh "$@"\n' > /usr/local/bin/bf-entrypoint.sh \
|
||||
&& chmod +x /usr/local/bin/bf-entrypoint.sh
|
||||
|
||||
# Install plugin into BSB's node_modules (searched at /home/bsb/node_modules)
|
||||
# /mnt/bsb-plugins is a VOLUME in base image — writes lost at runtime
|
||||
|
|
@ -67,6 +69,6 @@ RUN echo "$BF_SERVER_VERSION" > /home/bsb/.bf-version
|
|||
ENV NODE_ENV=production
|
||||
ENV BSB_LIVE=true
|
||||
|
||||
VOLUME /var/lib/betterframe
|
||||
ENTRYPOINT ["/usr/local/bin/bf-entrypoint.sh"]
|
||||
|
||||
EXPOSE 18080 18081 18082
|
||||
|
|
|
|||
Loading…
Reference in a new issue