mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-25 07:00:48 +09:00
script: remove cn mirror notice
This commit is contained in:
@@ -19,10 +19,11 @@ curl -fsSL https://memoh.sh | sudo sh
|
|||||||
The script will:
|
The script will:
|
||||||
|
|
||||||
1. Check for Docker and Docker Compose
|
1. Check for Docker and Docker Compose
|
||||||
2. Prompt for configuration (workspace, data directory, admin credentials, JWT secret, Postgres password, China mirror)
|
2. Prompt for configuration (workspace, data directory, admin credentials, JWT secret, Postgres password)
|
||||||
3. Clone the repository
|
3. Fetch the latest release tag from GitHub and clone the repository
|
||||||
4. Generate `config.toml` from the Docker template with your settings
|
4. Generate `config.toml` from the Docker template with your settings
|
||||||
5. Pull images and start all services
|
5. Pin Docker image versions to the release
|
||||||
|
6. Pull images and start all services
|
||||||
|
|
||||||
**Silent install** (use all defaults, no prompts):
|
**Silent install** (use all defaults, no prompts):
|
||||||
|
|
||||||
@@ -38,6 +39,20 @@ Defaults when running silently:
|
|||||||
- JWT secret: auto-generated
|
- JWT secret: auto-generated
|
||||||
- Postgres password: `memoh123`
|
- Postgres password: `memoh123`
|
||||||
|
|
||||||
|
**Install a specific version:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
MEMOH_VERSION=v1.0.0 curl -fsSL https://memoh.sh | sudo sh
|
||||||
|
```
|
||||||
|
|
||||||
|
**Use China mainland mirror** (for slow image pulls):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
USE_CN_MIRROR=true curl -fsSL https://memoh.sh | sudo sh
|
||||||
|
```
|
||||||
|
|
||||||
|
> Environment variables can be combined, e.g. `MEMOH_VERSION=v1.0.0 USE_CN_MIRROR=true curl -fsSL https://memoh.sh | sudo sh`
|
||||||
|
|
||||||
## Manual Install
|
## Manual Install
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -77,17 +92,18 @@ And use the China mirror compose overlay:
|
|||||||
sudo docker compose -f docker-compose.yml -f docker/docker-compose.cn.yml up -d
|
sudo docker compose -f docker-compose.yml -f docker/docker-compose.cn.yml up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
The install script handles this automatically when you answer "yes" to the China mirror prompt.
|
The install script handles this automatically when you set `USE_CN_MIRROR=true`.
|
||||||
|
|
||||||
## Access Points
|
## Access Points
|
||||||
|
|
||||||
After startup:
|
After startup:
|
||||||
|
|
||||||
| Service | URL |
|
| Service | URL |
|
||||||
|---------------|------------------------|
|
|-----------------|------------------------|
|
||||||
| Web UI | http://localhost:8082 |
|
| Web UI | http://localhost:8082 |
|
||||||
| API | http://localhost:8080 |
|
| API | http://localhost:8080 |
|
||||||
| Agent Gateway | http://localhost:8081 |
|
| Agent Gateway | http://localhost:8081 |
|
||||||
|
| Browser Gateway | http://localhost:8083 |
|
||||||
|
|
||||||
Default login: `admin` / `admin123` (change this in `config.toml`).
|
Default login: `admin` / `admin123` (change this in `config.toml`).
|
||||||
|
|
||||||
@@ -105,6 +121,15 @@ docker compose ps # Status
|
|||||||
docker compose pull && docker compose up -d # Update to latest images
|
docker compose pull && docker compose up -d # Update to latest images
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Environment Variables
|
||||||
|
|
||||||
|
| Variable | Default | Description |
|
||||||
|
|--------------------|--------------------|----------------------------------------------|
|
||||||
|
| `POSTGRES_PASSWORD`| `memoh123` | PostgreSQL password (must match `postgres.password` in `config.toml`) |
|
||||||
|
| `MEMOH_CONFIG` | `./config.toml` | Path to the configuration file |
|
||||||
|
| `MEMOH_VERSION` | *(latest release)* | Git tag to install (e.g. `v1.0.0`). Also pins Docker image versions. |
|
||||||
|
| `USE_CN_MIRROR` | `false` | Set to `true` to use China mainland mirror for Docker images |
|
||||||
|
|
||||||
## Production Checklist
|
## Production Checklist
|
||||||
|
|
||||||
1. **Passwords** — Change all default passwords and secrets in `config.toml`
|
1. **Passwords** — Change all default passwords and secrets in `config.toml`
|
||||||
|
|||||||
+3
-11
@@ -50,9 +50,7 @@ fi
|
|||||||
echo "${GREEN}✓ Docker and Docker Compose detected${NC}"
|
echo "${GREEN}✓ Docker and Docker Compose detected${NC}"
|
||||||
|
|
||||||
# Resolve version: use MEMOH_VERSION env if set, otherwise fetch latest release
|
# Resolve version: use MEMOH_VERSION env if set, otherwise fetch latest release
|
||||||
VERSION_USER_PROVIDED=false
|
|
||||||
if [ -n "$MEMOH_VERSION" ]; then
|
if [ -n "$MEMOH_VERSION" ]; then
|
||||||
VERSION_USER_PROVIDED=true
|
|
||||||
echo "${GREEN}✓ Using specified version: ${MEMOH_VERSION}${NC}"
|
echo "${GREEN}✓ Using specified version: ${MEMOH_VERSION}${NC}"
|
||||||
else
|
else
|
||||||
fetch_latest_version() {
|
fetch_latest_version() {
|
||||||
@@ -73,8 +71,8 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Docker image tag: pin to version only when user explicitly specified MEMOH_VERSION
|
# Docker image tag: strip leading "v", fall back to "latest" only when version is unknown
|
||||||
if [ "$VERSION_USER_PROVIDED" = true ]; then
|
if [ -n "$MEMOH_VERSION" ]; then
|
||||||
MEMOH_DOCKER_VERSION=$(echo "$MEMOH_VERSION" | sed 's/^v//')
|
MEMOH_DOCKER_VERSION=$(echo "$MEMOH_VERSION" | sed 's/^v//')
|
||||||
else
|
else
|
||||||
MEMOH_DOCKER_VERSION="latest"
|
MEMOH_DOCKER_VERSION="latest"
|
||||||
@@ -99,7 +97,7 @@ JWT_SECRET="$(gen_secret)"
|
|||||||
PG_PASS="memoh123"
|
PG_PASS="memoh123"
|
||||||
WORKSPACE="$WORKSPACE_DEFAULT"
|
WORKSPACE="$WORKSPACE_DEFAULT"
|
||||||
MEMOH_DATA_DIR="$MEMOH_DATA_DIR_DEFAULT"
|
MEMOH_DATA_DIR="$MEMOH_DATA_DIR_DEFAULT"
|
||||||
USE_CN_MIRROR=false
|
USE_CN_MIRROR="${USE_CN_MIRROR:-false}"
|
||||||
|
|
||||||
if [ "$SILENT" = false ]; then
|
if [ "$SILENT" = false ]; then
|
||||||
echo "Configure Memoh (press Enter to use defaults):" > /dev/tty
|
echo "Configure Memoh (press Enter to use defaults):" > /dev/tty
|
||||||
@@ -143,12 +141,6 @@ if [ "$SILENT" = false ]; then
|
|||||||
read -r input < /dev/tty || true
|
read -r input < /dev/tty || true
|
||||||
[ -n "$input" ] && PG_PASS="$input"
|
[ -n "$input" ] && PG_PASS="$input"
|
||||||
|
|
||||||
printf " Use China mainland mirror? (y/N): " > /dev/tty
|
|
||||||
read -r input < /dev/tty || true
|
|
||||||
case "$input" in
|
|
||||||
[Yy]|[Yy][Ee][Ss]) USE_CN_MIRROR=true ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
echo "" > /dev/tty
|
echo "" > /dev/tty
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user