Linked Questions

Popular Questions

How to run cronjobs and rackup

Asked by At

My problem is when run cron and rackup service for ruby sinatra in docker.

file cronjobs * * * * * cd /app && rake parser >> cron.log 2>&1

file Dockerfile

RUN apk update && apk upgrade
RUN apk add --update build-base \ 
mariadb-dev bash dcron

RUN gem install bundler 

COPY Gemfile .
RUN bundle install && bundle clean
COPY .  /app
COPY cronjobs /etc/crontabs/root


CMD crond -f && rackup --host -p 80

When run docker only one service is functional

Related Questions