Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.env
63 changes: 10 additions & 53 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,41 +17,24 @@ x-n8n: &service-n8n
- DB_POSTGRESDB_PASSWORD=${POSTGRES_PASSWORD}
- N8N_DIAGNOSTICS_ENABLED=false
- N8N_PERSONALIZATION_ENABLED=false
- N8N_ENCRYPTION_KEY
- N8N_USER_MANAGEMENT_JWT_SECRET
- N8N_ENCRYPTION_KEY=${N8N_ENCRYPTION_KEY:-}
- N8N_USER_MANAGEMENT_JWT_SECRET=${N8N_USER_MANAGEMENT_JWT_SECRET:-}
- N8N_HOST=${N8N_HOST:-}
- N8N_PROTOCOL=https
- WEBHOOK_URL=${WEBHOOK_URL:-}
- NODE_FUNCTION_ALLOW_EXTERNAL=${NODE_FUNCTION_ALLOW_EXTERNAL:-axios,node-fetch}
links:
- postgres

x-ollama: &service-ollama
image: ollama/ollama:latest
container_name: ollama
networks: ['demo']
restart: unless-stopped
ports:
- 11434:11434
volumes:
- ollama_storage:/root/.ollama

x-init-ollama: &init-ollama
image: ollama/ollama:latest
networks: ['demo']
container_name: ollama-pull-llama
volumes:
- ollama_storage:/root/.ollama
entrypoint: /bin/sh
command:
- "-c"
- "sleep 3; OLLAMA_HOST=ollama:11434 ollama pull llama3.1"

services:
postgres:
image: postgres:16-alpine
networks: ['demo']
restart: unless-stopped
environment:
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
- POSTGRES_USER=${POSTGRES_USER:-}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-}
- POSTGRES_DB={POSTGRES_DB:-}
volumes:
- postgres_storage:/var/lib/postgresql/data
healthcheck:
Expand All @@ -64,6 +47,7 @@ services:
<<: *service-n8n
container_name: n8n-import
entrypoint: /bin/sh

command:
- "-c"
- "n8n import:credentials --separate --input=/backup/credentials && n8n import:workflow --separate --input=/backup/workflows"
Expand Down Expand Up @@ -98,30 +82,3 @@ services:
- 6333:6333
volumes:
- qdrant_storage:/qdrant/storage

ollama-cpu:
profiles: ["cpu"]
<<: *service-ollama

ollama-gpu:
profiles: ["gpu-nvidia"]
<<: *service-ollama
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]

ollama-pull-llama-cpu:
profiles: ["cpu"]
<<: *init-ollama
depends_on:
- ollama-cpu

ollama-pull-llama-gpu:
profiles: ["gpu-nvidia"]
<<: *init-ollama
depends_on:
- ollama-gpu
1 change: 1 addition & 0 deletions .env → example.env
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ POSTGRES_DB=n8n

N8N_ENCRYPTION_KEY=super-secret-key
N8N_USER_MANAGEMENT_JWT_SECRET=even-more-secret
NODE_FUNCTION_ALLOW_EXTERNAL=axios,node-fetch