Skip to content
Artem Chubchenko edited this page Feb 11, 2021 · 3 revisions

Install docker and docker-compose

sudo apt-get install docker docker-compose

Run the project

docker-compose up

Running the tests

bin/docker rspec

Building API documentation

Building api documentation is pretty easy, just run:

bin/docker rails api:doc:v1

and find it into:

./public/api/docs/v1/index.html

Running Rails console

bin/docker rails c

Alternatively

You may set up and run the project via DIP (Docker Interaction Process)

Homebrew

You can use Homebrew on macOS (or Linux).

Today Homebrew tap for DIP is located at https://github.com/bibendi/homebrew-dip

brew tap bibendi/dip
brew install dip

Ruby Gem

gem install dip

Usage

dip --help
dip SUBCOMMAND --help

dip ls

List all available run commands.

dip ls

bash     # Open the Bash shell in app's container
rails    # Run Rails command
rails s  # Run Rails server at http://localhost:3000

In order to use DIP commands, you have to enter Dockerfile path (e.g. /docker/development).

To run single commands use the ones defined within the interaction section in dip.yml

You can call dip provision command to run predefined steps within this instruction

To run up a single service use:

dip compose up -d service_name

To shut down all running containers:

dip compose down --volumes

To rebuild current image:

dip compose up -d --build server_app (or docker-compose up ...)

You can check all containers and their statuses docker ps -a

Find more about project and its options following DIP page

Clone this wiki locally