<commit_before># docker-compose for Socorro development.
#
# Note: Requires docker-comopse 1.10+.
version: "2"
services:
  # Socorro app image
  app:
    build:
      context: .
      dockerfile: ./docker/Dockerfile
    image: local/socorro_app
    env_file:
      - docker/config/local_dev.env
      - docker/config/never_on_a_server.env
      - my.env
    volumes:
      - .:/app

  # For development

  processor:
    image: local/socorro_app
    env_file:
      - docker/config/local_dev.env
      - docker/config/never_on_a_server.env
      - my.env
    depends_on:
      - statsd
      - localstack-s3
      - elasticsearch
      - rabbitmq
    command: ["processor"]
    volumes:
      - .:/app

  crontabber:
    image: local/socorro_app
    env_file:
      - docker/config/local_dev.env
      - docker/config/never_on_a_server.env
      - my.env
    depends_on:
      - statsd
      - postgresql
      - elasticsearch
    command: ["crontabber"]
    volumes:
      - .:/app

  webapp:
    image: local/socorro_app
    env_file:
      - docker/config/local_dev.env
      - docker/config/never_on_a_server.env
      - my.env
    depends_on:
      - statsd
      - localstack-s3
      - postgresql
      - elasticsearch
      - rabbitmq
      - memcached
      - oidcprovider
    command: ["webapp", "--dev"]
    ports:
      - "8000:8000"
    volumes:
      - .:/app

  # Webpack watcher
  webpack:
    image: local/socorro_app
    working_dir: /app/webapp-django/
    command: ["webpack"]
    volumes:
      - .:/app

  # OpenID Connect provider
  oidcprovider:
    build:
      context: .
      dockerfile: ./docker/Dockerfile.oidcprovider
    image: local/socorro_oidcprovider
    ports:
      - "8080:8080"

  # Docs building container
  docs:
    build:
      context: .
      dockerfile: ./docker/Dockerfile.docs
    image: local/socorro_docs
    volumes:
      - .:/app

  # For running tests in as we transition to Python 3
  testpython3:
    build:
      context: .
      dockerfile: ./docker/Dockerfile.python3
    image: local/socorro_python3
    env_file:
      - docker/config/local_dev.env
      - docker/config/never_on_a_server.env
      - my.env
    depends_on:
      - statsd
      - localstack-s3
      - postgresql
      - elasticsearch
      - rabbitmq
      - memcached
    volumes:
      - .:/app

  # -----------------------------
  # External services
  # -----------------------------

  # https://hub.docker.com/r/mozilla/antenna/
  #
  # This seems weird, but for the purposes of Socorro, we should treat
  # it as an external service.
  #
  # This uses the development ./bin/run_web.sh script from the Antenna
  # container since that creates a bucket before running Antenna.
  antenna:
    image: mozilla/antenna:latest
    environment:
      - LOGGING_LEVEL=INFO
      - CRASHSTORAGE_CLASS=antenna.ext.s3.crashstorage.S3CrashStorage
      - CRASHSTORAGE_ENDPOINT_URL=http://localstack-s3:5000
      - CRASHSTORAGE_REGION=us-west-2
      - CRASHSTORAGE_ACCESS_KEY=foo
      - CRASHSTORAGE_SECRET_ACCESS_KEY=foo
      - CRASHSTORAGE_BUCKET_NAME=dev_bucket
    depends_on:
      - localstack-s3
    expose:
      - 8000
    ports:
      - "8888:8000"
    command: ./bin/run_web.sh

  # https://hub.docker.com/r/hopsoft/graphite-statsd/
  statsd:
    image: hopsoft/graphite-statsd
    ports:
      - "8081:80"
      - "2003-2004:2003-2004"
      - "2023-2024:2023-2024"
      - "8125:8125/udp"
      - "8126:8126"

  # https://hub.docker.com/_/elasticsearch/
  # Note: This image is deprecated, but the new one requires fiddling.
  elasticsearch:
    image: mozilla/socorro_elasticsearch:1.4.5
    ports:
      - "9200:9200"
      - "9300:9300"

  # https://hub.docker.com/_/rabbitmq/
  rabbitmq:
    image: rabbitmq:3.6.9
    environment:
      - RABBITMQ_DEFAULT_USER=rabbituser
      - RABBITMQ_DEFAULT_PASS=<PASSWORD>
      - RABBITMQ_DEFAULT_VHOST=rabbitvhost

  # https://hub.docker.com/_/postgres/
  postgresql:
    image: postgres:9.4
    ports:
      - "8574:5432"
    environment:
      # Create the superuser account
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=<PASSWORD>
      - POSTGRES_DB=breakpad

  # https://hub.docker.com/r/localstack/localstack/
  # localstack running a fake S3
  localstack-s3:
    image: localstack/localstack:0.7.4
    environment:
      - SERVICES=s3:5000
      - DEFAULT_REGION=us-west-2
      - HOSTNAME=localstack-s3
    ports:
      - "5000:5000"

  # https://hub.docker.com/_/memcached/
  memcached:
    image: memcached:1.5.1
    ports:
      - "11211:11211"<commit_msg>bug 1497956: upgrade postgres to 9.5 in local dev environment<commit_after># docker-compose for Socorro development.
