You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: coffee_ws/src/sui_indexer/README.md
+14-4Lines changed: 14 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,9 +8,11 @@ The Sui Indexer node monitors and indexes events from a specified Sui package. I
8
8
9
9
## Database Location
10
10
11
-
For development, the SQLite database is stored in the package source directory as `sui_indexer.db`.
11
+
**Development:** The SQLite database is stored in the workspace data directory at `<workspace_root>/data/sui_indexer/sui_indexer.db`. This ensures the database persists across `colcon build` cycles and is not affected by install directory changes.
12
12
13
-
For production deployments, you should specify an absolute path using the `database_url` parameter to ensure proper data persistence and access permissions.
13
+
**Production:** You can specify an absolute path using the `database_url` parameter to ensure proper data persistence and access permissions for production deployments.
14
+
15
+
**Important:** The database location has been moved out of the install directory to prevent data loss during builds. The Prisma client is also generated locally within the workspace to avoid virtual environment pollution.
14
16
15
17
## Usage
16
18
@@ -37,7 +39,7 @@ The following parameters can be configured when launching the indexer:
37
39
-`network` (Optional, default: 'testnet'): Sui network to connect to (testnet, mainnet, devnet)
38
40
-`polling_interval_ms` (Optional, default: 1000): Polling interval in milliseconds
39
41
-`default_limit` (Optional, default: 50): Default limit for event queries
40
-
-`database_url` (Optional, default: 'file:sui_indexer.db'): Database URL for the indexer. For production, use an absolute path (e.g., 'file:/var/lib/sui_indexer/sui_indexer.db')
42
+
-`database_url` (Optional, default: workspace data directory): Database URL for the indexer. When not specified, defaults to `<workspace_root>/data/sui_indexer/sui_indexer.db`. For production, use an absolute path (e.g., 'file:/var/lib/sui_indexer/sui_indexer.db')
0 commit comments