Giter VIP home page Giter VIP logo

zfaucet's Introduction

zcash faucet

Set up instructions (WiP):

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libpq-dev python-dev postgresql postgresql-contrib nginx

modify settings.py to configure settings.

export proper ENV variables:

export DJANGO_ENVIRONMENT=prod

export DJANGO_SECRET_KEY=xxx

export DJANGO_POSTGRESQL_PASSWORD=xxx

pip install -r requirements.txt
pip install -r requirements-prod.txt
sudo su - postgres
createdb django
createuser -P django
psql
GRANT ALL PRIVILEGES ON DATABASE django TO django;
python manage.py syncdb
gunicorn --workers=2 zfaucet.wsgi
sudo service nginx start
vim /etc/nginx/sites-available/zfaucet

server {
    server_name faucet.yoursite.com;

    access_log off;

    location /static/ {
        alias /home/ansible/static/;
    }

    location / {
            proxy_pass http://127.0.0.1:8000;
            proxy_set_header X-Forwarded-Host $server_name;
            proxy_set_header X-Real-IP $remote_addr;
            add_header P3P 'CP="ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV"';
    }
}

cd /etc/nginx/sites-enabled
sudo ln -s ../sites-available/zfaucet
sudo rm default
python manage.py collectstatic

(assuming user is ansible and has created a virtualenv called zfaucet)

crontab -e
*/5 * * * * /home/ansible/run_health.sh
*/5 * * * * /home/ansible/.virtualenvs/zfaucet/bin/python /home/ansible/zfaucet/manage.py healthcheck

run_health.sh:

#!/bin/bash
su ansible
source /home/ansible/set_prod.sh
cd /home/ansible/zfaucet
/home/ansible/.virtualenvs/zfaucet/bin/python ./manage.py healthcheck

run_sweep.sh
#!/bin/bash
su ansible
source /home/ansible/set_prod.sh
cd /home/ansible/zfaucet/pyzfaucet

/home/ansible/.virtualenvs/zfaucet/bin/python -m pyzcash.examples.sweep_all mfu8LbjAq15zmCDLCwUuay9cVc2FcGuY4d

zfaucet's People

Contributors

5a1t avatar yazgoo avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

arcalinea

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.