mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-25 07:00:48 +09:00
chore: update install script and docs to reference main branch
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@
|
||||
## One-Click Install
|
||||
|
||||
```bash
|
||||
curl -fsSL https://raw.githubusercontent.com/memohai/Memoh/feat/containerd-in-docker/scripts/install.sh | sh
|
||||
curl -fsSL https://raw.githubusercontent.com/memohai/Memoh/main/scripts/install.sh | sh
|
||||
```
|
||||
|
||||
Or manually:
|
||||
|
||||
@@ -30,13 +30,13 @@ Memoh is a AI agent system platform. Users can create their own AI bots and chat
|
||||
One-click install (requires Docker):
|
||||
|
||||
```bash
|
||||
curl -fsSL https://raw.githubusercontent.com/memohai/Memoh/feat/containerd-in-docker/scripts/install.sh | sh
|
||||
curl -fsSL https://raw.githubusercontent.com/memohai/Memoh/main/scripts/install.sh | sh
|
||||
```
|
||||
|
||||
Or manually:
|
||||
|
||||
```bash
|
||||
git clone -b feat/containerd-in-docker --depth 1 https://github.com/memohai/Memoh.git
|
||||
git clone --depth 1 https://github.com/memohai/Memoh.git
|
||||
cd Memoh
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
+41
-8
@@ -7,7 +7,7 @@ RED='\033[0;31m'
|
||||
NC='\033[0m'
|
||||
|
||||
REPO="https://github.com/memohai/Memoh.git"
|
||||
BRANCH="feat/containerd-in-docker"
|
||||
BRANCH="main"
|
||||
DIR="Memoh"
|
||||
SILENT=false
|
||||
|
||||
@@ -51,16 +51,42 @@ gen_secret() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Configuration defaults
|
||||
# Configuration defaults (expand ~ for paths)
|
||||
WORKSPACE_DEFAULT="${HOME:-/tmp}/memoh"
|
||||
MEMOH_DATA_DIR_DEFAULT="${HOME:-/tmp}/memoh/data"
|
||||
ADMIN_USER="admin"
|
||||
ADMIN_PASS="admin123"
|
||||
JWT_SECRET="$(gen_secret)"
|
||||
PG_PASS="memoh123"
|
||||
WORKSPACE="$WORKSPACE_DEFAULT"
|
||||
MEMOH_DATA_DIR="$MEMOH_DATA_DIR_DEFAULT"
|
||||
|
||||
if [ "$SILENT" = false ]; then
|
||||
echo "Configure Memoh (press Enter to use defaults):" > /dev/tty
|
||||
echo "" > /dev/tty
|
||||
|
||||
printf " Workspace (install and clone here) [%s]: " "~/memoh" > /dev/tty
|
||||
read -r input < /dev/tty || true
|
||||
if [ -n "$input" ]; then
|
||||
case "$input" in
|
||||
~) WORKSPACE="${HOME:-/tmp}" ;;
|
||||
~/*) WORKSPACE="${HOME:-/tmp}${input#\~}" ;;
|
||||
*) WORKSPACE="$input" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
printf " Data directory (bind mount for containerd/memoh data) [%s]: " "$WORKSPACE/data" > /dev/tty
|
||||
read -r input < /dev/tty || true
|
||||
if [ -n "$input" ]; then
|
||||
case "$input" in
|
||||
~) MEMOH_DATA_DIR="${HOME:-/tmp}" ;;
|
||||
~/*) MEMOH_DATA_DIR="${HOME:-/tmp}${input#\~}" ;;
|
||||
*) MEMOH_DATA_DIR="$input" ;;
|
||||
esac
|
||||
else
|
||||
MEMOH_DATA_DIR="$WORKSPACE/data"
|
||||
fi
|
||||
|
||||
printf " Admin username [%s]: " "$ADMIN_USER" > /dev/tty
|
||||
read -r input < /dev/tty || true
|
||||
[ -n "$input" ] && ADMIN_USER="$input"
|
||||
@@ -80,13 +106,17 @@ if [ "$SILENT" = false ]; then
|
||||
echo "" > /dev/tty
|
||||
fi
|
||||
|
||||
# Enter workspace (all operations run here)
|
||||
mkdir -p "$WORKSPACE"
|
||||
cd "$WORKSPACE"
|
||||
|
||||
# Clone or update
|
||||
if [ -d "$DIR" ]; then
|
||||
echo "Updating existing installation..."
|
||||
echo "Updating existing installation in $WORKSPACE..."
|
||||
cd "$DIR"
|
||||
git pull --ff-only 2>/dev/null || true
|
||||
else
|
||||
echo "Cloning Memoh..."
|
||||
echo "Cloning Memoh into $WORKSPACE..."
|
||||
git clone --depth 1 -b "$BRANCH" "$REPO" "$DIR"
|
||||
cd "$DIR"
|
||||
fi
|
||||
@@ -100,8 +130,11 @@ sed -i.bak "s|password = \"memoh123\"|password = \"${PG_PASS}\"|" config.toml
|
||||
export POSTGRES_PASSWORD="${PG_PASS}"
|
||||
rm -f config.toml.bak
|
||||
|
||||
# Use generated config
|
||||
# Use generated config and data dir
|
||||
INSTALL_DIR="$(pwd)"
|
||||
export MEMOH_CONFIG=./config.toml
|
||||
export MEMOH_DATA_DIR
|
||||
mkdir -p "$MEMOH_DATA_DIR"
|
||||
|
||||
echo ""
|
||||
echo "${GREEN}Starting services (first build may take a few minutes)...${NC}"
|
||||
@@ -119,8 +152,8 @@ echo ""
|
||||
echo " Admin login: ${ADMIN_USER} / ${ADMIN_PASS}"
|
||||
echo ""
|
||||
echo "Commands:"
|
||||
echo " cd ${DIR} && docker compose ps # Status"
|
||||
echo " cd ${DIR} && docker compose logs -f # Logs"
|
||||
echo " cd ${DIR} && docker compose down # Stop"
|
||||
echo " cd ${INSTALL_DIR} && docker compose ps # Status"
|
||||
echo " cd ${INSTALL_DIR} && docker compose logs -f # Logs"
|
||||
echo " cd ${INSTALL_DIR} && docker compose down # Stop"
|
||||
echo ""
|
||||
echo "${YELLOW}First startup may take 1-2 minutes, please be patient.${NC}"
|
||||
|
||||
Reference in New Issue
Block a user