Spaces:
Sleeping
Sleeping
Upload 2 files
Browse files- Dockerfile +1 -1
- docker-compose.yml +59 -0
Dockerfile
CHANGED
|
@@ -27,7 +27,7 @@ ARG DB_POSTGRESDB_DATABASE=$DB_POSTGRESDB_DATABASE
|
|
| 27 |
ARG DB_POSTGRESDB_PORT=$DB_POSTGRESDB_PORT
|
| 28 |
ARG DB_POSTGRESDB_USER=$DB_POSTGRESDB_USER
|
| 29 |
ARG DB_POSTGRESDB_PASSWORD=$DB_POSTGRESDB_PASSWORD
|
| 30 |
-
|
| 31 |
# Install system dependencies
|
| 32 |
RUN apk add --no-cache \
|
| 33 |
git \
|
|
|
|
| 27 |
ARG DB_POSTGRESDB_PORT=$DB_POSTGRESDB_PORT
|
| 28 |
ARG DB_POSTGRESDB_USER=$DB_POSTGRESDB_USER
|
| 29 |
ARG DB_POSTGRESDB_PASSWORD=$DB_POSTGRESDB_PASSWORD
|
| 30 |
+
ARG DB_POSTGRESDB_SSL=true
|
| 31 |
# Install system dependencies
|
| 32 |
RUN apk add --no-cache \
|
| 33 |
git \
|
docker-compose.yml
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
services:
|
| 2 |
+
n8n:
|
| 3 |
+
# UPDATED: Use a recent, stable version of n8n
|
| 4 |
+
image: n8nio/n8n:1.108.0
|
| 5 |
+
container_name: N8N-Infrastructure
|
| 6 |
+
restart: unless-stopped
|
| 7 |
+
env_file:
|
| 8 |
+
- ./config/.env
|
| 9 |
+
ports:
|
| 10 |
+
# The host port (left) can be changed; container port remains n8n's default (5678)
|
| 11 |
+
- "${N8N_PORT_LOCAL:-5678}:5678"
|
| 12 |
+
environment:
|
| 13 |
+
# --- Database Settings ---
|
| 14 |
+
# All sensitive DB credentials (HOST, DB, USER, PASS) should be in .env
|
| 15 |
+
- DB_POSTGRESDB_SSL=${DB_POSTGRESDB_SSL:-true}
|
| 16 |
+
# Align with Supabase pooler default (6543) unless overridden
|
| 17 |
+
- DB_POSTGRESDB_PORT=${DB_POSTGRESDB_PORT:-6543}
|
| 18 |
+
- DB_POSTGRESDB_SSL_REJECT_UNAUTHORIZED=${DB_POSTGRESDB_SSL_REJECT_UNAUTHORIZED:-false}
|
| 19 |
+
|
| 20 |
+
# --- Community Nodes ---
|
| 21 |
+
# FIXED: Correctly formatted as a comma-separated string
|
| 22 |
+
- N8N_ENABLE_COMMUNITY_NODES=${N8N_ENABLE_COMMUNITY_NODES:-true}
|
| 23 |
+
- N8N_COMMUNITY_PACKAGES=${N8N_COMMUNITY_PACKAGES:-n8n-nodes-langchain,n8n-nodes-google,n8n-nodes-vertexai}
|
| 24 |
+
|
| 25 |
+
# --- n8n Core Settings ---
|
| 26 |
+
# These are read from the .env file, with sane defaults for local dev.
|
| 27 |
+
- N8N_HOST=${N8N_HOST:-localhost}
|
| 28 |
+
- N8N_PORT=${N8N_PORT:-5678}
|
| 29 |
+
- N8N_PROTOCOL=${N8N_PROTOCOL:-http}
|
| 30 |
+
# FIXED: Webhook URL now dynamically points to the local instance
|
| 31 |
+
- WEBHOOK_URL=${WEBHOOK_URL:-http://localhost:${N8N_PORT_LOCAL:-5678}}
|
| 32 |
+
|
| 33 |
+
volumes:
|
| 34 |
+
# Persists n8n data between restarts
|
| 35 |
+
- n8n_data:/home/node/.n8n
|
| 36 |
+
# Mount local directories for workflow and knowledge base development
|
| 37 |
+
- ./workflows:/data/workflows:rw
|
| 38 |
+
- ./knowledge:/data/knowledge:rw
|
| 39 |
+
healthcheck:
|
| 40 |
+
# Healthcheck now correctly points to the internal n8n port
|
| 41 |
+
test: ["CMD", "curl", "-fsS", "http://localhost:5678/healthz"]
|
| 42 |
+
interval: 30s
|
| 43 |
+
timeout: 10s
|
| 44 |
+
retries: 5
|
| 45 |
+
|
| 46 |
+
# Optional vector DB for local development
|
| 47 |
+
qdrant:
|
| 48 |
+
# UPDATED: Use a recent, stable version of Qdrant
|
| 49 |
+
image: qdrant/qdrant:v1.10.1
|
| 50 |
+
container_name: qdrant
|
| 51 |
+
restart: unless-stopped
|
| 52 |
+
ports:
|
| 53 |
+
- "6543:6543"
|
| 54 |
+
volumes:
|
| 55 |
+
- qdrant_data:/qdrant/storage
|
| 56 |
+
|
| 57 |
+
volumes:
|
| 58 |
+
n8n_data:
|
| 59 |
+
qdrant_data:
|