<commit_before>version: "3.2"
secrets:
  server.key:
    file: ./genfiles/server.key
  server.crt:
    file: ./genfiles/server.crt
  monitor.key:
    file: ./genfiles/monitor_sign-key.pem

services:
  prometheus:
    depends_on:
      - server
      - sequencer
    image: gcr.io/key-transparency/prometheus:${TRAVIS_COMMIT}
    ports:
      - 9090:9090

  db:
    image: gcr.io/trillian-opensource-ci/db_server:latest
    ports:
      - "3306"
    environment:
      MYSQL_PASSWORD: <PASSWORD>
      MYSQL_USER: test
      MYSQL_DATABASE: test

  log-server:
    depends_on:
      - db
    image: gcr.io/trillian-opensource-ci/log_server:latest
    command: 
      - --mysql_uri=test:zaphod@tcp(db:3306)/test
      - --rpc_endpoint=0.0.0.0:8090
      - --http_endpoint=0.0.0.0:8091
      - --alsologtostderr
    ports:
      - "8090"
      - "8091"

  log-signer:
    depends_on:
      - db
    image: gcr.io/trillian-opensource-ci/log_signer:latest
    command:
      - --mysql_uri=test:zaphod@tcp(db:3306)/test
      - --http_endpoint=0.0.0.0:8091
      - --sequencer_guard_window=0s
      - --sequencer_interval=1s
      - --num_sequencers=1
      - --batch_size=50
      - --force_master=true
      - --alsologtostderr
    ports:
      - "8091"

  map-server:
    depends_on:
      - db
    image: gcr.io/trillian-opensource-ci/map_server:latest
    command:
      - --mysql_uri=test:zaphod@tcp(db:3306)/test
      - --rpc_endpoint=0.0.0.0:8090
      - --http_endpoint=0.0.0.0:8091
      - --alsologtostderr
    ports:
      - "8090"
      - "8091"

  server:
    depends_on:
      - db
      - log-server
      - map-server
    image: gcr.io/key-transparency/keytransparency-server:${TRAVIS_COMMIT}
    ports:
      - "443:8080" # json & grpc
      - "8081:8081" # metrics
    command:
      - --addr=0.0.0.0:8080
      - --db=test:zaphod@tcp(db:3306)/test
      - --log-url=log-server:8090
      - --map-url=map-server:8090
      - --tls-key=/run/secrets/server.key
      - --tls-cert=/run/secrets/server.crt<commit_msg>TODO for picking a trillian release image<commit_after>version: "3.2"
secrets:
  server.key:
    file: ./genfiles/server.key
  server.crt:
    file: ./genfiles/server.crt
  monitor.key:
    file: ./genfiles/monitor_sign-key.pem

services:
  prometheus:
    depends_on:
      - server
      - sequencer
    image: gcr.io/key-transparency/prometheus:${TRAVIS_COMMIT}
    ports:
      - 9090:9090

  db:
    # TODO(gbelvin): Select a better tag for Trillian
    image: gcr.io/trillian-opensource-ci/db_server:latest
    ports:
      - "3306"
    environment:
      MYSQL_PASSWORD: zaphod
      MYSQL_USER: test
      MYSQL_DATABASE: test

  log-server:
    depends_on:
      - db
    # TODO(gbelvin): Select a better tag for Trillian
    image: gcr.io/trillian-opensource-ci/log_server:latest
    command: 
      - --mysql_uri=test:zaphod@tcp(db:3306)/test
      - --rpc_endpoint=0.0.0.0:8090
      - --http_endpoint=0.0.0.0:8091
      - --alsologtostderr
    ports:
      - "8090"
      - "8091"

  log-signer:
    depends_on:
      - db
    # TODO(gbelvin): Select a better tag for Trillian
    image: gcr.io/trillian-opensource-ci/log_signer:latest
    command:
      - --mysql_uri=test:zaphod@tcp(db:3306)/test
      - --http_endpoint=0.0.0.0:8091
      - --sequencer_guard_window=0s
      - --sequencer_interval=1s
      - --num_sequencers=1
      - --batch_size=50
      - --force_master=true
      - --alsologtostderr
    ports:
      - "8091"

  map-server:
    depends_on:
      - db
    # TODO(gbelvin): Select a better tag for Trillian
    image: gcr.io/trillian-opensource-ci/map_server:latest
    command:
      - --mysql_uri=test:zaphod@tcp(db:3306)/test
      - --rpc_endpoint=0.0.0.0:8090
      - --http_endpoint=0.0.0.0:8091
      - --alsologtostderr
    ports:
      - "8090"
      - "8091"

  server:
    depends_on:
      - db
      - log-server
      - map-server
    image: gcr.io/key-transparency/keytransparency-server:${TRAVIS_COMMIT}
    ports:
      - "443:8080" # json & grpc
      - "8081:8081" # metrics
    command:
      - --addr=0.0.0.0:8080
      - --db=test:zaphod@tcp(db:3306)/test
      - --log-url=log-server:8090
      - --map-url=map-server:8090
      - --tls-key=/run/secrets/server.key
      - --tls-cert=/run/secrets/server.crt
{'fraction_non_alphanumeric': 0.14205868653935724, 'fraction_numerical': 0.05868653935724266, 'mean_word_length': 2.022519352568614, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 12, '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': '4181762', 'n_tokens_mistral': 1827, 'n_tokens_neox': 1693, 'n_words': 223}