<commit_before># Copyright (c) Mainflux
# SPDX-License-Identifier: Apache-2.0

version: "3.7"

networks:
  mainflux-base-net:
    driver: bridge

volumes:
  mainflux-users-db-volume:
  mainflux-things-db-volume:
  mainflux-things-redis-volume:
  mainflux-es-redis-volume:

services:
  nginx:
    image: nginx:1.16.0-alpine
    container_name: mainflux-nginx
    restart: on-failure
    volumes:
      - ./nginx/nginx-${AUTH-key}.conf:/etc/nginx/nginx.conf.template
      - ./nginx/entrypoint.sh:/entrypoint.sh
      - ./nginx/snippets:/etc/nginx/snippets
      - ./ssl/authorization.js:/etc/nginx/authorization.js
      - ./ssl/certs/mainflux-server.crt:/etc/ssl/certs/mainflux-server.crt
      - ./ssl/certs/ca.crt:/etc/ssl/certs/ca.crt
      - ./ssl/certs/mainflux-server.key:/etc/ssl/private/mainflux-server.key
      - ./ssl/dhparam.pem:/etc/ssl/certs/dhparam.pem
    ports:
      - ${MF_NGINX_HTTP_PORT}:${MF_NGINX_HTTP_PORT}
      - ${MF_NGINX_SSL_PORT}:${MF_NGINX_SSL_PORT}
      - ${MF_NGINX_MQTT_PORT}:${MF_NGINX_MQTT_PORT}
      - ${MF_NGINX_MQTTS_PORT}:${MF_NGINX_MQTTS_PORT}
    networks:
      - mainflux-base-net
    env_file:
      - ../.env
    command: /entrypoint.sh
    depends_on:
      - things
      - users
      - http-adapter
      - ws-adapter

  nats:
    image: nats:1.3.0
    container_name: mainflux-nats
    restart: on-failure
    networks:
      - mainflux-base-net

  users-db:
    image: postgres:10.8-alpine
    container_name: mainflux-users-db
    restart: on-failure
    environment:
      POSTGRES_USER: ${MF_USERS_DB_USER}
      POSTGRES_PASSWORD: ${MF_USERS_DB_PASS}
      POSTGRES_DB: ${MF_USERS_DB}
    networks:
      - mainflux-base-net
    volumes:
      - mainflux-users-db-volume:/var/lib/postgresql/data

  users:
    image: mainflux/users:latest
    container_name: mainflux-users
    volumes:
      - ../users/emailer/templates/${MF_EMAIL_TEMPLATE}:${MF_EMAIL_TEMPLATE}
    depends_on:
      - users-db
    expose:
      - ${MF_USERS_GRPC_PORT}
    restart: on-failure
    environment:
      MF_USERS_LOG_LEVEL: ${MF_USERS_LOG_LEVEL}
      MF_USERS_DB_HOST: users-db
      MF_USERS_DB_PORT: ${MF_USERS_DB_PORT}
      MF_USERS_DB_USER: ${MF_USERS_DB_USER}
      MF_USERS_DB_PASS: ${MF_USERS_DB_PASS}
      MF_USERS_DB: ${MF_USERS_DB}
      MF_USERS_HTTP_PORT: ${MF_USERS_HTTP_PORT}
      MF_USERS_GRPC_PORT: ${MF_USERS_GRPC_PORT}
      MF_USERS_SECRET: ${MF_USERS_SECRET}
      MF_JAEGER_URL: ${MF_JAEGER_URL}
      MF_EMAIL_DRIVER: ${MF_EMAIL_DRIVER}
      MF_EMAIL_HOST: ${MF_EMAIL_HOST}
      MF_EMAIL_PORT: ${MF_EMAIL_PORT}
      MF_EMAIL_USERNAME: ${MF_EMAIL_USERNAME}
      MF_EMAIL_PASSWORD: ${<PASSWORD>}
      MF_EMAIL_FROM_ADDRESS: ${MF_EMAIL_FROM_ADDRESS}
      MF_EMAIL_FROM_NAME: ${MF_EMAIL_FROM_NAME}
      MF_TOKEN_SECRET: ${MF_TOKEN_SECRET}
      MF_TOKEN_DURATION: ${MF_TOKEN_DURATION}
      MF_TOKEN_RESET_ENDPOINT: ${MF_TOKEN_RESET_ENDPOINT}
      MF_EMAIL_TEMPLATE: ${MF_EMAIL_TEMPLATE}
    ports:
      - ${MF_USERS_HTTP_PORT}:${MF_USERS_HTTP_PORT}
    networks:
      - mainflux-base-net

  things-db:
    image: postgres:10.8-alpine
    container_name: mainflux-things-db
    restart: on-failure
    environment:
      POSTGRES_USER: ${MF_THINGS_DB_USER}
      POSTGRES_PASSWORD: ${MF_THINGS_DB_PASS}
      POSTGRES_DB: ${MF_THINGS_DB}
    networks:
      - mainflux-base-net
    volumes:
      - mainflux-things-db-volume:/var/lib/postgresql/data

  things-redis:
    image: redis:5.0-alpine
    container_name: mainflux-things-redis
    restart: on-failure
    networks:
      - mainflux-base-net
    volumes:
      - mainflux-things-redis-volume:/data

  things:
    image: mainflux/things:latest
    container_name: mainflux-things
    depends_on:
      - things-db
      - users
    restart: on-failure
    environment:
      MF_THINGS_LOG_LEVEL: ${MF_THINGS_LOG_LEVEL}
      MF_THINGS_DB_HOST: things-db
      MF_THINGS_DB_PORT: ${MF_THINGS_DB_PORT}
      MF_THINGS_DB_USER: ${MF_THINGS_DB_USER}
      MF_THINGS_DB_PASS: ${MF_THINGS_DB_PASS}
      MF_THINGS_DB: ${MF_THINGS_DB}
      MF_THINGS_CACHE_URL: things-redis:${MF_REDIS_TCP_PORT}
      MF_THINGS_ES_URL: es-redis:${MF_REDIS_TCP_PORT}
      MF_THINGS_HTTP_PORT: ${MF_THINGS_HTTP_PORT}
      MF_THINGS_AUTH_HTTP_PORT: ${MF_THINGS_AUTH_HTTP_PORT}
      MF_THINGS_AUTH_GRPC_PORT: ${MF_THINGS_AUTH_GRPC_PORT}
      MF_USERS_URL: users:${MF_USERS_GRPC_PORT}
      MF_THINGS_SECRET: ${MF_THINGS_SECRET}
      MF_JAEGER_URL: ${MF_JAEGER_URL}
    ports:
      - ${MF_THINGS_HTTP_PORT}:${MF_THINGS_HTTP_PORT}
      - ${MF_THINGS_AUTH_HTTP_PORT}:${MF_THINGS_AUTH_HTTP_PORT}
      - ${MF_THINGS_AUTH_GRPC_PORT}:${MF_THINGS_AUTH_GRPC_PORT}
    networks:
      - mainflux-base-net

  jaeger:
    image: jaegertracing/all-in-one:1.13
    container_name: mainflux-jaeger
    ports:
      - ${MF_JAEGER_PORT}:${MF_JAEGER_PORT}/udp
      - ${MF_JAEGER_FRONTEND}:${MF_JAEGER_FRONTEND}
      - ${MF_JAEGER_COLLECTOR}:${MF_JAEGER_COLLECTOR}
      - ${MF_JAEGER_CONFIGS}:${MF_JAEGER_CONFIGS}
    networks:
      - mainflux-base-net

  normalizer:
    image: mainflux/normalizer:latest
    container_name: mainflux-normalizer
    restart: on-failure
    depends_on:
      - nats
    environment:
      MF_NORMALIZER_LOG_LEVEL: ${MF_NORMALIZER_LOG_LEVEL}
      MF_NATS_URL: ${MF_NATS_URL}
      MF_NORMALIZER_PORT: ${MF_NORMALIZER_PORT}
    ports:
      - ${MF_NORMALIZER_PORT}:${MF_NORMALIZER_PORT}
    networks:
      - mainflux-base-net

  ws-adapter:
    image: mainflux/ws:latest
    container_name: mainflux-ws
    depends_on:
      - things
      - nats
    restart: on-failure
    environment:
      MF_WS_ADAPTER_LOG_LEVEL: ${MF_WS_ADAPTER_LOG_LEVEL}
      MF_WS_ADAPTER_PORT: ${MF_WS_ADAPTER_PORT}
      MF_NATS_URL: ${MF_NATS_URL}
      MF_THINGS_URL: things:${MF_THINGS_AUTH_GRPC_PORT}
      MF_JAEGER_URL: ${MF_JAEGER_URL}
    ports:
      - ${MF_WS_ADAPTER_PORT}:${MF_WS_ADAPTER_PORT}
    networks:
      - mainflux-base-net

  http-adapter:
    image: mainflux/http:latest
    container_name: mainflux-http
    depends_on:
      - things
      - nats
    restart: on-failure
    environment:
      MF_HTTP_ADAPTER_LOG_LEVEL: debug<commit_msg>Remove Normalizer service from compose (#937)<commit_after># Copyright (c) Mainflux
# SPDX-License-Identifier: Apache-2.0

version: "3.7"

networks:
  mainflux-base-net:
    driver: bridge

volumes:
  mainflux-users-db-volume:
  mainflux-things-db-volume:
  mainflux-things-redis-volume:
  mainflux-es-redis-volume:

services:
  nginx:
    image: nginx:1.16.0-alpine
    container_name: mainflux-nginx
    restart: on-failure
    volumes:
      - ./nginx/nginx-${AUTH-key}.conf:/etc/nginx/nginx.conf.template
      - ./nginx/entrypoint.sh:/entrypoint.sh
      - ./nginx/snippets:/etc/nginx/snippets
      - ./ssl/authorization.js:/etc/nginx/authorization.js
      - ./ssl/certs/mainflux-server.crt:/etc/ssl/certs/mainflux-server.crt
      - ./ssl/certs/ca.crt:/etc/ssl/certs/ca.crt
      - ./ssl/certs/mainflux-server.key:/etc/ssl/private/mainflux-server.key
      - ./ssl/dhparam.pem:/etc/ssl/certs/dhparam.pem
    ports:
      - ${MF_NGINX_HTTP_PORT}:${MF_NGINX_HTTP_PORT}
      - ${MF_NGINX_SSL_PORT}:${MF_NGINX_SSL_PORT}
      - ${MF_NGINX_MQTT_PORT}:${MF_NGINX_MQTT_PORT}
      - ${MF_NGINX_MQTTS_PORT}:${MF_NGINX_MQTTS_PORT}
    networks:
      - mainflux-base-net
    env_file:
      - ../.env
    command: /entrypoint.sh
    depends_on:
      - things
      - users
      - http-adapter
      - ws-adapter

  nats:
    image: nats:1.3.0
    container_name: mainflux-nats
    restart: on-failure
    networks:
      - mainflux-base-net

  users-db:
    image: postgres:10.8-alpine
    container_name: mainflux-users-db
    restart: on-failure
    environment:
      POSTGRES_USER: ${MF_USERS_DB_USER}
      POSTGRES_PASSWORD: ${MF_USERS_DB_PASS}
      POSTGRES_DB: ${MF_USERS_DB}
    networks:
      - mainflux-base-net
    volumes:
      - mainflux-users-db-volume:/var/lib/postgresql/data

  users:
    image: mainflux/users:latest
    container_name: mainflux-users
    volumes:
      - ../users/emailer/templates/${MF_EMAIL_TEMPLATE}:${MF_EMAIL_TEMPLATE}
    depends_on:
      - users-db
    expose:
      - ${MF_USERS_GRPC_PORT}
    restart: on-failure
    environment:
      MF_USERS_LOG_LEVEL: ${MF_USERS_LOG_LEVEL}
      MF_USERS_DB_HOST: users-db
      MF_USERS_DB_PORT: ${MF_USERS_DB_PORT}
      MF_USERS_DB_USER: ${MF_USERS_DB_USER}
      MF_USERS_DB_PASS: ${MF_USERS_DB_PASS}
      MF_USERS_DB: ${MF_USERS_DB}
      MF_USERS_HTTP_PORT: ${MF_USERS_HTTP_PORT}
      MF_USERS_GRPC_PORT: ${MF_USERS_GRPC_PORT}
      MF_USERS_SECRET: ${MF_USERS_SECRET}
      MF_JAEGER_URL: ${MF_JAEGER_URL}
      MF_EMAIL_DRIVER: ${MF_EMAIL_DRIVER}
      MF_EMAIL_HOST: ${MF_EMAIL_HOST}
      MF_EMAIL_PORT: ${MF_EMAIL_PORT}
      MF_EMAIL_USERNAME: ${MF_EMAIL_USERNAME}
      MF_EMAIL_PASSWORD: ${MF_EMAIL_PASSWORD}
      MF_EMAIL_FROM_ADDRESS: ${MF_EMAIL_FROM_ADDRESS}
      MF_EMAIL_FROM_NAME: ${MF_EMAIL_FROM_NAME}
      MF_TOKEN_SECRET: ${MF_TOKEN_SECRET}
      MF_TOKEN_DURATION: ${MF_TOKEN_DURATION}
      MF_TOKEN_RESET_ENDPOINT: ${MF_TOKEN_RESET_ENDPOINT}
      MF_EMAIL_TEMPLATE: ${MF_EMAIL_TEMPLATE}
    ports:
      - ${MF_USERS_HTTP_PORT}:${MF_USERS_HTTP_PORT}
    networks:
      - mainflux-base-net

  things-db:
    image: postgres:10.8-alpine
    container_name: mainflux-things-db
    restart: on-failure
    environment:
      POSTGRES_USER: ${MF_THINGS_DB_USER}
      POSTGRES_PASSWORD: ${MF_THINGS_DB_PASS}
      POSTGRES_DB: ${MF_THINGS_DB}
    networks:
      - mainflux-base-net
    volumes:
      - mainflux-things-db-volume:/var/lib/postgresql/data

  things-redis:
    image: redis:5.0-alpine
    container_name: mainflux-things-redis
    restart: on-failure
    networks:
      - mainflux-base-net
    volumes:
      - mainflux-things-redis-volume:/data

  things:
    image: mainflux/things:latest
    container_name: mainflux-things
    depends_on:
      - things-db
      - users
    restart: on-failure
    environment:
      MF_THINGS_LOG_LEVEL: ${MF_THINGS_LOG_LEVEL}
      MF_THINGS_DB_HOST: things-db
      MF_THINGS_DB_PORT: ${MF_THINGS_DB_PORT}
      MF_THINGS_DB_USER: ${MF_THINGS_DB_USER}
      MF_THINGS_DB_PASS: ${MF_THINGS_DB_PASS}
      MF_THINGS_DB: ${MF_THINGS_DB}
      MF_THINGS_CACHE_URL: things-redis:${MF_REDIS_TCP_PORT}
      MF_THINGS_ES_URL: es-redis:${MF_REDIS_TCP_PORT}
      MF_THINGS_HTTP_PORT: ${MF_THINGS_HTTP_PORT}
      MF_THINGS_AUTH_HTTP_PORT: ${MF_THINGS_AUTH_HTTP_PORT}
      MF_THINGS_AUTH_GRPC_PORT: ${MF_THINGS_AUTH_GRPC_PORT}
      MF_USERS_URL: users:${MF_USERS_GRPC_PORT}
      MF_THINGS_SECRET: ${MF_THINGS_SECRET}
      MF_JAEGER_URL: ${MF_JAEGER_URL}
    ports:
      - ${MF_THINGS_HTTP_PORT}:${MF_THINGS_HTTP_PORT}
      - ${MF_THINGS_AUTH_HTTP_PORT}:${MF_THINGS_AUTH_HTTP_PORT}
      - ${MF_THINGS_AUTH_GRPC_PORT}:${MF_THINGS_AUTH_GRPC_PORT}
    networks:
      - mainflux-base-net

  jaeger:
    image: jaegertracing/all-in-one:1.13
    container_name: mainflux-jaeger
    ports:
      - ${MF_JAEGER_PORT}:${MF_JAEGER_PORT}/udp
      - ${MF_JAEGER_FRONTEND}:${MF_JAEGER_FRONTEND}
      - ${MF_JAEGER_COLLECTOR}:${MF_JAEGER_COLLECTOR}
      - ${MF_JAEGER_CONFIGS}:${MF_JAEGER_CONFIGS}
    networks:
      - mainflux-base-net

  ws-adapter:
    image: mainflux/ws:latest
    container_name: mainflux-ws
    depends_on:
      - things
      - nats
    restart: on-failure
    environment:
      MF_WS_ADAPTER_LOG_LEVEL: ${MF_WS_ADAPTER_LOG_LEVEL}
      MF_WS_ADAPTER_PORT: ${MF_WS_ADAPTER_PORT}
      MF_NATS_URL: ${MF_NATS_URL}
      MF_THINGS_URL: things:${MF_THINGS_AUTH_GRPC_PORT}
      MF_JAEGER_URL: ${MF_JAEGER_URL}
    ports:
      - ${MF_WS_ADAPTER_PORT}:${MF_WS_ADAPTER_PORT}
    networks:
      - mainflux-base-net

  http-adapter:
    image: mainflux/http:latest
    container_name: mainflux-http
    depends_on:
      - things
      - nats
    restart: on-failure
    environment:
      MF_HTTP_ADAPTER_LOG_LEVEL: debug
{'fraction_non_alphanumeric': 0.11079569174250647, 'fraction_numerical': 0.00392418802705185, 'mean_word_length': 3.0964432284541723, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, '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': '1748093', 'n_tokens_mistral': 5055, 'n_tokens_neox': 4851, 'n_words': 546}