You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
5 years ago | |
---|---|---|
.idea | 5 years ago | |
app | 5 years ago | |
bin | 5 years ago | |
config | 5 years ago | |
db | 5 years ago | |
images | 5 years ago | |
lib/tasks | 5 years ago | |
log | 5 years ago | |
public | 5 years ago | |
tmp | 5 years ago | |
vendor | 5 years ago | |
.gitignore | 5 years ago | |
.ruby-version | 5 years ago | |
Dockerfile. | 5 years ago | |
Gemfile | 5 years ago | |
Gemfile.lock | 5 years ago | |
README.md | 5 years ago | |
RailsTest.iml | 5 years ago | |
Rakefile | 5 years ago | |
config.ru | 5 years ago |
README.md
Rails Whenever Dockerfile Demo
every 1.minute do
command "echo Hello >> /app/log/cron.log"
end
FROM ruby:2.5
RUN apt-get update && \
apt-get install -y cron && \
rm -rf /var/lib/apt/lists/*
ENV LANG C.UTF-8
ENV RAILS_ENV production
ENV INSTALL_PATH /app
RUN mkdir $INSTALL_PATH && \
mkdir log && touch /log/cron.log
ADD Gemfile Gemfile.lock ./
WORKDIR $INSTALL_PATH
RUN bundle install
COPY . .
RUN bundle exec whenever --update-crontab
CMD cron && rails server -e $stdout.sync=true