Skip to content

Commit

Permalink
feat: flock migrator (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
fmorency authored Apr 2, 2024
1 parent d28d58a commit b5fda5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ COPY --from=builder /app/scripts/claim_and_migrate.sh /etc/cron.d/claim_and_migr
RUN chmod +x /etc/cron.d/claim_and_migrate.sh

# Add a cron job to run the script every minute.
RUN echo "* * * * * root /etc/cron.d/claim_and_migrate.sh >> /var/log/cron.log 2>&1" >> /etc/crontab
RUN echo "* * * * * root /usr/bin/flock -n /tmp/migrator.lock /etc/cron.d/claim_and_migrate.sh >> /var/log/cron.log 2>&1" >> /etc/crontab

# Create a log file to store the cron job output.
RUN touch /var/log/cron.log
Expand Down

0 comments on commit b5fda5e

Please sign in to comment.