Pimenta
Pimenta

Reputation: 91

Ruby on rails on docker-compose

I'm having problems with a project, using docker-compose, I always use the same Dockerfile and docker-compose.yml in all projects, just changing the version of ruby. However, in just ONE of these projects, I no longer update what I modify in the code, every change I make always reflected, but now it stopped suddenly, and only in one project. I have already refitted build, I have removed all the containers, all the images, downloaded the project again ... and nothing! Just refresh if I stop and upload the container again!

docker-compose.yml :

version: '2'
services:
  postgres:
    image: 'postgres:9.5'
  web:
    build: .
    command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
    volumes:
      - .:/myapp
    ports:
      - "3000:3000"
    depends_on:
      - postgres

Dockerfile

FROM ruby:2.3.1
RUN apt-get update -qq && apt-get install -y build-essential libpq-    dev nodejs
RUN mkdir /myapp
WORKDIR /myapp
ADD Gemfile /myapp/Gemfile
ADD Gemfile.lock /myapp/Gemfile.lock
RUN bundle install

ADD . /myapp

Upvotes: 2

Views: 509

Answers (1)

Pimenta
Pimenta

Reputation: 91

Resolved, in config/environments/development.rb it has to be: config.cache_classes = false

Upvotes: 3

Related Questions