mirror of
https://github.com/n8n-io/self-hosted-ai-starter-kit.git
synced 2025-11-29 00:23:13 +00:00
add initial docker compose setup
This commit is contained in:
3
.env
Normal file
3
.env
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
POSTGRES_USER=root
|
||||||
|
POSTGRES_PASSWORD=password
|
||||||
|
POSTGRES_DB=n8n
|
||||||
76
docker-compose.yml
Normal file
76
docker-compose.yml
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
version: '3.8'
|
||||||
|
volumes:
|
||||||
|
n8n_storage:
|
||||||
|
postgres_storage:
|
||||||
|
ollama_storage:
|
||||||
|
qdrant_storage:
|
||||||
|
|
||||||
|
networks:
|
||||||
|
n8n:
|
||||||
|
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:16-alpine
|
||||||
|
container_name: postgres
|
||||||
|
networks: ['n8n']
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
- POSTGRES_USER
|
||||||
|
- POSTGRES_PASSWORD
|
||||||
|
- POSTGRES_DB
|
||||||
|
volumes:
|
||||||
|
- postgres_storage:/var/lib/postgresql/data
|
||||||
|
ports:
|
||||||
|
- 5432:5432
|
||||||
|
healthcheck:
|
||||||
|
test: ['CMD-SHELL', 'pg_isready -h localhost -U ${POSTGRES_USER} -d ${POSTGRES_DB}']
|
||||||
|
interval: 5s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 10
|
||||||
|
|
||||||
|
n8n:
|
||||||
|
image: n8nio/n8n:latest
|
||||||
|
container_name: n8n
|
||||||
|
networks: ['n8n']
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
- DB_TYPE=postgresdb
|
||||||
|
- DB_POSTGRESDB_HOST=postgres
|
||||||
|
- DB_POSTGRESDB_USER=${POSTGRES_USER}
|
||||||
|
- DB_POSTGRESDB_PASSWORD=${POSTGRES_DB}
|
||||||
|
ports:
|
||||||
|
- 5678:5678
|
||||||
|
links:
|
||||||
|
- postgres
|
||||||
|
volumes:
|
||||||
|
- n8n_storage:/home/node/.n8n
|
||||||
|
depends_on:
|
||||||
|
postgres:
|
||||||
|
condition: service_healthy
|
||||||
|
|
||||||
|
ollama:
|
||||||
|
image: ollama/ollama:latest
|
||||||
|
container_name: ollama
|
||||||
|
networks: ['n8n']
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- 11434:11434
|
||||||
|
volumes:
|
||||||
|
- ollama_storage:/root/.ollama
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
reservations:
|
||||||
|
devices:
|
||||||
|
- driver: nvidia
|
||||||
|
count: 1
|
||||||
|
capabilities: [gpu]
|
||||||
|
|
||||||
|
qdrant:
|
||||||
|
image: qdrant/qdrant
|
||||||
|
container_name: qdrant
|
||||||
|
networks: ['n8n']
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- 6333:6333
|
||||||
|
volumes:
|
||||||
|
- qdrant_storage:/qdrant/storage
|
||||||
Reference in New Issue
Block a user