Commit 10f2b559 authored by TonyFord's avatar TonyFord
Browse files

initial upload

parents
# except of the netname all parameters should be the same as in faircoin.conf
rpcconnect=127.0.0.1
rpcport=8332
rpcuser=faircoin
rpcpassword=NU5QsSmUGL-onUzeosSvpbb23mUiH8xS
txindex=1
netname=FairCoinChain
# except of the netname all parameters should be the same as in faircoin.conf
rpcconnect=127.0.0.1
rpcport=8332
rpcuser=faircoin
rpcpassword=NU5QsSmUGL-onUzeosSvpbb23mUiH8xS
txindex=1
_site
.sass-cache
.jekyll-metadata
.jekyll-cache
jekyll-help-center-theme-0.1.0.gem
jekyll-help-center-theme.gemspec
node_modules
_posts
Gemfile.lock
_data/price-sources/*.json
.faircoin2/blocks
.faircoin2/chainstate
.faircoin2/.cookie
.faircoin2/.lock
.faircoin2/debug.log
.faircoin2/faircoind.pid
.faircoin2/fee_estimates.dat
.faircoin2/peers.dat
_data/faircoin/tx
_data/faircoin/txs.info.json
FROM ruby:2.7.1-alpine
COPY . .
# --
# EnvVars
# Ruby
# --
ENV BUNDLE_HOME=/usr/local/bundle
ENV BUNDLE_APP_CONFIG=/usr/local/bundle
ENV BUNDLE_BIN=/usr/local/bundle/bin
ENV GEM_BIN=/usr/gem/bin
ENV GEM_HOME=/usr/gem
# --
# EnvVars
# Image
# --
ENV JEKYLL_VAR_DIR=/var/jekyll
ENV JEKYLL_VERSION=4.0.0
ENV JEKYLL_DATA_DIR=/srv/jekyll
ENV JEKYLL_BIN=/usr/jekyll/bin
ENV JEKYLL_ENV=production
# --
# EnvVars
# System
# --
ENV LANG=de_DE.UTF-8
ENV LANGUAGE=de_DE:en
ENV TZ=Europe/Berlin
ENV PATH="$JEKYLL_BIN:$PATH"
ENV PATH="$GEM_BIN:$PATH"
ENV LC_ALL=de_DE.UTF-8
ENV LANG=de_DE.UTF-8
ENV LANGUAGE=de_DE
# --
# EnvVars
# Main
# --
ENV VERBOSE=false
ENV FORCE_POLLING=false
ENV DRAFTS=false
# --
# Packages
# User
# --
RUN apk --no-cache add \
ruby-dev \
build-base \
curl \
vim \
wget \
bash
# --
# Packages
# Dev
# --
RUN apk --no-cache add \
zlib-dev \
build-base \
libxml2-dev \
libxslt-dev \
readline-dev \
libffi-dev \
yaml-dev \
zlib-dev \
cmake
# --
# Packages
# Main
# --
RUN apk --no-cache add \
linux-headers \
openjdk8-jre \
less \
zlib \
libxml2 \
readline \
libxslt \
libffi \
git \
nodejs \
tzdata \
shadow \
su-exec \
nodejs-npm \
libressl \
yarn
# --
# Gems
# Update
# --
RUN echo "gem: --no-ri --no-rdoc" > ~/.gemrc
RUN unset GEM_HOME && unset GEM_BIN && \
yes | gem update --system
# --
# Gems
# Main
# --
# Work around a nonsense RubyGem permission bug.
RUN unset GEM_HOME && unset GEM_BIN && yes | gem install --force bundler
RUN gem install jekyll -v$JEKYLL_VERSION -- \
--use-system-libraries
RUN bundle install
# --
RUN addgroup -Sg 1000 jekyll
RUN adduser -Su 1000 -G \
jekyll jekyll
# --
COPY entrypoint.sh $JEKYLL_BIN/entrypoint
RUN chown jekyll:jekyll $JEKYLL_BIN/entrypoint
RUN chmod u+x $JEKYLL_BIN/entrypoint
# --
RUN mkdir -p $JEKYLL_VAR_DIR
RUN mkdir -p $JEKYLL_DATA_DIR
RUN chown -R jekyll:jekyll $JEKYLL_DATA_DIR
RUN chown -R jekyll:jekyll $JEKYLL_VAR_DIR
RUN chown -R jekyll:jekyll $BUNDLE_HOME
# --
RUN rm -rf /root/.gem
RUN rm -rf /home/jekyll/.gem
RUN rm -rf $BUNDLE_HOME/cache
RUN rm -rf $GEM_HOME/cache
# --
CMD ["jekyll", "--help"]
ENTRYPOINT ["/usr/jekyll/bin/entrypoint"]
WORKDIR /srv/jekyll
VOLUME /srv/jekyll
EXPOSE 35729
EXPOSE 4000
# Pull base image.
FROM ubuntu:18.04@sha256:5f4bdc3467537cbbe563e80db2c3ec95d548a9145d64453b06939c4592d67b6d
ENV LC_ALL=C.UTF-8 LANG=C.UTF-8
#####################################################################################root##
### install base libraries and dependencies for faircoin daemon ###########################
RUN apt-get update -q && \
apt-get install -qy \
git \
make \
autotools-dev \
autoconf \
libtool \
libssl-dev \
libboost-all-dev \
libevent-dev \
libdb++-dev \
libdb-dev
#####################################################################################root##
### install nano commandline editor [optional] ( to edit faircoin.conf later if necessary )
RUN apt-get install -qy nano
#####################################################################################root##
### install python packages
RUN apt-get install -qy python3-pip
RUN python3 -m pip install python-bitcoinrpc
#####################################################################################root##
### system cleanup ########################################################################
RUN rm -rf /var/lib/apt/lists/* && \
apt-get autoremove -y && \
apt-get clean
#####################################################################################root##
### create and run user account to image ##################################################
RUN useradd --create-home --shell /bin/bash faircoin
USER faircoin
#################################################################################faircoin##
### download and build faircoin daemon and cli ############################################
WORKDIR /home/faircoin
ARG source_repository
RUN git clone $source_repository /home/faircoin/faircoin
WORKDIR /home/faircoin/faircoin
RUN ./autogen.sh && \
./configure --disable-tests --disable-bench --with-incompatible-bdb --disable-wallet && \
make
#################################################################################faircoin##
### initialize blockchain with txindex=1 ##################################################
WORKDIR /home/faircoin/faircoin/src
RUN mv ./faircoind /home/faircoin/faircoind
RUN mv ./faircoin-cli /home/faircoin/faircoin-cli
WORKDIR /home/faircoin
RUN ./faircoind -daemon -reindex && \
sleep 60 && \
./faircoin-cli stop && \
sleep 10
ENTRYPOINT ["./faircoind"]
source 'http://rubygems.org'
ruby "2.7.1"
gem "jekyll", "~> 4.0.0"
gem 'bootstrap-sass'
gem 'i18n'
require 'open-uri'
gem "json"
gem "activesupport"
The MIT License (MIT)
Copyright (c) 2017 gustavoquinalha
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
# FairCoin Pulse
Follow the pulse of FairCoin!
Live and static faircoin numbers.
## Installation
~~~
docker-compose up
~~~
# Welcome to Jekyll!
#
# This config file is meant for settings that affect your whole blog, values
# which you are expected to set up once and rarely need to edit after that.
# For technical reasons, this file is *NOT* reloaded automatically when you use
# 'jekyll serve'. If you change this file, please restart the server process.
# Site settings
title: Pulse
url: "http://127.0.0.1"
github_username: "tonyford"
color_theme: "rgb(15, 21, 57)"
color_text: "#fff"
# Build settings
markdown: kramdown
# Plugins
plugins_dir:
- jekyll-admin
- _plugins
exclude:
- script
- pull.yml
- docker-compose.yml
- Dockerfile
- Dockerfile_faircoin
- entrypoint.sh
- .faircoin2
port: 4020
source: .
destination: _site
permalink: none # /:categories/:title.html
px_max: 1500000 # maximum number of pixel of images
faircoin blockchain data folder
-
id: tx_pulse
name: FairCoin tx pulse ( 24h )
-
id: tx_chart
name: FairCoin tx historical
<footer>
<div class="footer container column align-items-center justify-content-center">
<div class="footer--block text-align-center">
<div class="" data-aos="fade-up" data-aos-delay="" data-aos-offset="0">
<div class="by" data-aos="fade-up" data-aos-delay="200" data-aos-offset="0">
<a href="https://github.com/gustavoquinalha/jekyll-help-center-theme" target="_blank">Created with jekyll</a>
</div>
</div>
</div>
</footer>
<!DOCTYPE html>
<html lang="{{ site.language }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.name }}{% endif %}</title>
<link rel="stylesheet" href="../assets/css/the-grid.min.css">
<link href="../assets/css/c3.min.css" rel="stylesheet">
<link rel="stylesheet" href="{{ include.assetpath }}css/main.css?3">
<link rel="shortcut icon" href="{{ include.assetpath }}assets/img/favicon.png">
<link rel="icon" href="{{ include.assetpath }}assets/img/favicon.png">
</head>
<div class="menu">
<div class="size margin menu--content container align-items-center justify-content-between">
<div class="" data-aos="fade-right" data-aos-delay="" data-aos-offset="0">
<a href="./"><span>FairCoin |</span> {{ site.title }}</a>
</div>
<header class="">
<div class="header container align-items-center justify-content-center">
<div class="header--block size margin container column">
<div class="header--block--text" data-aos="fade-up" data-aos-delay="" data-aos-offset="0">
</div>
</div>
</div>
</header>
<div class="navm" data-aos="fade-right" data-aos-delay="" data-aos-offset="0">
<a href="../{% if include.forward != "" %}?fw={{ include.forward }}{% endif %}" data-aos="fade-left" data-aos-delay="" data-aos-offset="0">
<div class="back-to-site-text">
</div>
</a>
<a href="./"><span class="feather-icon icon-globe" title="{{ site.title }}"></span></a>
</div>
<!-- <nav class="masthead-nav">
{% for page in site.pages %}
{% if page.title %}
<a href="{{ page.url | prepend: site.baseurl }}">
{{ page.title }}
</a>
{% endif %}
{% endfor %}
</nav> -->
</div>
</div>
<div class="overview">
<div class="tags">
<ul>
{% for entry in site.data.register %}
<li class="li-tags li-tag-{{ entry.id }}" title="{{ entry.id }}" onclick="getByTag('{{entry.id}}')"></span>{{ entry.name }}</li>
{% endfor %}
</ul>
</div>
<div class="orders">
<div id="chart"></div>
</div>
</div>
<style>
.legend span {
width: 100px;
display: inline-block;
text-align: center;
cursor: pointer;
color: white;
font-size: 12px;
position: relative;
top: -30px;
left: 40px;
}
</style>
<script>
// set the dimensions and margins of the graph
$(document).ready(
function(){
getByTag(getQueryVariable('tag'));
}
);
</script>
date,blocks,real_tx
{% assign txs_sorted = site.data.faircoin.tx | sort %}{% for txs in txs_sorted %}{% assign txx=txs[1] | sort %}{% for t in txx %}{% if forloop.last != true %}{{ t[0] }},{{ t[1] | size }},{% assign tx = t[1] | sum %}{% assign blocks = t[1] | size %}{{ tx | minus: blocks }}{% endif %};{% endfor %}{% endfor %}
{% include head.html assetpath="../" %}
<body>
<script src="../assets/js/jquery.min.js"></script>
<script src="https://d3js.org/d3.v5.js"></script>
<script src="../assets/js/c3.js"></script>
<div class="">
{% include menu.html %}
{{ content }}
{% if page.footer != false %}{% include footer.html %}{% endif %}
</div>
<script src="../assets/js/json.js"></script>
<script src="../assets/js/script.js"></script>
</body>
</html>
{% capture A %}{% include txs.html %}{% endcapture %}{{ A | replace: ';;','
' | replace: ';','
' | replace: '
','' }}
module Arrays
def clean(input)
input.delete_if {|value| value == nil}
input[0]
end
def merge(a1,a2)
obj={}
for a in a1[0]
obj[a[0]]=a[1]
end
for a in a2
obj[a[0]]=a[1]
end
obj
end
def objectsize(input)
c=0
for a in input
for aa in a[1]
if aa['test'] != true
c+=1
end
end
end
c
end
def sum(input)
sum=input.inject(0){|sum,x| sum + x }
sum
end
def map0(input)
input[0]
end
end
Liquid::Template.register_filter(Arrays) # register filter globally
module Numbers
def decimals(input)
'%.2f' % input
end
end
Liquid::Template.register_filter(Numbers) # register filter globally
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment