Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,15 @@ services:
MYSQL_USER: loopforge
MYSQL_PASSWORD: ${LOOPFORGE_DB_PASSWORD:?Run scripts/configure.sh first}
MYSQL_ROOT_PASSWORD: ${LOOPFORGE_DB_ROOT_PASSWORD:?Run scripts/configure.sh first}
command: ["--character-set-server=utf8mb4", "--collation-server=utf8mb4_unicode_ci"]
# The platform keeps writing checkpoint, telemetry and log rows, and every
# write is logged; bound the binary log so a runaway writer cannot fill the
# data volume. Raise or drop these flags when point-in-time recovery or
# replication is required.
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
- --binlog-expire-logs-seconds=86400
- --max-binlog-size=67108864
ports:
- "127.0.0.1:${LOOPFORGE_MYSQL_PORT:-33315}:3306"
volumes:
Expand Down
7 changes: 7 additions & 0 deletions docs/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ Run it as the installation owner, including an ordinary Linux user. If that user

`compose.yaml` is the published-image stack and never builds: `./start.sh`, `scripts/install.sh` and a plain `docker compose --profile platform up` all pull the GHCR release pinned there (currently `ghcr.io/tencent/loopforge:0.4.0`). The pin matches the checkout's migrations and seeds, so check out a release tag when you install. Set `LOOPFORGE_IMAGE` (for example to an `@sha256:` digest) only to override it; a value saved in `.env` takes precedence over later pin changes.

The bundled `mysql:8.4` keeps its binary log bounded: `compose.yaml` starts it with `--binlog-expire-logs-seconds=86400` and `--max-binlog-size=67108864`, so an unexpected write storm cannot fill `loopforge_mysql-data` with binary logs (the platform writes checkpoint, telemetry and log rows continuously, and every write is logged). Deployments that need point-in-time recovery or replication can raise those values or remove the two flags; single-node evaluation installations that need no recovery can pass `--skip-log-bin` to stop binary logging entirely. To reclaim logs already written by an older Compose stack, run:

```bash
docker compose exec -T mysql sh -c 'MYSQL_PWD="$MYSQL_ROOT_PASSWORD" mysql -u root -e "PURGE BINARY LOGS BEFORE NOW()"'
docker compose exec -T mysql sh -c 'MYSQL_PWD="$MYSQL_ROOT_PASSWORD" mysql -u root -e "SET PERSIST binlog_expire_logs_seconds=86400"'
```

To upgrade, update the checkout first, then refresh the containers:

```bash
Expand Down