Spaces:
Paused
Paused
Download Dockerfile from Leon4gr45/n8n: direct link, hf CLI and curl.
- Browser
- Download file 2.65 kB
-
https://huggingface.co/spaces/Leon4gr45/n8n/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Leon4gr45/n8n/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Leon4gr45/n8n/resolve/main/Dockerfile
2.65 kB
| # Use a base image with systemd or a process manager if complex, otherwise a simpler base | |
| # Ubuntu is a good general-purpose choice for installing multiple services | |
| FROM ubuntu:22.04 | |
| ARG DEBIAN_FRONTEND=noninteractive | |
| # Install dependencies: curl, wget, gnupg, sudo, procps (for ps), net-tools (for netstat) | |
| RUN apt-get update && apt-get install -y \ | |
| curl \ | |
| wget \ | |
| gnupg \ | |
| sudo \ | |
| procps \ | |
| net-tools \ | |
| ca-certificates \ | |
| postgresql \ | |
| postgresql-contrib \ | |
| zstd \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # --- Install Node.js (e.g., v20.x LTS) --- | |
| RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \ | |
| && apt-get install -y nodejs \ | |
| && rm -rf /var/lib/apt/lists/* | |
| RUN node -v | |
| RUN npm -v | |
| # Install n8n | |
| RUN npm install -g n8n | |
| # Install Qdrant | |
| ARG QDRANT_VERSION=v1.9.2 | |
| RUN wget "https://github.com/qdrant/qdrant/releases/download/${QDRANT_VERSION}/qdrant-x86_64-unknown-linux-gnu.tar.gz" -O qdrant.tar.gz && \ | |
| tar -xzf qdrant.tar.gz && \ | |
| mv qdrant /usr/local/bin/qdrant && \ | |
| rm qdrant.tar.gz && \ | |
| mkdir -p /qdrant/storage && \ | |
| mkdir -p /qdrant/config | |
| COPY qdrant_config.yaml /qdrant/config/config.yaml | |
| # Install Ollama | |
| RUN curl -fsSL https://ollama.com/install.sh | sh | |
| # Create a non-root user for n8n and other services if possible | |
| RUN useradd -m -s /bin/bash n8nuser | |
| RUN mkdir -p /home/n8nuser/.n8n /data/shared /home/n8nuser/.ollama /var/run/postgresql | |
| RUN chown -R n8nuser:n8nuser /home/n8nuser /data/shared /qdrant /var/run/postgresql | |
| # Setup environment variables | |
| # IMPORTANT: NO end-of-line comments in this ENV block | |
| ENV N8N_HOST="0.0.0.0" | |
| ENV N8N_PORT="5678" | |
| ENV NODE_ENV="production" | |
| ENV DB_TYPE="postgresdb" | |
| ENV DB_POSTGRESDB_HOST="localhost" | |
| ENV DB_POSTGRESDB_PORT="5432" | |
| ENV DB_POSTGRESDB_DATABASE="n8n" | |
| ENV DB_POSTGRESDB_USER="n8n" | |
| ENV OLLAMA_HOST="0.0.0.0:11434" | |
| # OAuth redirect URL configuration - override with proxy base URL | |
| ENV N8N_EDITOR_BASE_URL="https://n8n-clickup-oauth-proxy.vercel.app/" | |
| ENV N8N_WEBHOOK_URL="https://n8n-clickup-oauth-proxy.vercel.app/" | |
| ENV N8N_PUBLIC_WEBHOOK_URL="https://n8n-clickup-oauth-proxy.vercel.app/" | |
| ENV WEBHOOK_URL="https://n8n-clickup-oauth-proxy.vercel.app/" | |
| ENV N8N_SEC_EMBEDDER_HEADER_ALLOW_FROM_REGEX="^https?:\\/\\/([a-zA-Z0-9\\-]+\\.)*hf\\.space$" | |
| ENV N8N_SEC_ALLOW_ALL_ORIGINS_FOR_WEBHOOKS="true" | |
| ENV N8N_RUNNERS_ENABLED="true" | |
| # Copy startup script | |
| COPY start.sh /start.sh | |
| RUN chmod +x /start.sh | |
| # Expose n8n port | |
| EXPOSE 5678 | |
| EXPOSE 11434 | |
| EXPOSE 6333 | |
| EXPOSE 5432 | |
| RUN mkdir -p /data/.n8n /data/postgres /data/qdrant_storage /data/.ollama && chown -R n8nuser:n8nuser /data | |
| USER n8nuser | |
| ENTRYPOINT ["/start.sh"] |