Spaces:
Runtime error
Runtime error
File size: 1,127 Bytes
10ed532 1dc395b 10ed532 852b645 1dc395b 10ed532 1dc395b 3fee335 1dc395b 852b645 1dc395b 10ed532 1dc395b 10ed532 da5648a 10ed532 1dc395b 10ed532 1dc395b da5648a 1dc395b bef2a02 | 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 | FROM node:20-alpine
USER root
# Install dependencies with fresh repository data
RUN apk update && apk add --no-cache \
git python3 py3-pip make g++ build-base \
cairo-dev pango-dev chromium postgresql-client ffmpeg yt-dlp \
bind-tools curl ca-certificates && \
update-ca-certificates && \
apk del build-base make g++ # Clean up build dependencies
ENV PUPPETEER_SKIP_DOWNLOAD=true
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
# Node.js DNS settings
#ENV NODE_OPTIONS="--dns-result-order=ipv4first"
# Avoid disabling TLS verification unless necessary
# ENV NODE_TLS_REJECT_UNAUTHORIZED=0
# Enable n8n debug logging
ENV N8N_LOG_LEVEL=debug
# Install n8n
RUN npm install -g n8n@1.103.2
# Set up n8n directories with secure permissions
RUN mkdir -p /root/.n8n/database /root/.n8n/config /root/.n8n/workflows /root/.n8n/logs \
&& chmod -R 777 /root/.n8n
WORKDIR /data
# Expose ports for Hugging Face Spaces
EXPOSE 8080
EXPOSE 7860
# Add health check to debug DNS at runtime
#HEALTHCHECK --interval=30s --timeout=3s \
# CMD curl -f https://api.telegram.org || exit 1
CMD ["n8n", "start"] |