<commit_before>version: "2"
services:
  cc-server-web:
    build: ./cc-server-image
    command: "python3 -u -m cc_server.services.web"
    ports:
      - "127.0.0.1:8000:8000"
    volumes:
      - ./config/cc-server:/home/ccuser/.config/cc-server:ro,z
      - ../cc_server:/home/ccuser/cc_server:ro,z
    links:
      - mongo
      - cc-server-master
      - cc-server-log
    tty: true
    user: ccuser

  cc-server-master:
    build: ./cc-server-image
    command: "python3 -u -m cc_server.services.master"
    volumes:
      - ./config/cc-server:/home/ccuser/.config/cc-server:ro,z
      - ../cc_server:/home/ccuser/cc_server:ro,z
      - ~/.docker/machine:/home/ccuser/.docker/machine:ro,z
    links:
      - mongo
      - dind
      - cc-server-log
    depends_on:
      - mongo-seed
    tty: true
    user: ccuser

  cc-server-log:
    build: ./cc-server-image
    command: "python3 -u -m cc_server.services.log"
    volumes:
      - ./config/cc-server:/home/ccuser/.config/cc-server:ro,z
      - ../cc_server:/home/ccuser/cc_server:ro,z
      - ~/.cc_server_compose/logs:/home/ccuser/.cc_server/logs:rw,z
    tty: true
    user: ccuser

  mongo:
    image: mongo
    ports:
      - "127.0.0.1:27017:27017"
    volumes:
      - ~/.cc_server_compose/mongo/db:/data/db:rw,z
    tty: true

  mongo-seed:
    build: ./mongo-seed
    volumes:
      - ./config/cc-server:/root/.config/cc-server:ro,z
      - ./mongo-seed/mongo_seed:/opt/mongo_seed:ro,z
    command: "python3 -u -m mongo_seed"
    links:
      - mongo
    tty: true

  dind:
    image: docker:dind
    privileged: true
    command: "dockerd --insecure-registry=registry:5000 -H tcp://0.0.0.0:2375"
    volumes:
      - ~/.cc_server_compose/dind/docker:/var/lib/docker:rw,z
    links:
      - registry
      - file-server
    tty: true

  file-server:
    build: ./cc-server-image
    command: "python3 -m cc_server.services.files"
    ports:
      - "127.0.0.1:8003:8003"
    volumes:
      - ../cc_server:/home/ccuser/cc_server:ro,z
      - ~/.cc_server_compose/input_files:/home/ccuser/.cc_server/input_files:ro,z
      - ~/.cc_server_compose/result_files:/home/ccuser/.cc_server/result_files:rw,z
    tty: true
    user: ccuser

  registry:
    image: registry:2
    ports:
      - "127.0.0.1:5000:5000"
    environment:
      REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY: /data
    volumes:
      - ~/.cc_server_compose/registry/data:/data:rw,z<commit_msg>cc-server-files in docker-compose with correct dependency<commit_after>version: "2"
services:
  cc-server-web:
    build: ./cc-server-image
    command: "python3 -u -m cc_server.services.web"
    ports:
      - "127.0.0.1:8000:8000"
    volumes:
      - ./config/cc-server:/home/ccuser/.config/cc-server:ro,z
      - ../cc_server:/home/ccuser/cc_server:ro,z
    links:
      - mongo
      - cc-server-master
      - cc-server-log
    tty: true
    user: ccuser

  cc-server-master:
    build: ./cc-server-image
    command: "python3 -u -m cc_server.services.master"
    volumes:
      - ./config/cc-server:/home/ccuser/.config/cc-server:ro,z
      - ../cc_server:/home/ccuser/cc_server:ro,z
      - ~/.docker/machine:/home/ccuser/.docker/machine:ro,z
    links:
      - mongo
      - dind
      - cc-server-log
    depends_on:
      - mongo-seed
    tty: true
    user: ccuser

  cc-server-files:
    build: ./cc-server-image
    command: "python3 -m cc_server.services.files"
    ports:
      - "127.0.0.1:8003:8003"
    volumes:
      - ../cc_server:/home/ccuser/cc_server:ro,z
      - ~/.cc_server_compose/input_files:/home/ccuser/.cc_server/input_files:ro,z
      - ~/.cc_server_compose/result_files:/home/ccuser/.cc_server/result_files:rw,z
    links:
      - cc-server-log
    tty: true
    user: ccuser

  cc-server-log:
    build: ./cc-server-image
    command: "python3 -u -m cc_server.services.log"
    volumes:
      - ./config/cc-server:/home/ccuser/.config/cc-server:ro,z
      - ../cc_server:/home/ccuser/cc_server:ro,z
      - ~/.cc_server_compose/logs:/home/ccuser/.cc_server/logs:rw,z
    tty: true
    user: ccuser

  mongo:
    image: mongo
    ports:
      - "127.0.0.1:27017:27017"
    volumes:
      - ~/.cc_server_compose/mongo/db:/data/db:rw,z
    tty: true

  mongo-seed:
    build: ./mongo-seed
    volumes:
      - ./config/cc-server:/root/.config/cc-server:ro,z
      - ./mongo-seed/mongo_seed:/opt/mongo_seed:ro,z
    command: "python3 -u -m mongo_seed"
    links:
      - mongo
    tty: true

  dind:
    image: docker:dind
    privileged: true
    command: "dockerd --insecure-registry=registry:5000 -H tcp://0.0.0.0:2375"
    volumes:
      - ~/.cc_server_compose/dind/docker:/var/lib/docker:rw,z
    links:
      - registry
      - file-server
    tty: true

  registry:
    image: registry:2
    ports:
      - "127.0.0.1:5000:5000"
    environment:
      REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY: /data
    volumes:
      - ~/.cc_server_compose/registry/data:/data:rw,z
{'fraction_non_alphanumeric': 0.15256644349766688, 'fraction_numerical': 0.03124365997159667, 'mean_word_length': 2.16025641025641, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 10, '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': '3857511', 'n_tokens_mistral': 2032, 'n_tokens_neox': 1900, 'n_words': 266}