Skip to content

ForSetGeorgia/Georgian-Budget-Public

Repository files navigation

This site allows users to interact with data from the Georgian-Budget project API.

Get Started

  1. Setup .env file
  2. cp .env.example .env
  3. Set NODE_ENV to 'development'
  4. Set APP_URL to https://dev-budget.forset.ge (domain name used for share)
  5. Set API_URL to https://dev-budgetapi.forset.ge (for now)
  6. Install docker
  7. docker-compose build (takes a while)
  8. docker-compose up
  9. Open localhost:8080

If you want to use the API locally, then...

  1. Change API_URL in the .env file to http://localhost:3000
  2. Setup the API app on your computer

Prepaire server

Install node, nvm, npm, yarn, pm2

nvm & node

For 16.04 use this instructions Do not forget to add output lines to .bashrc

For older instructions below source

sudo apt-get install build-essential checkinstall sudo apt-get install libssl-dev curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash exit and enter terminal back command -v nvm nvm -l nvm install v8.6.0 nvm use v8.6.0 nvm alias default node

npm

sudo apt-get update && sudo apt-get install npm

yarn

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

sudo apt-get install yarn

pm2

npm install pm2 -g information commands pm2 startup pm2 status which pm2

.bashrc

move next two lines above next four lines on server in .bashrc

[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"  # This loads nvm

case $- in
    *i*) ;;
      *) return;;
esac

. ~/.bashrc on

Deploy

  1. Add your environment-specific config to config/pm2/{env}.json and shipitfile.js.
  2. shipit staging deploy *
  3. The first deploy won't work fully, because the .env file is missing on the server. Run cp current/.env.example shared/.env and then add the necessary environment variables to .env.
  4. Run shipit staging deploy again
  5. App should be running now. Run pm2 startup to get instructions from pm2 on how to make the app server start up again whenever the server reboots.
  • if shipit is not preinstalled - install globally npm install --global shipit-cli

ReDUCKS

You may have noticed that redux reducers and actions in this repo are grouped into modules, called ducks, located in the js/ducks directory. Learn more about ducks here.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •