Fork me on GitHub

CoinMines by fbettag

PoolServerJ and pushpool Web-Frontend written in Scala (Lift Web Framework) for Pooled Bitcoin, Namecoin and Solidcoin Mining with Proportional Rewarding

Dependencies

PostgreSQL
Scala
PoolServerJ or
pushpool from MtRed with PostgreSQL Support (and it's dependencies)

Download

You can download this project in either zip or tar formats.

You can also clone the project with Git by running:

$ git clone git://github.com/fbettag/coinmines mysite.com

Setup and keeping track of Development

Sometimes it can be hard for newcomers to see how git helps you manage this, but here is how i recommend doing it.

cd mysite.com/
git branch -t mysite.com		# create your own branch
git checkout mysite.com			# check it out
git branch -D master			# delete the local master
edit templates in src/main/webapp	# edit your templates
git commit -a -m 'My Layout changes.'	# save your changes

Now whenever we publish an update, you simply do:

git rebase origin/master

The best thing would be, to push your new branch to a remote repository for backup. To find out more about stuff like that check gitready.com and sometimes my blog.

Configure your Project and Database: (use default.props as example)

src/main/resources/props/default.props            (Development)
src/main/resources/props/pilot.default.props      (Preview - copy from dev)
src/main/resources/props/production.default.props (Production - copy from dev)

If you want your production. and pilot.default.props in your repository, make sure you uncomment the line in .gitingore!

Only set pool.calculate=true in Production! (production.default.props)

SMTP Setup is straight forward. Either you have your SMTP Host on localhost, or you have a remote-host which lets you relay. In Postfix this can be easily done with my_networks.

Whenever you're done making changes, make sure you commit! Otherwise rebase won't work and you will encounter other problems like backing up.

Run in development-mode:

mvn jetty:run

Production

Deploy for production:

mvn package

Download David Pollak's jetty_instance.tgz and do the following:

tar -jxf jetty_instance.tgz
cd jetty
echo 9090 > base_port (or whatever your Port should be)
echo 64M > ram_size (change to appropriate size!)

Copy your packaged .war-file to jetty/webapps/root.war and run:

./start_prod.sh (and ./shutdown_prod.sh)

Point your nginx to the port of the jetty and be happy.

Poolserver

Start your bitcoind, namecoind and solidcoind.

After starting the daemons, start either pushpoold or PoolServerJ for each network you are running.

To get started with PoolServerJ (preferred), try the Quick Start Tutorial together with our config/local-daemon.properties.

We also provide the two configuration files for pushpool in config/.

Thanks

to everybody in the Lift Community and on Liftweb Google Groups.

Author

Franz Bettag (franz@bett.ag)

License

  Copyright (c) 2011, Franz Bettag 
  All rights reserved.

  Redistribution and use in source and binary forms, with or without
  modification, are permitted provided that the following conditions are met:
     * Redistributions of source code must retain the above copyright
       notice, this list of conditions and the following disclaimer.
     * Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
     * All advertising materials mentioning features or use of this software
       must display the following acknowledgement:
       This product includes software developed by the Bettag Systems UG
       and its contributors.

  THIS SOFTWARE IS PROVIDED BY BETTAG SYSTEMS UG ''AS IS'' AND ANY
  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  DISCLAIMED. IN NO EVENT SHALL BETTAG SYSTEMS UG BE LIABLE FOR ANY
  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.