<commit_before>---

version: '3.2'

secrets:
  DJANGO_DB_NAME:
    external: true
  DJANGO_DB_USER:
    external: true
  DJANGO_DB_PASSWORD:
    external: true
  MYSQL_ROOT_PASSWORD:
    external: true
  SECRET_KEY:
    external: true
  TWLIGHT_OAUTH_CONSUMER_KEY:
    external: true
  TWLIGHT_OAUTH_CONSUMER_SECRET:
    external: true

services:
  migrate:
    image: wikipedialibrary/twlight:branch_production
    command: bash -c "/app/bin/twlight_backup.sh && /app/bin/virtualenv_migrate.sh"
    restart: on-failure
    env_file:
      - ./conf/production.twlight.env
    volumes:
      - type: bind
        source: /data/project/prod
        target: /app/backup
    depends_on:
      - 'db'
    secrets:
      - DJANGO_DB_NAME
      - DJANGO_DB_USER
      - DJANGO_DB_PASSWORD
      - SECRET_KEY
      - TWLIGHT_OAUTH_CONSUMER_KEY
      - TWLIGHT_OAUTH_CONSUMER_SECRET
  db:
    ports:
      - "3306:3306"
  twlight:
    image: wikipedialibrary/twlight:branch_production<commit_msg>mount media dir in production migration service.<commit_after>---

version: '3.2'

secrets:
  DJANGO_DB_NAME:
    external: true
  DJANGO_DB_USER:
    external: true
  DJANGO_DB_PASSWORD:
    external: true
  MYSQL_ROOT_PASSWORD:
    external: true
  SECRET_KEY:
    external: true
  TWLIGHT_OAUTH_CONSUMER_KEY:
    external: true
  TWLIGHT_OAUTH_CONSUMER_SECRET:
    external: true

services:
  migrate:
    image: wikipedialibrary/twlight:branch_production
    command: bash -c "/app/bin/twlight_backup.sh && /app/bin/virtualenv_migrate.sh"
    restart: on-failure
    env_file:
      - ./conf/production.twlight.env
    volumes:
      - type: bind
        source: /data/project/prod
        target: /app/backup
      - type: bind
        source: ./media
        target: /app/media
    depends_on:
      - 'db'
    secrets:
      - DJANGO_DB_NAME
      - DJANGO_DB_USER
      - DJANGO_DB_PASSWORD
      - SECRET_KEY
      - TWLIGHT_OAUTH_CONSUMER_KEY
      - TWLIGHT_OAUTH_CONSUMER_SECRET
  db:
    ports:
      - "3306:3306"
  twlight:
    image: wikipedialibrary/twlight:branch_production
{'fraction_non_alphanumeric': 0.08513708513708514, 'fraction_numerical': 0.00962000962000962, 'mean_word_length': 2.586206896551724, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6513304', 'n_tokens_mistral': 801, 'n_tokens_neox': 790, 'n_words': 131}