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 

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

EXPOSE 80

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

When run docker only one service is functional

Related Questions