Add local monerod docker compose profile

This commit is contained in:
xmrcheckout
2026-01-09 14:33:10 +00:00
parent 39083eafb4
commit 81ce66803d
3 changed files with 54 additions and 4 deletions
+4
View File
@@ -21,6 +21,10 @@ MONERO_WALLET_RPC_USER=
MONERO_WALLET_RPC_PASSWORD= MONERO_WALLET_RPC_PASSWORD=
MONERO_WALLET_RPC_WALLET_PASSWORD= MONERO_WALLET_RPC_WALLET_PASSWORD=
MONERO_WALLET_RPC_WALLET_DIR=/wallets MONERO_WALLET_RPC_WALLET_DIR=/wallets
# Monero daemon
# - Default: uses a third-party daemon (low setup, external dependency)
# - Local: run the bundled `monerod` service and set MONERO_DAEMON_URL=http://monerod:18081
MONERO_DAEMON_URL=http://xmr-node.cakewallet.com:18081 MONERO_DAEMON_URL=http://xmr-node.cakewallet.com:18081
# UI # UI
+18 -4
View File
@@ -76,21 +76,35 @@ cp .env.example .env
- `POSTGRES_USER`, `POSTGRES_PASSWORD`, `POSTGRES_DB` - `POSTGRES_USER`, `POSTGRES_PASSWORD`, `POSTGRES_DB`
- `API_KEYS`, `API_KEY_ENCRYPTION_KEY` - `API_KEYS`, `API_KEY_ENCRYPTION_KEY`
- `SITE_URL` (public URL for the UI) - `SITE_URL` (public URL for the UI)
- Monero view-only wallet settings (`MONERO_WALLET_RPC_*`) and daemon URL - Monero view-only wallet settings (`MONERO_WALLET_RPC_*`)
- `MONERO_DAEMON_URL` if you use your own daemon - `MONERO_DAEMON_URL` (choose one of the options below)
3. Choose a wallet-rpc target and provision view-only wallets: 3. Choose a Monero daemon source:
- **Use a third-party daemon (default):**
- Leave `MONERO_DAEMON_URL` as-is (the default points at a public Monero daemon).
- **Run your own daemon via Docker Compose:**
- Set `MONERO_DAEMON_URL=http://monerod:18081`
- Start the stack with the `local-daemon` profile (see step 5)
- Note: initial sync can take a long time and uses significant disk; payment detection won’t be reliable until the daemon is synced.
4. Choose a wallet-rpc target and provision view-only wallets:
- Use the bundled wallet-rpc containers: - Use the bundled wallet-rpc containers:
- Set `MONERO_WALLET_RPC_URLS=http://wallet-rpc-reconciler-1:18083,http://wallet-rpc-reconciler-2:18083,http://wallet-rpc-reconciler-3:18083` - Set `MONERO_WALLET_RPC_URLS=http://wallet-rpc-reconciler-1:18083,http://wallet-rpc-reconciler-2:18083,http://wallet-rpc-reconciler-3:18083`
- Or point to an external wallet-rpc service: - Or point to an external wallet-rpc service:
- Set `MONERO_WALLET_RPC_URLS`, `MONERO_WALLET_RPC_USER`, `MONERO_WALLET_RPC_PASSWORD`, and `MONERO_WALLET_RPC_WALLET_PASSWORD` - Set `MONERO_WALLET_RPC_URLS`, `MONERO_WALLET_RPC_USER`, `MONERO_WALLET_RPC_PASSWORD`, and `MONERO_WALLET_RPC_WALLET_PASSWORD`
4. Start the stack: 5. Start the stack:
``` ```
docker compose up --build -d docker compose up --build -d
``` ```
If you’re running the bundled `monerod` service:
```
docker compose --profile local-daemon up --build -d
```
### Optional: donations (disabled by default) ### Optional: donations (disabled by default)
Donation endpoints and UI are off by default for self-hosted deployments. Donation endpoints and UI are off by default for self-hosted deployments.
+32
View File
@@ -64,6 +64,37 @@ services:
db: db:
condition: service_healthy condition: service_healthy
restart: on-failure restart: on-failure
monerod:
build:
context: ./docker/monero
args:
MONERO_VERSION: ${MONERO_VERSION:-0.18.4.4}
image: monero-local:${MONERO_VERSION:-0.18.4.4}
entrypoint: ["monerod"]
command:
[
"--non-interactive",
"--rpc-bind-ip",
"0.0.0.0",
"--rpc-bind-port",
"18081",
"--confirm-external-bind",
"--prune-blockchain",
"--data-dir",
"/data",
"--log-level",
"0"
]
volumes:
- monerod_data:/data
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://127.0.0.1:18081/get_height >/dev/null || exit 1"]
interval: 30s
timeout: 5s
retries: 10
start_period: 60s
restart: on-failure
profiles: ["local-daemon"]
wallet-rpc-reconciler-1: wallet-rpc-reconciler-1:
build: build:
context: ./docker/monero context: ./docker/monero
@@ -187,3 +218,4 @@ services:
retries: 10 retries: 10
volumes: volumes:
postgres_data: postgres_data:
monerod_data: