Skip to content

Commit de68022

Browse files
committed
script: remove cn mirror notice
1 parent 0ca3d35 commit de68022

File tree

2 files changed

+37
-20
lines changed

2 files changed

+37
-20
lines changed

docs/docs/installation/docker.md

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ curl -fsSL https://memoh.sh | sudo sh
1919
The script will:
2020

2121
1. Check for Docker and Docker Compose
22-
2. Prompt for configuration (workspace, data directory, admin credentials, JWT secret, Postgres password, China mirror)
23-
3. Clone the repository
22+
2. Prompt for configuration (workspace, data directory, admin credentials, JWT secret, Postgres password)
23+
3. Fetch the latest release tag from GitHub and clone the repository
2424
4. Generate `config.toml` from the Docker template with your settings
25-
5. Pull images and start all services
25+
5. Pin Docker image versions to the release
26+
6. Pull images and start all services
2627

2728
**Silent install** (use all defaults, no prompts):
2829

@@ -38,6 +39,20 @@ Defaults when running silently:
3839
- JWT secret: auto-generated
3940
- Postgres password: `memoh123`
4041

42+
**Install a specific version:**
43+
44+
```bash
45+
MEMOH_VERSION=v1.0.0 curl -fsSL https://memoh.sh | sudo sh
46+
```
47+
48+
**Use China mainland mirror** (for slow image pulls):
49+
50+
```bash
51+
USE_CN_MIRROR=true curl -fsSL https://memoh.sh | sudo sh
52+
```
53+
54+
> Environment variables can be combined, e.g. `MEMOH_VERSION=v1.0.0 USE_CN_MIRROR=true curl -fsSL https://memoh.sh | sudo sh`
55+
4156
## Manual Install
4257

4358
```bash
@@ -77,17 +92,18 @@ And use the China mirror compose overlay:
7792
sudo docker compose -f docker-compose.yml -f docker/docker-compose.cn.yml up -d
7893
```
7994

80-
The install script handles this automatically when you answer "yes" to the China mirror prompt.
95+
The install script handles this automatically when you set `USE_CN_MIRROR=true`.
8196

8297
## Access Points
8398

8499
After startup:
85100

86-
| Service | URL |
87-
|---------------|------------------------|
88-
| Web UI | http://localhost:8082 |
89-
| API | http://localhost:8080 |
90-
| Agent Gateway | http://localhost:8081 |
101+
| Service | URL |
102+
|-----------------|------------------------|
103+
| Web UI | http://localhost:8082 |
104+
| API | http://localhost:8080 |
105+
| Agent Gateway | http://localhost:8081 |
106+
| Browser Gateway | http://localhost:8083 |
91107

92108
Default login: `admin` / `admin123` (change this in `config.toml`).
93109

@@ -105,6 +121,15 @@ docker compose ps # Status
105121
docker compose pull && docker compose up -d # Update to latest images
106122
```
107123

124+
## Environment Variables
125+
126+
| Variable | Default | Description |
127+
|--------------------|--------------------|----------------------------------------------|
128+
| `POSTGRES_PASSWORD`| `memoh123` | PostgreSQL password (must match `postgres.password` in `config.toml`) |
129+
| `MEMOH_CONFIG` | `./config.toml` | Path to the configuration file |
130+
| `MEMOH_VERSION` | *(latest release)* | Git tag to install (e.g. `v1.0.0`). Also pins Docker image versions. |
131+
| `USE_CN_MIRROR` | `false` | Set to `true` to use China mainland mirror for Docker images |
132+
108133
## Production Checklist
109134

110135
1. **Passwords** — Change all default passwords and secrets in `config.toml`

scripts/install.sh

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,7 @@ fi
5050
echo "${GREEN}✓ Docker and Docker Compose detected${NC}"
5151

5252
# Resolve version: use MEMOH_VERSION env if set, otherwise fetch latest release
53-
VERSION_USER_PROVIDED=false
5453
if [ -n "$MEMOH_VERSION" ]; then
55-
VERSION_USER_PROVIDED=true
5654
echo "${GREEN}✓ Using specified version: ${MEMOH_VERSION}${NC}"
5755
else
5856
fetch_latest_version() {
@@ -73,8 +71,8 @@ else
7371
fi
7472
fi
7573

76-
# Docker image tag: pin to version only when user explicitly specified MEMOH_VERSION
77-
if [ "$VERSION_USER_PROVIDED" = true ]; then
74+
# Docker image tag: strip leading "v", fall back to "latest" only when version is unknown
75+
if [ -n "$MEMOH_VERSION" ]; then
7876
MEMOH_DOCKER_VERSION=$(echo "$MEMOH_VERSION" | sed 's/^v//')
7977
else
8078
MEMOH_DOCKER_VERSION="latest"
@@ -99,7 +97,7 @@ JWT_SECRET="$(gen_secret)"
9997
PG_PASS="memoh123"
10098
WORKSPACE="$WORKSPACE_DEFAULT"
10199
MEMOH_DATA_DIR="$MEMOH_DATA_DIR_DEFAULT"
102-
USE_CN_MIRROR=false
100+
USE_CN_MIRROR="${USE_CN_MIRROR:-false}"
103101

104102
if [ "$SILENT" = false ]; then
105103
echo "Configure Memoh (press Enter to use defaults):" > /dev/tty
@@ -143,12 +141,6 @@ if [ "$SILENT" = false ]; then
143141
read -r input < /dev/tty || true
144142
[ -n "$input" ] && PG_PASS="$input"
145143

146-
printf " Use China mainland mirror? (y/N): " > /dev/tty
147-
read -r input < /dev/tty || true
148-
case "$input" in
149-
[Yy]|[Yy][Ee][Ss]) USE_CN_MIRROR=true ;;
150-
esac
151-
152144
echo "" > /dev/tty
153145
fi
154146

0 commit comments

Comments
 (0)