script: remove cn mirror notice

This commit is contained in:
Acbox
2026-03-07 19:26:08 +08:00
parent 0ca3d35fa0
commit de68022d3c
2 changed files with 37 additions and 20 deletions
+34 -9
View File
@@ -19,10 +19,11 @@ curl -fsSL https://memoh.sh | sudo sh
The script will:
1. Check for Docker and Docker Compose
2. Prompt for configuration (workspace, data directory, admin credentials, JWT secret, Postgres password, China mirror)
3. Clone the repository
2. Prompt for configuration (workspace, data directory, admin credentials, JWT secret, Postgres password)
3. Fetch the latest release tag from GitHub and clone the repository
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):
@@ -38,6 +39,20 @@ Defaults when running silently:
- JWT secret: auto-generated
- 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
```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
```
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
After startup:
| Service | URL |
|---------------|------------------------|
| Web UI | http://localhost:8082 |
| API | http://localhost:8080 |
| Agent Gateway | http://localhost:8081 |
| Service | URL |
|-----------------|------------------------|
| Web UI | http://localhost:8082 |
| API | http://localhost:8080 |
| Agent Gateway | http://localhost:8081 |
| Browser Gateway | http://localhost:8083 |
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
```
## 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
1. **Passwords** — Change all default passwords and secrets in `config.toml`
+3 -11
View File
@@ -50,9 +50,7 @@ fi
echo "${GREEN}✓ Docker and Docker Compose detected${NC}"
# Resolve version: use MEMOH_VERSION env if set, otherwise fetch latest release
VERSION_USER_PROVIDED=false
if [ -n "$MEMOH_VERSION" ]; then
VERSION_USER_PROVIDED=true
echo "${GREEN}✓ Using specified version: ${MEMOH_VERSION}${NC}"
else
fetch_latest_version() {
@@ -73,8 +71,8 @@ else
fi
fi
# Docker image tag: pin to version only when user explicitly specified MEMOH_VERSION
if [ "$VERSION_USER_PROVIDED" = true ]; then
# Docker image tag: strip leading "v", fall back to "latest" only when version is unknown
if [ -n "$MEMOH_VERSION" ]; then
MEMOH_DOCKER_VERSION=$(echo "$MEMOH_VERSION" | sed 's/^v//')
else
MEMOH_DOCKER_VERSION="latest"
@@ -99,7 +97,7 @@ JWT_SECRET="$(gen_secret)"
PG_PASS="memoh123"
WORKSPACE="$WORKSPACE_DEFAULT"
MEMOH_DATA_DIR="$MEMOH_DATA_DIR_DEFAULT"
USE_CN_MIRROR=false
USE_CN_MIRROR="${USE_CN_MIRROR:-false}"
if [ "$SILENT" = false ]; then
echo "Configure Memoh (press Enter to use defaults):" > /dev/tty
@@ -143,12 +141,6 @@ if [ "$SILENT" = false ]; then
read -r input < /dev/tty || true
[ -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
fi