Skip to content

Commit 345bcc0

Browse files
Merge pull request #316 from chippr-robotics/copilot/create-kong-docker-template
Add Kong API Gateway for multi-network routing, HADR, and observability
2 parents 0e55b4d + 7756ec5 commit 345bcc0

File tree

17 files changed

+3637
-0
lines changed

17 files changed

+3637
-0
lines changed

docker/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22

33
This directory contains Dockerfiles for building and running Fukuii Ethereum Client in containerized environments.
44

5+
## Kong API Gateway
6+
7+
For production deployments with load balancing, authentication, and monitoring, see the [Kong API Gateway setup](kong/README.md) which provides:
8+
9+
- **API Gateway**: Kong Gateway for routing and managing all traffic
10+
- **High Availability**: Load balancing across multiple Fukuii instances
11+
- **Security**: Basic Auth, JWT, rate limiting, and CORS support
12+
- **Monitoring**: Prometheus metrics and Grafana dashboards
13+
- **Multi-Network Support**: HD wallet hierarchy routing for Bitcoin, Ethereum, and Ethereum Classic
14+
15+
Quick start: `cd kong && ./setup.sh`
16+
17+
Full documentation: [kong/README.md](kong/README.md)
18+
519
## Container Registries
620

721
Fukuii maintains images in multiple container registries:

docker/kong/.env.example

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Kong API Gateway Configuration
2+
# Copy this file to .env and customize for your deployment
3+
4+
# Kong Admin Credentials (change these in production!)
5+
KONG_ADMIN_USER=admin
6+
KONG_ADMIN_PASSWORD=change_me_in_production
7+
8+
# Grafana Configuration (CHANGE THESE!)
9+
GRAFANA_ADMIN_USER=admin
10+
GRAFANA_ADMIN_PASSWORD=fukuii_grafana_admin_change_me
11+
12+
# Cassandra Configuration
13+
CASSANDRA_CLUSTER_NAME=fukuii-kong-cluster
14+
CASSANDRA_DC=dc1
15+
CASSANDRA_RACK=rack1
16+
17+
# Fukuii Configuration
18+
FUKUII_NETWORK=etc
19+
JAVA_OPTS=-Xmx4g -Xms4g
20+
21+
# Network Configuration
22+
FUKUII_PRIMARY_RPC_PORT=8545
23+
FUKUII_PRIMARY_WS_PORT=8546
24+
FUKUII_PRIMARY_P2P_PORT=30303
25+
FUKUII_PRIMARY_METRICS_PORT=9095
26+
27+
FUKUII_SECONDARY_RPC_PORT=8547
28+
FUKUII_SECONDARY_WS_PORT=8548
29+
FUKUII_SECONDARY_P2P_PORT=30304
30+
FUKUII_SECONDARY_METRICS_PORT=9096
31+
32+
# Kong Ports
33+
KONG_PROXY_HTTP_PORT=8000
34+
KONG_PROXY_HTTPS_PORT=8443
35+
KONG_ADMIN_HTTP_PORT=8001
36+
KONG_ADMIN_HTTPS_PORT=8444
37+
38+
# Monitoring Ports
39+
PROMETHEUS_PORT=9090
40+
GRAFANA_PORT=3000
41+
42+
# Authentication Secrets (CHANGE THESE!)
43+
BASIC_AUTH_ADMIN_PASSWORD=fukuii_admin_password
44+
BASIC_AUTH_DEV_PASSWORD=fukuii_dev_password
45+
API_KEY_ADMIN=admin_api_key_change_me
46+
API_KEY_DEV=dev_api_key_change_me
47+
JWT_SECRET=your_jwt_secret_change_me
48+
49+
# Logging
50+
LOG_LEVEL=info
51+
52+
# Backup Configuration
53+
BACKUP_ENABLED=false
54+
BACKUP_SCHEDULE="0 2 * * *" # Daily at 2 AM

docker/kong/.gitignore

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Environment variables with secrets
2+
.env
3+
4+
# SSL certificates and keys
5+
ssl/
6+
*.key
7+
*.crt
8+
*.pem
9+
*.p12
10+
*.pfx
11+
12+
# Secrets
13+
secrets/
14+
15+
# Logs
16+
*.log
17+
logs/
18+
19+
# Backup files
20+
*.bak
21+
*.backup
22+
backups/
23+
24+
# Temporary files
25+
*.tmp
26+
*.temp
27+
tmp/
28+
29+
# Database dumps
30+
*.sql
31+
*.dump
32+
*.dmp
33+
34+
# Cassandra data (managed by Docker volumes)
35+
cassandra-data/
36+
37+
# Prometheus data (managed by Docker volumes)
38+
prometheus-data/
39+
40+
# Grafana data (managed by Docker volumes)
41+
grafana-data/
42+
43+
# Fukuii data (managed by Docker volumes)
44+
fukuii-data/
45+
46+
# IDE files
47+
.vscode/
48+
.idea/
49+
*.swp
50+
*.swo
51+
*~
52+
53+
# OS files
54+
.DS_Store
55+
Thumbs.db
56+
57+
# Docker
58+
.docker/
59+
60+
# Local testing configurations
61+
*-local.yml
62+
*-local.conf
63+
test-*.yml

0 commit comments

Comments
 (0)