Merge pull request #63 from dykstranet/master

readme: add docker-compose.yml example
This commit is contained in:
nolim1t - f6287b82CC84bcbd 2022-10-29 13:23:44 +07:00 committed by GitHub
commit c75ca969e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -151,6 +151,29 @@ docker exec -it bitcoind bitcoin-cli -getinfo
docker exec -it bitcoind bitcoin-cli getblockcount
```
### Docker Compose
Here is a docker-compose.yml for mainnet
```yaml
version: '3'
services:
bitcoin:
container_name: bitcoind
# wildcard user 0:0 to avoid permission problems
user: 0:0
image: lncm/bitcoind:v22.0
volumes:
- ${PWD}/bitcoin:/data/.bitcoin
restart: on-failure
stop_grace_period: 15m30s
ports:
- "8333:8333"
- "8332:8332"
- "28332:28332"
- "28333:28333"
```
First, ensure that the `bitcoin/` folder is in the directory containing docker-compose.yml.
Then, Docker Compose will mount the `bitcoin/` folder to `/data/.bitcoin`.
#### Troubleshooting
##### Bitcoind isn't starting