Skip to content

Commit 06c5765

Browse files
committed
chore: maintenance
1 parent 6d9be1e commit 06c5765

3 files changed

Lines changed: 31 additions & 10 deletions

File tree

README.md

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
- Multi-architecture images (`linux/amd64` and `linux/arm64`)
2424
- Automated builds — new upstream Cuprate releases are detected and built every 8 hours
2525
- Healthcheck via restricted RPC endpoint
26-
- Resource limits and log rotation pre-configured
26+
- Resource limits (4 GB memory limit in Docker Compose) and log rotation pre-configured
2727
- Mainnet, testnet, and stagenet support
2828

2929
## Quick Start
@@ -77,8 +77,7 @@ Key defaults:
7777
| `network` | `"Mainnet"` | Network to sync (`Mainnet`, `Testnet`, `Stagenet`) |
7878
| `fast_sync` | `true` | Skip verification of old blocks using known hashes |
7979
| `rpc.restricted.enable` | `true` | Restricted (read-only) RPC on `0.0.0.0:18089` |
80-
| `rpc.unrestricted.enable` | `true` | Unrestricted RPC on `127.0.0.1:18081` (localhost only) |
81-
| `target_max_memory` | auto-detected | Target max memory usage in bytes (auto-detected from system RAM) |
80+
| `rpc.unrestricted.enable` | `true` | Unrestricted RPC on `127.0.0.1:18081` (container-local only by default) |
8281
| `target_max_memory` | auto-detected | Target max memory usage in bytes (auto-detected from system RAM) |
8382

8483
### Network Selection
@@ -108,6 +107,25 @@ docker compose up -d
108107

109108
Only mainnet ports are mapped by default. See `docker-compose.override.yml.example` for testnet/stagenet.
110109

110+
## CLI Options
111+
112+
`cuprated` supports several command-line flags that override config file values. These can be passed via the `command` array in `docker-compose.yml` or at the end of a `docker run` invocation:
113+
114+
| Flag | Description |
115+
|------|-------------|
116+
| `--network <mainnet\|testnet\|stagenet>` | Override the network to run on |
117+
| `--config-file <PATH>` | Specify a custom config file path |
118+
| `--dry-run` | Validate configuration and exit without starting the node |
119+
| `--generate-config` | Print the full default config file to stdout |
120+
| `--version` | Print version and build information in JSON |
121+
| `--no-fast-sync` | Disable fast sync (full verification of all past blocks) |
122+
123+
Example:
124+
125+
```bash
126+
docker run --rm ghcr.io/hundehausen/cuprate-docker:latest --version
127+
```
128+
111129
## Building from Source
112130

113131
```bash
@@ -129,10 +147,6 @@ You can also use the compose override to build locally instead of pulling from G
129147

130148
## Troubleshooting
131149

132-
### STDIN/TTY Issue
133-
134-
cuprated requires a STDIN pipe to avoid log spam ([cuprate#396](https://github.com/Cuprate/cuprate/issues/396)). When using `docker run`, always include the `-t -i` flags. The docker-compose configuration handles this automatically with `tty: true` and `stdin_open: true`.
135-
136150
### Container Exits Immediately
137151

138152
Check the container logs:
@@ -143,6 +157,15 @@ docker logs cuprate-node
143157

144158
Common causes: invalid config file syntax, insufficient permissions on mounted volumes. Ensure `config/` and its files are readable.
145159

160+
You can validate your config before starting the container:
161+
162+
```bash
163+
docker run --rm \
164+
-v ./config:/home/cuprate/.config/cuprate:ro \
165+
ghcr.io/hundehausen/cuprate-docker:latest \
166+
--config-file /home/cuprate/.config/cuprate/Cuprated.toml --dry-run
167+
```
168+
146169
### Slow Initial Sync
147170

148171
The initial blockchain sync takes a significant amount of time depending on hardware and network. With `fast_sync = true` (the default), block verification is accelerated by comparing against known hashes. Monitor progress:

config/Cuprated.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ port = "Default"
475475
##
476476
## Type | boolean
477477
## Examples | true, false
478-
enable = false
478+
enable = true
479479
## If a request is above this byte limit, it will be rejected.
480480
##
481481
## Setting this to `0` will disable the limit.

docker-compose.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ services:
33
image: ghcr.io/hundehausen/cuprate-docker:latest
44
container_name: cuprate-node
55
restart: unless-stopped
6-
tty: true
7-
stdin_open: true
86
ports:
97
# P2P ports
108
- "18080:18080" # mainnet

0 commit comments

Comments
 (0)