add initial docker compose setup

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-02-23 15:08:06 +01:00
parent 57530c0b58
commit 9f6b8651f4
2 changed files with 79 additions and 0 deletions

3
.env Normal file
View File

@@ -0,0 +1,3 @@
POSTGRES_USER=root
POSTGRES_PASSWORD=password
POSTGRES_DB=n8n

76
docker-compose.yml Normal file
View 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