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-containersVisual Studio Code extensions:> code --install-extension ms-vscode-remote.remote-containers -
Clone this repo to your machine:
> git clone [email protected]:andrejreznik/rails-api.git
-
Open Visual Studio Code in
rails-apifolder:> 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
railsserver you need to start process in terminal:> bin/rails s -b 0or simply launch application by click on
Run->Run Without DebuggingCtrl + F5,or via
docker-composecommand:> docker-compose exec web bin/rails s -b 0
-
Run all specs:
> rspec
-
Check all files by RuboCop:
> rubocop
See LICENSE.