Spaces:
Paused
Paused
File size: 1,974 Bytes
b2d5d3a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | # Einswarm Node-RED — Hugging Face Docker Space (cpu-basic)
# nginx :7860 → Node-RED :1880; strips X-Frame-Options / CORP for HF embed
FROM nodered/node-red:latest
USER root
RUN set -eux; \
if command -v apk >/dev/null 2>&1; then \
apk add --no-cache nginx tini curl bash openssl; \
else \
apt-get update && apt-get install -y --no-install-recommends nginx tini curl bash openssl ca-certificates \
&& rm -rf /var/lib/apt/lists/*; \
fi; \
mkdir -p \
/data \
/einswarm \
/tmp/nginx_client_body \
/tmp/nginx_proxy \
/tmp/nginx_fastcgi \
/tmp/nginx_uwsgi \
/tmp/nginx_scgi \
/var/log/nginx \
/var/lib/nginx/tmp \
/run/nginx; \
chown -R node-red:root /data /einswarm /tmp/nginx_client_body /tmp/nginx_proxy /tmp/nginx_fastcgi /tmp/nginx_uwsgi /tmp/nginx_scgi /var/log/nginx /var/lib/nginx /run/nginx; \
chmod -R g+rwX /data /einswarm /tmp/nginx_client_body /tmp/nginx_proxy /tmp/nginx_fastcgi /tmp/nginx_uwsgi /tmp/nginx_scgi /var/log/nginx /var/lib/nginx /run/nginx; \
ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime || true; \
echo "Europe/Berlin" > /etc/timezone || true; \
# Ensure tini path exists as /sbin/tini for ENTRYPOINT
if [ ! -x /sbin/tini ] && [ -x /usr/bin/tini ]; then ln -sf /usr/bin/tini /sbin/tini; fi
COPY nginx.conf /etc/nginx/nginx.conf
COPY settings.js /einswarm/settings.js
COPY einswarm-editor.css /einswarm/einswarm-editor.css
COPY bmc-loader.js /einswarm/bmc-loader.js
COPY assets/einswarm-logo.png /einswarm/einswarm-logo.png
COPY entrypoint.sh /entrypoint.sh
RUN chmod 755 /entrypoint.sh \
&& chmod 644 /etc/nginx/nginx.conf /einswarm/settings.js /einswarm/einswarm-editor.css /einswarm/bmc-loader.js \
&& chown -R node-red:root /einswarm /entrypoint.sh
ENV TZ=Europe/Berlin \
FLOWS=flows.json \
NODE_RED_ENABLE_SAFE_MODE=false
WORKDIR /usr/src/node-red
USER node-red
EXPOSE 7860
ENTRYPOINT ["/sbin/tini", "--", "/entrypoint.sh"]
|