- Docker
- Editor
- Dockerfile
FROM ruby:2.6.5
RUN curl -sL https://deb.nodesource.com/setup_13.x | bash -
RUN apt-get update && \
apt-get install -y vim nodejs
RUN npm install -g yarn
WORKDIR /workshop_treinadev
- docker-compose.yml
version: '3.0'
services:
web:
build: .
volumes:
- .:/workshop_treinadev
links:
- db
env_file: .env
db:
image: postgres
env_file: .env
- .env
DB_HOST=db
DB_USERNAME=postgres
docker-compose build
Entre no container da aplicação
docker-compose run web bash
Crie o projeto
gem install rails
rails new . -T --database=postgresql
pry-byebug
capybara
rspec-rails
factory_bot_rails
devise
- Dockerfile
FROM ruby:2.6.5
RUN curl -sL https://deb.nodesource.com/setup_13.x | bash -
RUN apt-get update && \
apt-get install -y vim nodejs
RUN npm install -g yarn
WORKDIR /workshop_treinadev
ADD . /workshop_treinadev
RUN bundle install
Execute o build
novamente
docker-compose build
Dentro do container web execute:
rails g rspec:install
rails g devise:install
Adicione as linhas
config.include FactoryBot::Syntax::Methods
config.include Warden::Test::Helpers