Files
Memoh/assets/installation_docker.md.xaCmXfCQ.js
T
2026-02-15 13:21:05 +00:00

12 lines
14 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{_ as i,o as a,c as e,ag as t}from"./chunks/framework.DEqXEGcv.js";const c=JSON.parse('{"title":"Docker Installation","description":"","frontmatter":{},"headers":[],"relativePath":"installation/docker.md","filePath":"installation/docker.md","lastUpdated":1771161622000}'),n={name:"installation/docker.md"};function l(o,s,h,r,p,d){return a(),e("div",null,[...s[0]||(s[0]=[t(`<h1 id="docker-installation" tabindex="-1">Docker Installation <a class="header-anchor" href="#docker-installation" aria-label="Permalink to &quot;Docker Installation&quot;"></a></h1><p>Docker is the recommended way to run Memoh. The stack includes PostgreSQL, Qdrant, Containerd, the main server, agent gateway, and web UI — all orchestrated via Docker Compose. You do not need to install containerd, nerdctl, or buildkit on your host; everything runs inside containers.</p><h2 id="prerequisites" tabindex="-1">Prerequisites <a class="header-anchor" href="#prerequisites" aria-label="Permalink to &quot;Prerequisites&quot;"></a></h2><ul><li><a href="https://docs.docker.com/get-docker/" target="_blank" rel="noreferrer">Docker</a></li><li><a href="https://docs.docker.com/compose/install/" target="_blank" rel="noreferrer">Docker Compose v2</a></li><li>Git</li></ul><h2 id="one-click-install" tabindex="-1">One-Click Install <a class="header-anchor" href="#one-click-install" aria-label="Permalink to &quot;One-Click Install&quot;"></a></h2><p>Run the official install script (requires Docker and Docker Compose):</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">curl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -fsSL</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> https://raw.githubusercontent.com/memohai/Memoh/main/scripts/install.sh</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> |</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> sh</span></span></code></pre></div><p>The script will:</p><ol><li>Check for Docker and Docker Compose</li><li>Prompt for configuration (workspace, data directory, admin credentials, JWT secret, Postgres password)</li><li>Clone the repository</li><li>Generate <code>config.toml</code> from the Docker template</li><li>Start all services with <code>docker compose up -d --build</code></li></ol><p><strong>Silent install</strong> (use all defaults, no prompts):</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">curl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -fsSL</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> https://raw.githubusercontent.com/memohai/Memoh/main/scripts/install.sh</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> |</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> sh</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -s</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -y</span></span></code></pre></div><p>Defaults when running silently:</p><ul><li>Workspace: <code>~/memoh</code></li><li>Data directory: <code>~/memoh/data</code></li><li>Admin: <code>admin</code> / <code>admin123</code></li><li>JWT secret: auto-generated</li><li>Postgres password: <code>memoh123</code></li></ul><h2 id="manual-install" tabindex="-1">Manual Install <a class="header-anchor" href="#manual-install" aria-label="Permalink to &quot;Manual Install&quot;"></a></h2><p>Clone the repository and start with Docker Compose:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">git</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> clone</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> https://github.com/memohai/Memoh.git</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Memoh</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> compose</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> up</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -d</span></span></code></pre></div><p>By default, Docker Compose uses <code>docker/config/config.docker.toml</code>. No config file in the project root is mounted — only this built-in config is used. See <a href="./config-toml.html">config.toml reference</a> for all configuration fields.</p><h2 id="access-points" tabindex="-1">Access Points <a class="header-anchor" href="#access-points" aria-label="Permalink to &quot;Access Points&quot;"></a></h2><p>After startup:</p><table tabindex="0"><thead><tr><th>Service</th><th>URL</th></tr></thead><tbody><tr><td>Web UI</td><td><a href="http://localhost:8082" target="_blank" rel="noreferrer">http://localhost:8082</a></td></tr><tr><td>API</td><td><a href="http://localhost:8080" target="_blank" rel="noreferrer">http://localhost:8080</a></td></tr><tr><td>Agent Gateway</td><td><a href="http://localhost:8081" target="_blank" rel="noreferrer">http://localhost:8081</a></td></tr></tbody></table><p>Default login: <code>admin</code> / <code>admin123</code></p><p>First startup may take 12 minutes while images build and services initialize.</p><h2 id="custom-configuration" tabindex="-1">Custom Configuration <a class="header-anchor" href="#custom-configuration" aria-label="Permalink to &quot;Custom Configuration&quot;"></a></h2><p>To use your own config file:</p><ol><li>Copy the Docker config template and edit it. See <a href="./config-toml.html">config.toml reference</a> for field descriptions:</li></ol><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">cp</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> docker/config/config.docker.toml</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> config.toml</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">nano</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> config.toml</span></span></code></pre></div><ol start="2"><li>Point <code>MEMOH_CONFIG</code> at your config when starting (path is on the host; run <code>docker compose</code> from the project root):</li></ol><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">MEMOH_CONFIG</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">./config.toml</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> compose</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> up</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -d</span></span></code></pre></div><p><strong>Recommended changes for production</strong> (see <a href="./config-toml.html">config.toml reference</a> for details):</p><ul><li><code>admin.password</code> — Change the admin password</li><li><code>auth.jwt_secret</code> — Generate with <code>openssl rand -base64 32</code></li><li><code>postgres.password</code> — Change the database password (and set <code>POSTGRES_PASSWORD</code> when running <code>docker compose</code>)</li></ul><h2 id="common-commands" tabindex="-1">Common Commands <a class="header-anchor" href="#common-commands" aria-label="Permalink to &quot;Common Commands&quot;"></a></h2><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> compose</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> up</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -d</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # Start</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> compose</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> down</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # Stop</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> compose</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> logs</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -f</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # View logs</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> compose</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ps</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # Status</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> compose</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> up</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -d</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --build</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # Rebuild and restart</span></span></code></pre></div><h2 id="production-checklist" tabindex="-1">Production Checklist <a class="header-anchor" href="#production-checklist" aria-label="Permalink to &quot;Production Checklist&quot;"></a></h2><ol><li><strong>HTTPS</strong> — Configure SSL (e.g. via <code>docker-compose.override.yml</code> with certs)</li><li><strong>Passwords</strong> — Change all default passwords and secrets</li><li><strong>Firewall</strong> — Restrict access to necessary ports</li><li><strong>Resource limits</strong> — Set memory/CPU limits for containers</li><li><strong>Backups</strong> — Regular backups of Postgres and Qdrant data</li></ol><h2 id="troubleshooting" tabindex="-1">Troubleshooting <a class="header-anchor" href="#troubleshooting" aria-label="Permalink to &quot;Troubleshooting&quot;"></a></h2><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> compose</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> logs</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> server</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # View main service logs</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> compose</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> logs</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> containerd</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # View containerd logs</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> compose</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> config</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # Validate configuration</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> compose</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --no-cache</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> &amp;&amp; </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> compose</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> up</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -d</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # Full rebuild</span></span></code></pre></div><h2 id="security-warnings" tabindex="-1">Security Warnings <a class="header-anchor" href="#security-warnings" aria-label="Permalink to &quot;Security Warnings&quot;"></a></h2><ul><li>The main service runs with privileged container access — only run in trusted environments</li><li>You must change all default passwords and secrets before production use</li><li>Use HTTPS in production</li></ul>`,38)])])}const g=i(n,[["render",l]]);export{c as __pageData,g as default};