Home delayed_job in rails docker is not working properly
Reply: 0

delayed_job in rails docker is not working properly

user1490
1#
user1490 Published in June 18, 2018, 5:23 pm

I have shifted my rails application to docker. Everything is working fine except the rails delayed_job. I have use delayed_job to send email. I have started my job through command docker-compose run web rake jobs:work it has started succesfully as shown in the image.

Now when I am trying to send email in console it is showing that the email is initiated as shown in the above image.

Do I have to include any line in my docker-compose.yml or Dockerfile.

My Dockerfile is :

FROM ruby:2.3.6

RUN mkdir -p /railsapp
WORKDIR /railsapp

RUN apt-get update && apt-get install -y nodejs --no-install-recommends
RUN apt-get update && apt-get install -y mysql-client  --no-install-recommends

COPY Gemfile /railsapp/

COPY Gemfile.lock /railsapp/


RUN bundle install

COPY . /railsapp

EXPOSE 3000
CMD ["rails", "server", "-b", "0.0.0.0"]

My docker-compose.yml is :

  version: '3.3'

  services:
    mysql:
      image: mysql
      restart: always
      ports:
        - "3002:3002"
      volumes:
        - /var/lib/mysql
      environment:
        - MYSQL_ROOT_PASSWORD=root
        - MYSQL_DATABASE=dev

    web:
      build: .
      environment:
        - RAILS_ENV=development
      ports:
        - '3000:3000'
      volumes:
        - .:/railsapp
      links:
        - "mysql"
      depends_on:
        - mysql

I am completely new to docker.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.316054 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO