Merge branch 'improve-initial-setup-procedure' into 'master'

update readme; add helper yarn commands

See merge request saburly/gangsta/roraccounting!1
This commit was merged in pull request #1.
This commit is contained in:
Senad Uka
2020-09-04 03:20:04 +00:00
2 changed files with 17 additions and 3 deletions

View File

@@ -1,6 +1,14 @@
# README
## First-time setup
Install dependencies with `bundle install` and `yarn --cwd client install` (or enter client directory and execute `yarn install`)
Build docker image with `docker build -t roraccounting .`
## Running
docker run --name gangstadb -d -p 5432:5432 -e POSTGRES_PASSWORD=docker roraccounting
PORT=3001 bundle exec rails s
PORT=3000 yarn --cwd client start
Start docker container with Postgres DB (if not already running) : `yarn run dev-db` or
`docker run --name gangstadb -d -p 5432:5432 -e POSTGRES_PASSWORD=docker -e POSTGRES_DB=roraccounting_development roraccounting`
Start backend server : `yarn run server` or `PORT=3001 bundle exec rails s`
Start frontend with : `yarn run client` or `PORT=3000 yarn --cwd client start`

View File

@@ -10,5 +10,11 @@
},
"dependencies": {
"react-router-dom": "^5.0.1"
},
"scripts": {
"dev-db": "docker run --name gangstadb -d -p 5432:5432 -e POSTGRES_PASSWORD=docker -e POSTGRES_DB=roraccounting_development roraccounting",
"server": "PORT=3001 bundle exec rails s",
"client": "PORT=3000 yarn --cwd client start"
}
}