<commit_before>---
version: '3'
networks:
  app:
services:
  postgresql:
    image: postgres:9.3
    ports:
      - "5432"
    volumes:
      - ./:/django
    environment:
      POSTGRES_PASSWORD: <PASSWORD>
      POSTGRES_USER: securethenews
      POSTGRES_DB: securethenewsdb
    user: postgres
    networks:
      app:
        aliases:
          - db

  node:
    build:
      context: .
      dockerfile: docker/NodeDockerfile
      args:
        NODE_VER: 4.8.2-alpine
        USERID: ${UID:?err}
    volumes:
      - ./:/var/www/django
    working_dir: /var/www/django
    command: /bin/ash -c "npm install && touch .node_complete && gulp watch"
    user: ${UID:?err}
    networks:
      - app

  django:
    build:
      context: .
      dockerfile: docker/DevDjangoDockerfile
      args:
        USERID: ${UID:?err}
    depends_on:
      - node
      - postgresql
    environment:
      DJANGO_DB_PASSWORD: <PASSWORD>
      DJANGO_DB_USER: securethenews
      DJANGO_DB_NAME: securethenewsdb
      DJANGO_DB_PORT: 5432
      DJANGO_DB_HOST: db
      DJANGO_LOG_PATH: /django-logs
      DJANGO_XMLTEST_OUTPUT: "yes"
      DEPLOY_ENV: dev
    working_dir: /django
    volumes:
      - ./:/django
      - ./logs:/django-logs
    ports:
      - "8000:8000"
    networks:
      app:
        aliases:
          - app<commit_msg>Bind Docker ports to localhost only<commit_after>---
version: '3'
networks:
  app:
services:
  postgresql:
    image: postgres:9.3
    ports:
      - "127.0.0.1::5432"
    volumes:
      - ./:/django
    environment:
      POSTGRES_PASSWORD: <PASSWORD>
      POSTGRES_USER: securethenews
      POSTGRES_DB: securethenewsdb
    user: postgres
    networks:
      app:
        aliases:
          - db

  node:
    build:
      context: .
      dockerfile: docker/NodeDockerfile
      args:
        NODE_VER: 4.8.2-alpine
        USERID: ${UID:?err}
    volumes:
      - ./:/var/www/django
    working_dir: /var/www/django
    command: /bin/ash -c "npm install && touch .node_complete && gulp watch"
    user: ${UID:?err}
    networks:
      - app

  django:
    build:
      context: .
      dockerfile: docker/DevDjangoDockerfile
      args:
        USERID: ${UID:?err}
    depends_on:
      - node
      - postgresql
    environment:
      DJANGO_DB_PASSWORD: <PASSWORD>
      DJANGO_DB_USER: securethenews
      DJANGO_DB_NAME: securethenewsdb
      DJANGO_DB_PORT: 5432
      DJANGO_DB_HOST: db
      DJANGO_LOG_PATH: /django-logs
      DJANGO_XMLTEST_OUTPUT: "yes"
      DEPLOY_ENV: dev
    working_dir: /django
    volumes:
      - ./:/django
      - ./logs:/django-logs
    ports:
      - "127.0.0.1:8000:8000"
    networks:
      app:
        aliases:
          - app
{'fraction_non_alphanumeric': 0.10617832038475768, 'fraction_numerical': 0.020717721050684423, 'mean_word_length': 1.8583509513742071, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 2, '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': '1313041', 'n_tokens_mistral': 1022, 'n_tokens_neox': 967, 'n_words': 188}