- Rebase dev/1.0.0 on latest upstream main (drop Muse relay code) - Preserve: troubleshooting records, remote layout, Docker deploy workflow - Simplify docker-compose.yml to app-only (external PG/Redis) - Add ops/remote/ host documentation - Update .env.example with host/docker connection profiles
64 lines
1.7 KiB
Markdown
64 lines
1.7 KiB
Markdown
# Remote Host AGENT — minione-ubuntu-infra-4c16g120g
|
|
|
|
## Host Identity
|
|
|
|
- Host name: `minione-ubuntu-infra`
|
|
- Tailscale IP: `100.64.0.8`
|
|
- LAN IP: `192.168.1.3`
|
|
- Access profile: `个人-minione-ubuntu-infra-4c16g120g`
|
|
|
|
## Runtime Topology
|
|
|
|
- `new-api` runs as a host `systemd` process
|
|
- `gitea` runs in Docker Compose under `/opt/gitea`
|
|
- PostgreSQL and Redis run as shared Docker infrastructure
|
|
- Shared Docker network: `infra-shared`
|
|
|
|
## Shared Infrastructure
|
|
|
|
### PostgreSQL
|
|
|
|
- Container name: `infra-postgres`
|
|
- Host port: `127.0.0.1:5433`
|
|
- Docker alias: `infra-postgres:5432`
|
|
- Databases:
|
|
- `new-api`
|
|
- `gitea`
|
|
- Data path: `/srv/infra/postgres/data`
|
|
- Backup path: `/srv/infra/postgres/backup`
|
|
|
|
### Redis
|
|
|
|
- Container name: `infra-redis`
|
|
- Host port: `127.0.0.1:6379`
|
|
- Docker alias: `infra-redis:6379`
|
|
- Data path: `/srv/infra/redis/data`
|
|
|
|
## new-api
|
|
|
|
- Service name: `new-api`
|
|
- Deploy path: `/root/new-api-deploy`
|
|
- Runtime env: `/root/new-api-deploy/.env.runtime`
|
|
- systemd unit: `/etc/systemd/system/new-api.service`
|
|
- Health check: `curl --noproxy '*' http://127.0.0.1:3000/api/status`
|
|
|
|
Host-process connection profile:
|
|
|
|
- `SQL_DSN=postgresql://root:<password>@127.0.0.1:5433/new-api`
|
|
- `REDIS_CONN_STRING=redis://:<password>@127.0.0.1:6379/0`
|
|
|
|
## gitea
|
|
|
|
- Compose path: `/opt/gitea/docker-compose.yml`
|
|
- Config path: `/opt/gitea/data/gitea/conf/app.ini`
|
|
- Web: `http://100.64.0.8:3001/`
|
|
- SSH: `ssh -p 2222 git@100.64.0.8`
|
|
- Database host: `infra-postgres:5432`
|
|
|
|
## Routine Checks
|
|
|
|
- `systemctl status new-api`
|
|
- `journalctl -u new-api -n 200 --no-pager`
|
|
- `docker ps --format '{{.Names}} | {{.Image}} | {{.Ports}}'`
|
|
- `ss -lntp | egrep ':3000|:3001|:2222|:5433|:6379'`
|