diff --git a/Docker/Dockerfile b/Docker/Dockerfile index 6f3e84b..dcf92a1 100644 --- a/Docker/Dockerfile +++ b/Docker/Dockerfile @@ -16,18 +16,18 @@ RUN apt-get --yes upgrade # Install utils. RUN apt-get install --yes git sudo openssh-server vim aptitude daemon nodejs inetutils-ping telnet cron -RUN useradd --user-group --create-home --shell /bin/bash healthcoin \ - && echo 'healthcoin:healthcoin' | chpasswd && adduser healthcoin sudo -RUN echo 'healthcoin ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers +RUN useradd --user-group --create-home --shell /bin/bash solarcoin \ + && echo 'solarcoin:solarcoin' | chpasswd && adduser solarcoin sudo +RUN echo 'solarcoin ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers -COPY web-wallet /home/healthcoin/ -RUN chmod a+rwx /home/healthcoin/web-wallet -RUN chown healthcoin:healthcoin /home/healthcoin/web-wallet -RUN mkdir /home/healthcoin/.healthcoin -COPY coin.conf /home/healthcoin/.healthcoin/ -RUN chown -R healthcoin:healthcoin /home/healthcoin/.healthcoin +COPY web-wallet /home/solarcoin/ +RUN chmod a+rwx /home/solarcoin/web-wallet +RUN chown solarcoin:solarcoin /home/solarcoin/web-wallet +RUN mkdir /home/solarcoin/.solarcoin +COPY coin.conf /home/solarcoin/.solarcoin/ +RUN chown -R solarcoin:solarcoin /home/solarcoin/.solarcoin -USER healthcoin +USER solarcoin # Install web-wallet RUN cd ~ \ @@ -38,8 +38,8 @@ EXPOSE 8181 #EXPOSE 8383 # Add VOLUMEs to allow backup of data -VOLUME ['/home/healthcoin'] +VOLUME ['/home/solarcoin'] -WORKDIR /home/healthcoin +WORKDIR /home/solarcoin CMD ./web-wallet diff --git a/README.md b/README.md index bc7ff16..b05e2a2 100644 --- a/README.md +++ b/README.md @@ -3,13 +3,13 @@ ## Prerequisites: -A running RPC coin daemon. See: https://github.com/onsightit/healthcoin +A running RPC coin daemon. See: https://github.com/onsightit/solarcoin Mongo DB for storing account info and biomarker data. See: https://www.mongodb.com/ Create DB and user: - > use healthcoin - > db.createUser( { user: "healthcoin", pwd: "{password}", roles: [ "readWrite" ] } ) + > use solarcoin + > db.createUser( { user: "solarcoin", pwd: "{password}", roles: [ "readWrite" ] } ) Node.js 6.x for running the Web Wallet. For debian installations: @@ -17,13 +17,13 @@ Node.js 6.x for running the Web Wallet. For debian installations: sudo apt-get purge nodejs npm Install 6.x: - curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - - sudo apt-get install -y nodejs + > curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - + > sudo apt-get install -y nodejs If the Web Wallet is not running locally, https is the default protocol. To set up a self-signed SSL certificate in debian/apache2 environments, run: - sudo mkdir /etc/apache2/certs - sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/certs/{domain name}.key -out /etc/apache2/certs/{domain name}.crt + > sudo mkdir /etc/apache2/certs + > sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/certs/{domain name}.key -out /etc/apache2/certs/{domain name}.crt Note: Also copy the crt and key file to the {nodejs}/sslcert directory. Change the owner to that of the nodejs process, then make sure your settings.json SSL parameters have the correct file-names for your key and crt files. @@ -37,33 +37,33 @@ Configure the Web Wallet and daemon for local or non-local operation, or a combi If the daemon is running on the same machine as the Web Wallet, the daemon's config file will be used. It can be found at: // Mac OS - '$HOME/Library/Application Support/Healthcoin/healthcoin.conf' + '$HOME/Library/Application Support/SolarCoin/solarcoin.conf' // Linux - '$HOME/.healthcoin/healthcoin.conf' + '$HOME/.solarcoin/solarcoin.conf' // Windows - '$APPDATA/Healthcoin/healthcoin.conf' + '$APPDATA/SolarCoin/solarcoin.conf' -(Substitute your coin's name for 'Healthcoin' above.) +(Substitute your coin's name for 'SolarCoin' above.) If the daemon is running on another machine, you will need to configure node.js's coin.conf file to match the daemon's config file. coin.conf is found in: lib/coin.conf Either way, the config file will need at a minimum the following parameters: -rpcuser=rpcuser -rpcpassword=password # Change me! -rpcconnect=localhost # RPC daemon -rpcport=18184 + > rpcuser=rpcuser + > rpcpassword=password # Change me! + > rpcconnect=localhost # RPC daemon + > rpcport=18184 Local vs Not-Local configuration: The config file parameter 'rpcconnect' determines whether the daemon (and thus the Web Wallet) is local or not-local, even if the daemon and Web Wallet are both running on the same machine. The Web Wallet's boolean flag 'isLocal' is determined to be true if 'rpcconnect' is one of the following: -rpcconnect=127.0.0.1 -rpcconnect=localhost -rpcconnect=192.168.x.x -rpcconnect=hostname_with_no_tld + > rpcconnect=127.0.0.1 + > rpcconnect=localhost + > rpcconnect=192.168.x.x + > rpcconnect=hostname_with_no_tld The last two examples allow for the Web Wallet to be considered 'local', even though the node and daemon may be running on different machines on the same local network. @@ -80,20 +80,20 @@ If you need to run the Web Wallet app from a "sub directory" of the main web-sit Windows: - web-wallet.bat + > web-wallet.bat - (If supervisor is not installed, run 'npm install supervisor'.) + (If supervisor is not installed, run 'npm install supervisor'.) Linux: - web-wallet.sh + > web-wallet.sh - (If 'daemon' is not installed, please consult your Linux distro's documentation for installing 'daemon'.) + (If 'daemon' is not installed, please consult your Linux distro's documentation for installing 'daemon'.) The Web Wallet has an admin account pre-defined which you can login with: - Login: MASTER_ACCOUNT - Password: password (you will be required to change this) + > Login: MASTER_ACCOUNT + > Password: password (you will be required to change this) The MASTER_ACOUNT always sees the Web Wallet as 'local' and has views into the wallet as if you were running a Qt wallet (i.e. the full wallet balance). diff --git a/lib/settings.js b/lib/settings.js index 9028d16..2d63a57 100644 --- a/lib/settings.js +++ b/lib/settings.js @@ -12,16 +12,16 @@ var jsonminify = require("jsonminify"); exports.env = "development"; // The app title, visible in browser window -exports.coinTitle = "Healthcoin Web Wallet"; +exports.coinTitle = "SolarCoin Web Wallet"; // Coin description -exports.coinDescription = "Healthcoin keeps track of the user's biomarker progress in diabetic and pre-diabetic patients. Biomarker data is sent anonymously to the blockchain for research purposes later."; +exports.coinDescription = "SolarCoin keeps track of the user's biomarker progress in diabetic and pre-diabetic patients. Biomarker data is sent anonymously to the blockchain for research purposes later."; // The copyright for the footer -exports.copyRight = "Copyright (c) 2016, The Healthcoin Developers. All rights reserved."; +exports.copyRight = "Copyright (c) 2016, The SolarCoin Developers. All rights reserved."; // Coin name / page heading -exports.coinName = "healthcoin"; +exports.coinName = "solarcoin"; // Coin symbol, e.g. BTC, VRC, SLR, HCN, ... exports.coinSymbol = "HCN"; @@ -74,9 +74,9 @@ exports.sslCrt = "./sslcert/server.crt"; // This setting is passed to MongoDB to set up the database exports.mdb = { - "user": "healthcoin", + "user": "solarcoin", "password": "password", - "database": "healthcoin", + "database": "solarcoin", "host" : "127.0.0.1", "port" : 27017 }; @@ -84,7 +84,7 @@ exports.mdb = { // MASTER_ACCOUNT will become an address label in the wallet. // *** DO NOT CHANGE THE ACCOUNT NAME AFTER FIRST RUN! *** exports.masterAccount = "MASTER_ACCOUNT"; // Master UI login account, and Label to assign to "" wallet accounts. -exports.masterEmail = "admin@healthcoin.com"; // Master email account. +exports.masterEmail = "admin@solarcoin.com"; // Master email account. exports.masterCanEncrypt = false; // Allow wallet encryption by MASTER_ACCOUNT diff --git a/node_modules/coin-node/README.md b/node_modules/coin-node/README.md index 080695b..0d75c0c 100644 --- a/node_modules/coin-node/README.md +++ b/node_modules/coin-node/README.md @@ -8,7 +8,7 @@ coin-node is a client for Node.JS. ## Dependencies -You'll need a running instance of [coind](https://github.com/onsightit/healthcoin) to connect with. +You'll need a running instance of [coind](https://github.com/onsightit/solarcoin) to connect with. Then, install the coin-node NPM package. diff --git a/settings.json.template b/settings.json.template index 198c98a..00bef30 100644 --- a/settings.json.template +++ b/settings.json.template @@ -18,7 +18,7 @@ "copyRight": "Copyright (c) 2016, The Healthcoin Developers. All rights reserved.", // Coin name / page heading - "coinName": "healthcoin", + "coinName": "solarcoin", // Coin symbol "coinSymbol": "HCN", @@ -75,9 +75,9 @@ // Database settings (MongoDB) "mdb": { - "user": "healthcoin", + "user": "solarcoin", "password": "password", - "database": "healthcoin", + "database": "solarcoin", "host": "localhost", "port": 27017 }, @@ -87,7 +87,7 @@ "masterAccount": "MASTER_ACCOUNT", // Master email account. - "masterEmail": "admin@healthcoin.com", + "masterEmail": "admin@solarcoin.com", // Master can encrypt the wallet "masterCanEncrypt": true