<commit_before>machine:

  services:
    - docker
  environment:
    HTPASSWD_USER: docker
    HTPASSWD_PASS: <PASSWORD>

dependencies:
  override:
    - docker build -t $DOCKER_USER/portofino ./registry
    - docker build -t $DOCKER_USER/portofino-proxy ./nginx

test:
  override:
    - bash portofino.sh start -y; sleep 4:
        environment:
          REGISTRY_NAME: portofino
          NGINX_NAME: portofino-proxy
          SSL_COUNTRY: DE
          SSL_STATE: Berlin
          SSL_LOCATION: Berlin
          SSL_ORGANISATION: Portofino
          SSL_ORGANISATION_UNIT: Portofino
          SSL_COMMON_NAME: localhost
    - curl --retry 2 --retry-delay 4 -ku $HTPASSWD_USER:$HTPASSWD_PASS https://localhost:5000/v2/

deployment:
  hub:
    branch: master
    commands:
      - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
      - docker push circleci/elasticsearch<commit_msg>CircleCI docker deploy<commit_after>machine:

  services:
    - docker
  environment:
    HTPASSWD_USER: docker
    HTPASSWD_PASS: <PASSWORD>
    REGISTRY_NAME: portofino
    NGINX_NAME: portofino-proxy

dependencies:
  override:
    - docker build -t $DOCKER_USER/$REGISTRY_NAME:latest ./registry
    - docker build -t $DOCKER_USER/$NGINX_NAME:latest ./nginx

test:
  override:
    - bash portofino.sh start -y; sleep 4:
        environment:
          SSL_COUNTRY: DE
          SSL_STATE: Berlin
          SSL_LOCATION: Berlin
          SSL_ORGANISATION: Portofino
          SSL_ORGANISATION_UNIT: Portofino
          SSL_COMMON_NAME: localhost
    - curl --retry 2 --retry-delay 4 -ku $HTPASSWD_USER:$HTPASSWD_PASS https://localhost:5000/v2/

deployment:
  hub:
    branch: master
    commands:
      - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
      - docker push $DOCKER_USER/$REGISTRY_NAME:latest
      - docker push $DOCKER_USER/$NGINX_NAME:latest
{'fraction_non_alphanumeric': 0.08288770053475936, 'fraction_numerical': 0.008556149732620321, 'mean_word_length': 2.611969111969112, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '4244149', 'n_tokens_mistral': 680, 'n_tokens_neox': 636, 'n_words': 142}