<commit_before>FROM debian:jessie

MAINTAINER <NAME>

RUN \
  apt-get update && \
  apt-get install -y mysql-client cron sqlite3

# Default location for storing backups
ENV BACKUP_LOCATION "/backups"

# Default number of complete backups to retain (one backup = one db archive and one files archive)
ENV BACKUPS_RETAIN_LIMIT 10

# Default location for the log file
ENV LOG_LOCATION "/var/log/ghost-backup.log"

RUN mkdir $BACKUP_LOCATION

VOLUME $BACKUP_LOCATION

# By default, create a backup once a day at 3am
ENV BACKUP_TIME 0 3 * * *

# Setup the entrypoint script for initiating the crontab
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

# Add the backup/restore scripts
COPY backup.sh /bin/ghost-backup
COPY restore.sh /bin/ghost-restore
RUN chmod +x /bin/ghost-backup
RUN chmod +x /bin/ghost-restore

ENTRYPOINT ["/entrypoint.sh"]

#To workaround tail -F behavior (which says "has been replaced with a remote file. giving up on this name"), create and truncate log file on start up
CMD ["sh", "-c", "cron && truncate -s0 $LOG_LOCATION; tail -n0 -F $LOG_LOCATION"]<commit_msg>bump default number of backups to keep to 30<commit_after>FROM debian:jessie

MAINTAINER <NAME>

RUN \
  apt-get update && \
  apt-get install -y mysql-client cron sqlite3

# Default configuration
ENV BACKUP_LOCATION "/backups"                  # Location for storing backup archives
ENV BACKUPS_RETAIN_LIMIT 30                     # Number of recent backups to retain (one backup = one db archive and one files archive)
ENV LOG_LOCATION "/var/log/ghost-backup.log"    # Location of backup log (written after each automated backup)
ENV BACKUP_TIME 0 3 * * *                       # Backup daily at 3am

RUN mkdir $BACKUP_LOCATION

VOLUME $BACKUP_LOCATION

# Setup the entrypoint script for initiating the crontab
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

# Add the backup/restore scripts
COPY backup.sh /bin/ghost-backup
COPY restore.sh /bin/ghost-restore
RUN chmod +x /bin/ghost-backup
RUN chmod +x /bin/ghost-restore

ENTRYPOINT ["/entrypoint.sh"]

#To workaround tail -F behavior (which says "has been replaced with a remote file. giving up on this name"), create and truncate log file on start up
CMD ["sh", "-c", "cron && truncate -s0 $LOG_LOCATION; tail -n0 -F $LOG_LOCATION"]
{'fraction_non_alphanumeric': 0.08344198174706649, 'fraction_numerical': 0.007822685788787484, 'mean_word_length': 3.726899383983573, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1583189', 'n_tokens_mistral': 761, 'n_tokens_neox': 718, 'n_words': 287}