#
# Note: Requires docker-comopse 1.10+.
version: "2"
services:
  # Socorro app image
  app:
    build:
      context: .
      dockerfile: ./docker/Dockerfile
    image: local/socorro_app
    env_file:
      - docker/config/local_dev.env
      - docker/config/never_on_a_server.env
      - my.env
    volumes:
      - .:/app

  # For development

  processor:
    image: local/socorro_app
    env_file:
      - docker/config/local_dev.env
      - docker/config/never_on_a_server.env
      - my.env
    depends_on:
      - statsd
      - localstack-s3
      - elasticsearch
      - rabbitmq
    command: ["processor"]
    volumes:
      - .:/app

  crontabber:
    image: local/socorro_app
    env_file:
      - docker/config/local_dev.env
      - docker/config/never_on_a_server.env
      - my.env
    depends_on:
      - statsd
      - postgresql
      - elasticsearch
    command: ["crontabber"]
    volumes:
      - .:/app

  webapp:
    image: local/socorro_app
    env_file:
      - docker/config/local_dev.env
      - docker/config/never_on_a_server.env
      - my.env
    depends_on:
      - statsd
      - localstack-s3
      - postgresql
      - elasticsearch
      - rabbitmq
      - memcached
      - oidcprovider
    command: ["webapp", "--dev"]
    ports:
      - "8000:8000"
    volumes:
      - .:/app

  # Webpack watcher
  webpack:
    image: local/socorro_app
    working_dir: /app/webapp-django/
    command: ["webpack"]
    volumes:
      - .:/app

  # OpenID Connect provider
  oidcprovider:
    build:
      context: .
      dockerfile: ./docker/Dockerfile.oidcprovider
    image: local/socorro_oidcprovider
    ports:
      - "8080:8080"

  # Docs building container
  docs:
    build:
      context: .
      dockerfile: ./docker/Dockerfile.docs
    image: local/socorro_docs
    volumes:
      - .:/app

  # For running tests in as we transition to Python 3
  testpython3:
    build:
      context: .
      dockerfile: ./docker/Dockerfile.python3
    image: local/socorro_python3
    env_file:
      - docker/config/local_dev.env
      - docker/config/never_on_a_server.env
      - my.env
    depends_on:
      - statsd
      - localstack-s3
      - postgresql
      - elasticsearch
      - rabbitmq
      - memcached
    volumes:
      - .:/app

  # -----------------------------
  # External services
  # -----------------------------

  # https://hub.docker.com/r/mozilla/antenna/
  #
  # This seems weird, but for the purposes of Socorro, we should treat
  # it as an external service.
  #
  # This uses the development ./bin/run_web.sh script from the Antenna
  # container since that creates a bucket before running Antenna.
  antenna:
    image: mozilla/antenna:latest
    environment:
      - LOGGING_LEVEL=INFO
      - CRASHSTORAGE_CLASS=antenna.ext.s3.crashstorage.S3CrashStorage
      - CRASHSTORAGE_ENDPOINT_URL=http://localstack-s3:5000
      - CRASHSTORAGE_REGION=us-west-2
      - CRASHSTORAGE_ACCESS_KEY=foo
      - CRASHSTORAGE_SECRET_ACCESS_KEY=foo
      - CRASHSTORAGE_BUCKET_NAME=dev_bucket
    depends_on:
      - localstack-s3
    expose:
      - 8000
    ports:
      - "8888:8000"
    command: ./bin/run_web.sh

  # https://hub.docker.com/r/hopsoft/graphite-statsd/
  statsd:
    image: hopsoft/graphite-statsd
    ports:
      - "8081:80"
      - "2003-2004:2003-2004"
      - "2023-2024:2023-2024"
      - "8125:8125/udp"
      - "8126:8126"

  # https://hub.docker.com/_/elasticsearch/
  # Note: This image is deprecated, but the new one requires fiddling.
  elasticsearch:
    image: mozilla/socorro_elasticsearch:1.4.5
    ports:
      - "9200:9200"
      - "9300:9300"

  # https://hub.docker.com/_/rabbitmq/
  rabbitmq:
    image: rabbitmq:3.6.9
    environment:
      - RABBITMQ_DEFAULT_USER=rabbituser
      - RABBITMQ_DEFAULT_PASS=<PASSWORD>
      - RABBITMQ_DEFAULT_VHOST=rabbitvhost

  # https://hub.docker.com/_/postgres/
  postgresql:
    image: postgres:9.5
    ports:
      - "8574:5432"
    environment:
      # Create the superuser account
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=<PASSWORD>
      - POSTGRES_DB=breakpad

  # https://hub.docker.com/r/localstack/localstack/
  # localstack running a fake S3
  localstack-s3:
    image: localstack/localstack:0.7.4
    environment:
      - SERVICES=s3:5000
      - DEFAULT_REGION=us-west-2
      - HOSTNAME=localstack-s3
    ports:
      - "5000:5000"

  # https://hub.docker.com/_/memcached/
  memcached:
    image: memcached:1.5.1
    ports:
      - "11211:11211"
{'fraction_non_alphanumeric': 0.11748038360941587, 'fraction_numerical': 0.03738012205754141, 'mean_word_length': 2.0377358490566038, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 14, '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': '4581122', 'n_tokens_mistral': 3526, 'n_tokens_neox': 3205, 'n_words': 560}