Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# RustChain Configuration
# Copy this file to .env and update values

# Database configuration
RUSTCHAIN_DB_PATH=/app/data/rustchain_v2.db

# Flask configuration
FLASK_ENV=production
FLASK_APP=node/rustchain_v2_integrated_v2.2.1_rip200.py
PYTHONUNBUFFERED=1

# Server configuration
PORT=8099
HOST=0.0.0.0

# Nginx configuration
NGINX_PORT_HTTP=80
NGINX_PORT_HTTPS=443

# Domain configuration (for SSL)
# Replace with your actual domain name
DOMAIN=rustchain.example.com

# Email for Let's Encrypt (optional, used for SSL certificate generation)
LETSENCRYPT_EMAIL=admin@example.com

# Gunicorn configuration
GUNICORN_WORKERS=2
GUNICORN_TIMEOUT=120
GUNICORN_BIND=0.0.0.0:8099

# Enrollment enforcement (optional)
ENROLL_REQUIRE_TICKET=1
ENROLL_TICKET_TTL_S=600
ENROLL_REQUIRE_MAC=1
MAC_MAX_UNIQUE_PER_DAY=3

# Privacy salt
PRIVACY_PEPPER=rustchain_poa_v2

# Health check configuration
HEALTHCHECK_INTERVAL=30s
HEALTHCHECK_TIMEOUT=10s
HEALTHCHECK_RETRIES=3
HEALTHCHECK_START_PERIOD=40s

# Volume paths
DATA_VOLUME=./data
NODE_VOLUME=./node
NGINX_SSL_VOLUME=./nginx/ssl
NGINX_LOGS_VOLUME=./nginx/logs

# Security (optional)
# ADMIN_KEY=your_admin_key_here
# API_KEY=your_api_key_here
52 changes: 52 additions & 0 deletions .github/workflows/mining-badge-action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Update Mining Status Badge

on:
# Allow manual trigger
workflow_dispatch:
inputs:
wallet:
description: 'Wallet name to check'
required: true
default: 'frozen-factorio-ryan'
# Update daily at midnight UTC
schedule:
- cron: '0 0 * * *'
# Allow manual trigger from repository settings
workflow_dispatch:

jobs:
update-badge:
runs-on: ubuntu-latest

steps:
- name: Fetch mining status
id: fetch-status
run: |
# Get wallet from input or use default
WALLET="${{ github.event.inputs.wallet }}"
if [ -z "$WALLET" ]; then
WALLET="frozen-factorio-ryan"
fi

# Fetch mining status from RustChain node
STATUS=$(curl -s "https://50.28.86.131/api/badge/$WALLET")

# Extract status components
LABEL=$(echo $STATUS | jq -r '.label')
MESSAGE=$(echo $STATUS | jq -r '.message')
COLOR=$(echo $STATUS | jq -r '.color')

echo "label=$LABEL" >> $GITHUB_OUTPUT
echo "message=$MESSAGE" >> $GITHUB_OUTPUT
echo "color=$COLOR" >> $GITHUB_OUTPUT

- name: Update README with badge
run: |
echo "Mining Status:"
echo "Label: ${{ steps.fetch-status.outputs.label }}"
echo "Message: ${{ steps.fetch-status.outputs.message }}"
echo "Color: ${{ steps.fetch-status.outputs.color }}"

# Note: This is a template action. Actual README updates
# would require checkout and push permissions.
echo "Badge URL: https://img.shields.io/badge/${{ steps.fetch-status.outputs.label }}-${{ steps.fetch-status.outputs.message }}-${{ steps.fetch-status.outputs.color }}"
Loading