commit 230a3a4855f5d6de28e319d97497c7432f8c167e Author: Brian Fertig Date: Tue Jul 1 12:55:39 2025 -0600 Initial Commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7fefc34 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/files/ +/config/mcpo/config.json +/.env \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..268d656 --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +# Local AI and Automation Docker Suite + +## Docker Compose Contains + +- Ollama (LLM Host) +- Open WebUI (Chat Interface) +- MCPO Server (Model Context Protocol relay server) +- N8N (Automation) +- PostgresDB (for N8N) +- Jupyter Notebook + +## Install Instructions + +1. Copy ```sample.env``` to ```.env``` +2. Edit ```.env``` file to contain your ultimate secret passwords +3. Copy ```config/mcpo/sample.config.json``` to ```config/mcpo/config.json``` +4. Note -- there is no need to edit the config.json file right away +5. From the root directory (of this repo) run ```docker compose up -d``` +6. If you experience any errors, run it again until it stands completely up \ No newline at end of file diff --git a/config/mcpo/sample.config.json b/config/mcpo/sample.config.json new file mode 100644 index 0000000..5a32764 --- /dev/null +++ b/config/mcpo/sample.config.json @@ -0,0 +1,8 @@ +{ + "mcpServers": { + "time": { + "command": "uvx", + "args": ["mcp-server-time", "--local-timezone=America/Denver"] + } + } +} \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..c45933e --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,102 @@ +services: + ollama: + volumes: + - ./files/ollama:/root/.ollama + container_name: ollama + pull_policy: always + tty: true + restart: unless-stopped + image: ollama/ollama:latest + ports: + - '11434:11434' + open-webui: + image: 'ghcr.io/open-webui/open-webui:main' + restart: always + container_name: open-webui + volumes: + - './files/open-webui:/app/backend/data' + depends_on: + - ollama + environment: + - OLLAMA_BASE_URL=http://ollama:11434 + - WEBUI_NAME=BioGPT + - ENABLE_CODE_INTERPRETER=True + - CODE_INTERPRETER_ENGINE=jupyter + - CODE_INTERPRETER_JUPYTER_URL=http://jupyer:8888 + - CODE_INTERPRETER_JUPYTER_AUTH=token + - CODE_INTERPRETER_JUPYTER_AUTH_TOKEN=${JUPYTER_TOKEN} + ports: + - '8080:8080' + # open-webui-pipelines: + # image: 'ghcr.io/open-webui/pipelines:main' + # restart: always + # container_name: pipelines + # volumes: + # - './files/pipelines:/app/pipelines' + # extra_hosts: + # - 'host.docker.internal:host-gateway' + # ports: + # - '9099:9099' + mcposerver: + command: ["--config", "/app/conf/config.json"] + #env_file: env/mcposerver.env + image: ghcr.io/open-webui/mcpo:latest + restart: unless-stopped + volumes: + - ./config/mcpo:/app/conf:ro + extra_hosts: + - 'host.docker.internal:host-gateway' + ports: + - '8000:8000' + depends_on: + - n8n + postgres: + image: postgres:16 + restart: always + environment: + - POSTGRES_USER + - POSTGRES_PASSWORD + - POSTGRES_DB + - POSTGRES_NON_ROOT_USER + - POSTGRES_NON_ROOT_PASSWORD + volumes: + - ./files/postgres_storage:/var/lib/postgresql/data + - ./files/init-data.sh:/docker-entrypoint-initdb.d/init-data.sh + ports: + - 5434:5432 + healthcheck: + test: ['CMD-SHELL', 'pg_isready -h localhost -U ${POSTGRES_USER} -d ${POSTGRES_DB}'] + interval: 5s + timeout: 5s + retries: 10 + n8n: + image: docker.n8n.io/n8nio/n8n + restart: always + environment: + - DB_TYPE=postgresdb + - DB_POSTGRESDB_HOST=postgres + - DB_POSTGRESDB_PORT=5432 + - DB_POSTGRESDB_DATABASE=${POSTGRES_DB} + - DB_POSTGRESDB_USER=${POSTGRES_USER} + - DB_POSTGRESDB_PASSWORD=${POSTGRES_PASSWORD} + - WEBHOOK_URL=http://n8n + - GENERIC_TIMEZONE=${TIMEZONE} + ports: + - 5678:5678 + links: + - postgres + volumes: + - ./files/n8n_storage:/home/node/.n8n + - ./files/n8n_data:/data + depends_on: + postgres: + condition: service_healthy + jupyter: + image: jupyter/datascience-notebook:latest + ports: + - "8910:8888" + volumes: + - ./files/notebooks:/home/jovyan/work + environment: + - JUPYTER_TOKEN=${JUPYTER_TOKEN} + diff --git a/sample.env b/sample.env new file mode 100644 index 0000000..c3963bd --- /dev/null +++ b/sample.env @@ -0,0 +1,10 @@ +POSTGRES_USER=postUser +POSTGRES_PASSWORD=SUPERSECRETPASSWORD +POSTGRES_DB=n8n + +POSTGRES_NON_ROOT_USER=postNon +POSTGRES_NON_ROOT_PASSWORD=A-DIFFERENT-PASSWORD + +TIMEZONE='America/Denver' + +JUPYTER_TOKEN=YET-ANOTHER-PASSWORD \ No newline at end of file