This app is for technology research such as API system(GraphQL, batch requesting), admin app constructed by SPA, etc..
- Ruby
= 2.5.1
- Rails
= 5.2.0
- MySQL
= 5.7.22
- Node.js
= 10.8.0
- Docker
>= 18.06.0-ce
- direnv
>= 2.17.0
The almost dependency packages installed on Docker environment, so all you need to do is install Docker and direnv.
- Docker
- Install Docker for Mac
- direnv
- Install Homebrew
- Enter
brew install direnv
command - Describe boot up settings to
.bashrc
or.zshrc
$ cp .envrc.local.sample .envrc.local
$ vi .envrc.local
$ direnv allow .
$ cp .env.sample .env
$ vi .env
$ cp web-app/.env.sample web-app/.env
$ vi web-app/.env
$ docker-compose build
$ docker-compose run app bundle install
$ docker-compose run app rails db:setup
$ docker-compose run webapp npm install
$ docker-compose up
$ open http://localhost:$DOCKER_HOST_WEBAPP_PORT
You can execute tests by the commands listed below:
$ docker-compose run app rspec # or docker-compose exec ...
You can connect to the RDB by the commands listed below:
$ docker-compose run db mysql # or docker-compose exec ...
Or you can connect to it by your RDB client with the settings listed below:
- Host
127.0.0.1
- Port
<value of $DOCKER_HOST_DB_PORT>
- User
root
- Password
<no password>
- Database
material-collection_development
Ruby codes of this project can be formatted/linted by RuboCop:
Check
$ docker-compose run app rubocop # or docker-compose exec ...
Check & auto collect
$ docker-compose run app rubocop -a # or docker-compose exec ...
Refer to
TypeScript codes of this project can be formatted/linted by TSLint/Prettier:
Check
$ docker-compose run webapp npm run lint # or docker-compose exec ...
Check & auto collect
$ docker-compose run webapp npm run lint:fix # or docker-compose exec ...