Skip to content

Commit

Permalink
Add docker-compose for shkeeper
Browse files Browse the repository at this point in the history
  • Loading branch information
dmytro-samoylenko committed Jan 16, 2025
1 parent bd764dd commit 3fad5d1
Show file tree
Hide file tree
Showing 10 changed files with 1,197 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/shkeeper/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ storageClassName:
#

shkeeper:
image: vsyshost/shkeeper:2.2.4
image: vsyshost/shkeeper:2.2.5
port: 5000

#
Expand Down
116 changes: 116 additions & 0 deletions docker-compose/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@

# Shkeeper Helm Chart and Docker Compose

A Helm chart and Docker Compose configuration for deploying blockchain-based services with Shkeeper.

## Features
- Support for multiple blockchain integrations (BTC, LTC, DOGE, etc.).
- Flexible configuration using `values.yaml`.
- Optional support for full nodes and Shkeeper API layers.

---

## Requirements

- **Helm 3.x or higher**: [Installation Guide](https://helm.sh/docs/intro/install/)
- **Docker and Docker Compose**: [Docker Installation](https://docs.docker.com/get-docker/)

---

## Getting Started

### 1. Clone the Repository

```bash
git clone https://github.com/yourusername/shkeeper-repo.git
cd shkeeper-repo
```

---


#### Configure `values.yaml`

Edit the `values.yaml` file to configure the services based on your requirements. Example:

```yaml
btc:
enabled: true
mainnet: true
bitcoind:
image: vsyshost/bitcoind:27.0

ltc:
enabled: true
mainnet: true
```
### 2. Helm render docker-compose file
#### Render docker compose
```bash
helm template shkeeper > docker-compose.yml
```

### 3. Start services



1. In the docker-compose.yaml file, set the login and password parameters for the services

2. Start the services with Docker Compose:

```bash
docker-compose up -d
```

3. Verify the running containers:

```bash
docker ps
```
4. The shkeeper application will be launched on port 5000

---

## Configuration

### Helm Parameters

The following table lists the configurable parameters in `values.yaml`:

| Parameter | Description | Default |
|-------------------------|-------------------------------------------|---------------|
| `btc.enabled` | Enable BTC blockchain support | `true` |
| `ltc.enabled` | Enable LTC blockchain support | `false` |
| `monero.enabled` | Enable Monero blockchain support | `true` |
| `doge.enabled` | Enable Doge blockchain support | `true` |


For a full list, refer to the `values.yaml` file.

---

## Supported Blockchains

- **Bitcoin (BTC)**
- **Litecoin (LTC)**
- **Dogecoin (DOGE)**
- **Monero (XMR)**
- **Tron (TRX, USDT, USDC)**
- **Ethereum (ETH, USDT, USDC)**
- **Binance Smart Chain (BNB, USDT, USDC)**
- **Polygon (MATIC, USDT, USDC)**
- **Avalanche (AVAX, USDT, USDC)**
- **Ripple (XRP)**

---



## Contact

For support or inquiries, please open an issue on GitHub or contact us at [[email protected]](mailto:[email protected]).

---
6 changes: 6 additions & 0 deletions docker-compose/conf/create_db.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CREATE DATABASE IF NOT EXISTS `shkeeper`;
CREATE DATABASE IF NOT EXISTS `ethereum-shkeeper`;
CREATE DATABASE IF NOT EXISTS `bnb-shkeeper`;
CREATE DATABASE IF NOT EXISTS `xrp-shkeeper`;
CREATE DATABASE IF NOT EXISTS `polygon-shkeeper`;
CREATE DATABASE IF NOT EXISTS `avalanche-shkeeper`;
9 changes: 9 additions & 0 deletions docker-compose/conf/default.conf.template.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
server {
listen 80;

if ($${HTTP_X}${SHKEEPER_BACKEND_KEY} != ${SHKEEPER_BACKEND_KEY}) { return 403 "Bad key!\n"; }

location / {
root /backup;
}
}
31 changes: 31 additions & 0 deletions docker-compose/conf/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
user root;
worker_processes auto;

error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid;


events {
worker_connections 1024;
}


http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log main;

sendfile on;
#tcp_nopush on;

keepalive_timeout 65;

#gzip on;

include /etc/nginx/conf.d/*.conf;
}
64 changes: 64 additions & 0 deletions docker-compose/conf/rippled.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
[server]
port_rpc_admin_local
port_http

[port_rpc_admin_local]
port = 5005
ip = 127.0.0.1
admin = 127.0.0.1
protocol = http

[port_http]
port = 51234
ip = 0.0.0.0
protocol = http

[node_size]
small

[node_db]
type=NuDB
path=/var/lib/rippled/db/nudb
advisory_delete=0

# How many ledgers do we want to keep (history)?
# Integer value that defines the number of ledgers
# between online deletion events
online_delete=25600

[ledger_history]
# How many ledgers do we want to keep (history)?
# Integer value (ledger count)
# or (if you have lots of TB SSD storage): 'full'
25600

[database_path]
/var/lib/rippled/db

[debug_logfile]
/var/log/rippled/debug.log

[sntp_servers]
time.windows.com
time.apple.com
time.nist.gov
pool.ntp.org

[ips]
r.ripple.com 51235

[validators_file]
validators.txt

[rpc_startup]
{ "command": "log_level", "severity": "info" }

# severity (order: lots of information .. only errors)
# debug
# info
# warn
# error
# fatal

[ssl_verify]
1
9 changes: 9 additions & 0 deletions docker-compose/conf/validators.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[validator_list_sites]
https://vl.ripple.com
https://vl.xrplf.org

[validator_list_keys]
#vl.ripple.com
ED2677ABFFD1B33AC6FBC3062B71F1E8397C1505E1C42C64D11AD1B28FF73F4734
# vl.xrplf.org
ED45D1840EE724BE327ABE9146503D5848EFD5F38B6D5FEDE71E80ACCE5E6E738B
4 changes: 4 additions & 0 deletions docker-compose/shkeeper/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v2
name: docker-compose-generator
description: A Helm chart to generate a docker-compose.yml
version: 0.1.0
Loading

0 comments on commit 3fad5d1

Please sign in to comment.