Skip to content

Commit d1c8dc0

Browse files
committed
feat: Add complete Docker Compose production setup
- Add docker-compose.yml for production deployment - Add docker-compose.dev.yml for development environment - Add Dockerfiles for frontend and Helios light client - Add Nginx configuration with SSL/TLS support - Add Prometheus and Grafana monitoring stack - Add automated deployment, backup, and health check scripts - Add comprehensive documentation (quickstart, setup guide, checklist) - Update Makefile with Docker commands - Update .gitignore for Docker-related files Services included: - Nimbus consensus node (Ethereum beacon chain) - Helios light client (trustless RPC) - Frontend (React + Nginx) - Prometheus (metrics collection) - Grafana (monitoring dashboards) Features: - Production-ready with health checks and resource limits - SSL/TLS support for HTTPS - Automated backups with retention policy - Comprehensive monitoring and alerting - Development mode with hot-reload - Complete documentation and deployment guides
1 parent d3146ec commit d1c8dc0

25 files changed

Lines changed: 4573 additions & 0 deletions

.dockerignore

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Git
2+
.git
3+
.gitignore
4+
.gitattributes
5+
6+
# Documentation
7+
*.md
8+
docs/
9+
LICENSE
10+
11+
# Environment files
12+
.env
13+
.env.*
14+
!.env.example
15+
!.env.production.example
16+
17+
# Dependencies
18+
node_modules/
19+
lib/
20+
cache/
21+
22+
# Build artifacts
23+
out/
24+
dist/
25+
build/
26+
target/
27+
broadcast/
28+
29+
# Logs
30+
*.log
31+
logs/
32+
npm-debug.log*
33+
yarn-debug.log*
34+
yarn-error.log*
35+
36+
# IDE
37+
.vscode/
38+
.idea/
39+
*.swp
40+
*.swo
41+
*~
42+
.DS_Store
43+
44+
# Testing
45+
coverage/
46+
.nyc_output/
47+
test/
48+
*.test.js
49+
*.spec.js
50+
51+
# Temporary files
52+
tmp/
53+
temp/
54+
*.tmp
55+
56+
# Docker
57+
docker-compose*.yml
58+
Dockerfile*
59+
.dockerignore
60+
61+
# Scripts (keep only necessary ones)
62+
scripts/
63+
64+
# Frontend specific
65+
frontend/node_modules/
66+
frontend/dist/
67+
frontend/.vite/
68+
frontend/coverage/
69+
70+
# Foundry specific
71+
cache/
72+
out/
73+
broadcast/
74+

.env.production.example

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# =============================================================================
2+
# EthAura Production Environment Configuration
3+
# =============================================================================
4+
# Copy this file to .env.production and fill in your values
5+
# NEVER commit .env.production to version control!
6+
7+
# =============================================================================
8+
# NETWORK CONFIGURATION
9+
# =============================================================================
10+
# Network to use: mainnet, sepolia, holesky
11+
NETWORK=mainnet
12+
13+
# Server IP address (for Nimbus P2P)
14+
# Use 'auto' for automatic detection or specify your server's public IP
15+
SERVER_IP=auto
16+
17+
# =============================================================================
18+
# ETHEREUM RPC CONFIGURATION
19+
# =============================================================================
20+
# Mainnet Execution RPC (Alchemy, Infura, or other provider)
21+
# Get API key from: https://www.alchemy.com/ or https://infura.io/
22+
MAINNET_RPC_URL=https://eth-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY
23+
24+
# Sepolia RPC (for testing)
25+
SEPOLIA_RPC_URL=https://eth-sepolia.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY
26+
27+
# =============================================================================
28+
# HELIOS CONFIGURATION
29+
# =============================================================================
30+
# Helios checkpoint (weak subjectivity checkpoint)
31+
# Get latest from: https://beaconcha.in
32+
# Update this every 1-2 weeks for security
33+
HELIOS_CHECKPOINT=0x85e6151a246e8fdba36db27a0c7678a575346272fe978c9281e13a8b26cdfa68
34+
35+
# =============================================================================
36+
# FRONTEND CONFIGURATION
37+
# =============================================================================
38+
# Web3Auth Client ID
39+
# Get from: https://dashboard.web3auth.io/
40+
VITE_WEB3AUTH_CLIENT_ID=your_web3auth_client_id_here
41+
42+
# Chain ID (1 for mainnet, 11155111 for Sepolia)
43+
VITE_CHAIN_ID=1
44+
45+
# RPC URL for frontend (use Helios local endpoint)
46+
VITE_RPC_URL=http://helios:8545
47+
48+
# Contract Addresses (update after deployment)
49+
VITE_FACTORY_ADDRESS=0x...
50+
VITE_ENTRYPOINT_ADDRESS=0x0000000071727De22E5E9d8BAf0edAc6f37da032
51+
52+
# =============================================================================
53+
# DEPLOYMENT CONFIGURATION (for contract deployment)
54+
# =============================================================================
55+
# Private key for deploying contracts (KEEP SECURE!)
56+
PRIVATE_KEY=0x...
57+
58+
# Etherscan API key for contract verification
59+
ETHERSCAN_API_KEY=YOUR_ETHERSCAN_API_KEY
60+
61+
# EntryPoint v0.7 address
62+
ENTRYPOINT_ADDRESS=0x0000000071727De22E5E9d8BAf0edAc6f37da032
63+
64+
# =============================================================================
65+
# MONITORING CONFIGURATION
66+
# =============================================================================
67+
# Grafana admin credentials
68+
GRAFANA_USER=admin
69+
GRAFANA_PASSWORD=change_this_secure_password
70+
71+
# =============================================================================
72+
# APPLICATION PORTS
73+
# =============================================================================
74+
# Frontend HTTP port
75+
FRONTEND_PORT=80
76+
77+
# Frontend HTTPS port (configure SSL certificates first)
78+
FRONTEND_SSL_PORT=443
79+
80+
# Prometheus port (localhost only)
81+
PROMETHEUS_PORT=9090
82+
83+
# Grafana port (localhost only)
84+
GRAFANA_PORT=3001
85+
86+
# =============================================================================
87+
# RESOURCE LIMITS
88+
# =============================================================================
89+
# Nimbus memory limit (in GB)
90+
NIMBUS_MEMORY_LIMIT=6
91+
92+
# Helios memory limit (in GB)
93+
HELIOS_MEMORY_LIMIT=2
94+
95+
# =============================================================================
96+
# BACKUP CONFIGURATION
97+
# =============================================================================
98+
# Backup directory for volumes
99+
BACKUP_DIR=/var/backups/ethaura
100+
101+
# Backup retention (in days)
102+
BACKUP_RETENTION_DAYS=30
103+
104+
# =============================================================================
105+
# LOGGING
106+
# =============================================================================
107+
# Log level: DEBUG, INFO, WARN, ERROR
108+
LOG_LEVEL=INFO
109+
110+
# Log retention (in days)
111+
LOG_RETENTION_DAYS=30
112+

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ out/
99

1010
# Dotenv file
1111
.env
12+
.env.production
13+
.env.local
1214

1315
# Node modules
1416
node_modules/
@@ -27,3 +29,12 @@ frontend/.vite/
2729
.DS_Store
2830
Thumbs.db
2931

32+
# Docker
33+
logs/
34+
backups/
35+
docker/nginx/ssl/*.pem
36+
docker/nginx/ssl/*.key
37+
38+
# Helios
39+
.helios/
40+

0 commit comments

Comments
 (0)