Skip to content

Latest commit

 

History

History
117 lines (107 loc) · 5.4 KB

INSTALL.md

File metadata and controls

117 lines (107 loc) · 5.4 KB

Installation

  1. Install meteor and clone this repository, cd into it
  2. Run ```meteor npm install``
  3. Get a Doichain authToken and userId from your Doichain dApp via REST see: https://github.com/Doichain/dapp/blob/master/doc/en/rest-api.md#authentication or just do:
curl -H "Content-Type: application/json" -X POST -d '{"username":"admin","password":"password"}' http://localhost:4010/api/v1/login #in case your dApp runs on port 4010
  1. Configure settings.json to connect to your Doichain dApp with your credentials like so:
{
 "app": {
    "disableAccountsConfig": true
  },
  "doichain": {
    "debug": true,
    "host": "localhost",
    "port": "4010",
    "ssl": false,
    "dappLogin": {"userId": "DKykxytHpP5YzTSWm", "authToken": "JuBw_Ali7t0X9gLGLw7wfS2BBP_frq5iqDIiAMGyp-6" }
  },
  "accounts":{"emailTemplates":{"from":"bounties@doichain.org"}}
}
  1. start / update your meteor docker container (see: https://hub.docker.com/r/abernix/meteord)
export METEOR_SETTINGS=$(cat settings.json) #this might only work when restarting this container completely

meteor build --architecture=os.linux.x86_64 ../bundle/
docker run -d \
    -e ROOT_URL=https://bounties.doichain.org \
    -e MONGO_URL=mongodb://x:y@IP:27017/bounties \
    -e MAIL_URL=smtps://emailuser:emailpw@emailserver:465 \
    -e METEOR_SETTINGS \
    -p 3003:80 \
         -v /usr/src/bounties/bundle:/bundle \
         --name doichain_bounties_0.x \
          abernix/meteord:node-8-base

#for upgrades please repeat the following
meteor build --architecture=os.linux.x86_64 ../bundle/
#followed by a
docker stop doichain_bounties_0.x; docker start doichain_bounties_0.x

TODOs

  • show DOI status in userlist
    • button update user profiles requests DOI permission for all current users
    • button update user profiles requests DOI permission for all current users
  • display blocked
  • when changing state of a bounty increment state on user profile too
  • display number blocked bounty's for each user
  • display number approved bounty's for each user
  • display number cancelled bounty's for each user
  • when a bounty is longer blocked then 10 days after "blocked until"
    • don't show it anymore
    • send email to admin / bounty hunter
  • remove bounty / or disable it from local database if bounty-tag is removed from github
  • allowing the admin to put a longer/shorter time frame to block an issue
  • resize window.frame (if available) dynamically depending on the size of the underlying table (js)
  • when a bounty is longer blocked then 10 days after "blocked until" don't show it anymore
  • remove bounty / or disable it from local database if bounty-tag is removed from github
  • allowing the admin to put a longer/shorter time frame to block an issue
  • send emails to admin / bounty hunter
    • when a bounty was blocked to admin and bounty hunter
    • when a bounty was canceld to admin and bounty hunter
    • when a bounty was requested for approval to admin and bounty hunter
    • when a bounty was approved to bounty hunter
    • when bounty was not getting "request-approval" state admin should be informed by email.
  • approve bounty on github (change state to closed)
  • Add filtering options (GUI already exists)

Environment variables

The server reads from the MAIL_URL environment variable to determine how to send mail. The MAIL_URL should reference an SMTP server and use the form smtp://USERNAME:PASSWORD@HOST:PORT or smtps://USERNAME:PASSWORD@HOST:PORT

DEPLOYMENT

  • via docker: https://hub.docker.com/r/abernix/meteord#tag-variations
  • abernix/meteord:node-8-base
    • docker build -t doichain/bounties .

    • https://hub.docker.com/r/abernix/meteord (- docker run -d
      -e ROOT_URL=https://bounties.doichain.org
      -e MONGO_URL=mongodb://x:y@IP:27017/bounties
      -e MAIL_URL=smtps://emailuser:emailpw@emailserver:465
      -p 3003:80
      --name doichain_bounties
      doichain/bounties)

    • meteor build --architecture=os.linux.x86_64 ../bundle/

    • docker run -d
      -e ROOT_URL=https://bounties.doichain.org
      -e MONGO_URL=mongodb://x:y@IP:27017/bounties
      -e MAIL_URL=smtps://emailuser:emailpw@emailserver:465
      -e METEOR_SETTINGS=$(cat settings.json)
      -p 3003:80
      --name doichain_bounties
      -v /usr/src/bounties/bundle:/bundle
      --name doichain_bounties_0.4
      abernix/meteord:node-8-base

    • for upgrades please repeat meteor build --architecture=os.linux.x86_64 ../bundle/ followed by a ````docker stop doichain_bounties; docker start doichain_bounties```

      -e MONGO_OPLOG_URL=mongodb://oplog_url \

Links and useful information

Deployment