Skip to content

powerhome/power-web-development-interview

Repository files navigation

Table of Contents

  1. Requirements
    1. Docker
      1. OSX
      2. Debian/Ubuntu Linux
  2. Getting Started
  3. Working with Rails and docker compose
    1. Bootstrapping the application
    2. Installing application dependencies
    3. Obtaining a shell
    4. Obtaining a Rails console
    5. Starting the application and its services
    6. Stopping the application and its services
    7. Deleting all application resources

Requirements

Docker

OSX

Via homebrew

brew install --cask docker

Debian/Ubuntu Linux

https://docs.docker.com/engine/install/debian/

Getting Started

  1. git clone git@github.com:powerhome/power-web-development-interview.git
  2. cd power-web-development-interview
  3. bin/bootstrap
  4. bin/start
  5. Verify it is running http://localhost:3000

Working with Rails and docker compose

All of the dependencies to build and run the rails application are included in the web service's image - named power-web-development-interview_web. To run typical bin/rails commands inside the container use the general form:

docker compose run --rm web bash -lc "<rails-command>"

We've provided binstubs for common tasks as a convenience:

Bootstrapping the application

Tears down any exiting images, containers, networks, etc. and sets everything up from scratch.

bin/bootstrap

Installing application dependencies

bin/deps

Installs the application's Ruby and JavaScript dependencies.

Analogous to: bin/bundle && bin/yarn

Obtaining a shell

bin/shell

Starts a Bash shell inside the application container and establishes a TTY connection to it from the user's terminal.

Useful for things like generating migrations, etc.

Obtaining a Rails console

bin/console

Starts a Rails console container and establishes a TTY connection to it from the user's terminal.

Analogous to: bin/rails console

Starting the application and its services

bin/start

Starts the web application container and its supporting services - RDBMS, etc.

Analogous to: bin/rails server

Stopping the application and its services

bin/stop

Stop the web application container and its supporting services - RDBMS, etc.

Deleting all application resources

bin/cleanup

Destroys all docker resources for the application and services.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors