This project fully placed in Docker.
There are two ways to setup environment and run application via Docker:
-
Visual Studio Code Remote - open project in VS Code.
-
Build manually from shell on any machine with docker.
-
Install
remote-containers
Visual Studio Code extensions:> code --install-extension ms-vscode-remote.remote-containers
-
Clone this repo to your machine:
> git clone git@github.com:andrejreznik/rails-api.git
-
Open Visual Studio Code in
rails-api
folder:> cd rails-api > code .
or build manually (skip if using VS Code).
> cd rails-api > docker-compose build .
-
Prepare database:
> bin/rails db:create
-
To start
rails
server you need to start process in terminal:> bin/rails s -b 0
or simply launch application by click on
Run
->Run Without Debugging
Ctrl + F5,or via
docker-compose
command:> docker-compose exec web bin/rails s -b 0
-
Run all specs:
> rspec
-
Check all files by RuboCop:
> rubocop
See LICENSE.