Add Dalidou storage foundation and deployment prep

This commit is contained in:
2026-04-05 18:33:52 -04:00
parent b0889b3925
commit 6bfa1fcc37
19 changed files with 679 additions and 8 deletions

View File

@@ -0,0 +1,77 @@
# Dalidou Deployment
## Purpose
Deploy AtoCore on Dalidou as the canonical runtime and machine-memory host.
## Model
- Dalidou hosts the canonical AtoCore service.
- OpenClaw on the T420 consumes AtoCore over network/Tailscale API.
- `sources/vault` and `sources/drive` are read-only inputs by convention.
- SQLite/Chroma machine state stays on Dalidou and is not treated as a sync peer.
## Directory layout
```text
/srv/storage/atocore/
app/ # deployed repo checkout
data/
db/
chroma/
cache/
tmp/
sources/
vault/
drive/
logs/
backups/
run/
```
## Compose workflow
The compose definition lives in:
```text
deploy/dalidou/docker-compose.yml
```
The Dalidou environment file should be copied to:
```text
deploy/dalidou/.env
```
starting from:
```text
deploy/dalidou/.env.example
```
## Deployment steps
1. Place the repository under `/srv/storage/atocore/app`.
2. Create the canonical directories listed above.
3. Copy `deploy/dalidou/.env.example` to `deploy/dalidou/.env`.
4. Adjust the source paths if your AtoVault/AtoDrive mirrors live elsewhere.
5. Run:
```bash
cd /srv/storage/atocore/app/deploy/dalidou
docker compose up -d --build
```
6. Validate:
```bash
curl http://127.0.0.1:8100/health
curl http://127.0.0.1:8100/sources
```
## Deferred
- backup automation
- restore/snapshot tooling
- reverse proxy / TLS exposure
- automated source ingestion job
- OpenClaw client wiring

View File

@@ -0,0 +1,61 @@
# Dalidou Storage Migration
## Goal
Establish Dalidou as the canonical AtoCore host while keeping human-readable
source layers separate from machine operational storage.
## Canonical layout
```text
/srv/atocore/
app/ # git checkout of this repository
data/ # machine operational state
db/
atocore.db
chroma/
cache/
tmp/
sources/
vault/ # AtoVault input, read-only by convention
drive/ # AtoDrive input, read-only by convention
logs/
backups/
run/
config/
.env
```
## Environment variables
Suggested Dalidou values:
```bash
ATOCORE_ENV=production
ATOCORE_DATA_DIR=/srv/atocore/data
ATOCORE_DB_DIR=/srv/atocore/data/db
ATOCORE_CHROMA_DIR=/srv/atocore/data/chroma
ATOCORE_CACHE_DIR=/srv/atocore/data/cache
ATOCORE_TMP_DIR=/srv/atocore/data/tmp
ATOCORE_VAULT_SOURCE_DIR=/srv/atocore/sources/vault
ATOCORE_DRIVE_SOURCE_DIR=/srv/atocore/sources/drive
ATOCORE_LOG_DIR=/srv/atocore/logs
ATOCORE_BACKUP_DIR=/srv/atocore/backups
ATOCORE_RUN_DIR=/srv/atocore/run
```
## Migration notes
- Existing local installs remain backward-compatible.
- If `data/atocore.db` already exists, AtoCore continues using it.
- Fresh installs default to `data/db/atocore.db`.
- Source directories are inputs only; AtoCore should ingest from them but not
treat them as writable runtime state.
- Avoid syncing live SQLite/Chroma state between Dalidou and other machines.
Prefer one canonical running service and API access from OpenClaw.
## Deferred work
- service manager wiring
- backup/snapshot procedures
- automated source registration jobs
- OpenClaw integration