This site allows users to interact with data from the Georgian-Budget project API.
- Setup .env file
cp .env.example .env
- Set
NODE_ENV
to 'development' - Set
APP_URL
tohttps://dev-budget.forset.ge
(domain name used for share) - Set
API_URL
tohttps://dev-budgetapi.forset.ge
(for now) - Install docker
docker-compose build
(takes a while)docker-compose up
- Open localhost:8080
If you want to use the API locally, then...
- Change
API_URL
in the.env
file tohttp://localhost:3000
- Setup the API app on your computer
Install node, nvm, npm, yarn, pm2
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
sudo apt-get update && sudo apt-get install npm
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
npm install pm2 -g
information commands
pm2 startup
pm2 status
which pm2
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
- Add your environment-specific config to
config/pm2/{env}.json
andshipitfile.js
. shipit staging deploy
*- The first deploy won't work fully, because the
.env
file is missing on the server. Runcp current/.env.example shared/.env
and then add the necessary environment variables to.env
. - Run
shipit staging deploy
again - App should be running now. Run
pm2 startup
to get instructions frompm2
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
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.