version: "3"
services:
  amocrm:
    hostname: squiz-amocrm
    container_name: squiz-amocrm
    image: $CI_REGISTRY_IMAGE/main:$CI_COMMIT_REF_SLUG.$CI_PIPELINE_ID
    tty: true
    environment:
      HTTP_HOST: '0.0.0.0'
      HTTP_PORT: 1488
      REDIS_ADDR: '10.8.0.9:6379'
      REDIS_PASS: 'Redalert2'
      REDIS_DB: 4
      PENA_SOCIAL_AUTH_URL: 'http://10.8.0.8:59344/amocrm/auth'

      PUBLIC_ACCESS_SECRET_KEY: $JWT_PUBLIC_KEY
      PG_CRED: 'host=10.8.0.9 port=5433 user=squiz password=Redalert2 dbname=squiz sslmode=disable'
      PUBLIC_KEY: $PEM_PUB_USERID
      PRIVATE_KEY: $PEM_PRIV_USERID
      KAFKA_BROKERS: 10.8.0.8:9092
      KAFKA_TOPIC: "squiz-amocrm"
      GRPC_HOST: "0.0.0.0"
      RETURN_URL: "https://quiz.pena.digital/squiz/amocrm/oauth"
      REDIRECT_URL: "https://quiz.pena.digital/integrations"
      INTEGRATION_ID: "48fc50c2-67a6-4619-bd54-23311619cc79"
      INTEGRATION_SECRET: "YRvT2CRFprN7r5N021YTSe1LKT0HJdhaE6GJbGYs08q9llyDrwE5FMuM3HXl7CZ0"
    ports: 
      - 10.6.0.26:1492:1488
  refresher:
    hostname: amocrm-refresher
    container_name: amocrm-refresher
    image: $CI_REGISTRY_IMAGE/main:$CI_COMMIT_REF_SLUG.$CI_PIPELINE_ID
    tty: true
    command: /token_refresher
    environment:
      HTTP_HOST: '0.0.0.0'
      HTTP_PORT: 1488
      REDIS_ADDR: '10.8.0.9:6379'
      REDIS_PASS: 'Redalert2'
      REDIS_DB: 4
      PENA_SOCIAL_AUTH_URL: 'http://10.8.0.8:59344/amocrm/auth'

      PUBLIC_ACCESS_SECRET_KEY: $JWT_PUBLIC_KEY
      PG_CRED: 'host=10.8.0.9 port=5433 user=squiz password=Redalert2 dbname=squiz sslmode=disable'
      PUBLIC_KEY: $PEM_PUB_USERID
      PRIVATE_KEY: $PEM_PRIV_USERID
      KAFKA_BROKERS: 10.8.0.8:9092
      KAFKA_TOPIC: "squiz-amocrm"
      GRPC_HOST: "0.0.0.0"
      RETURN_URL: "https://quiz.pena.digital/squiz/amocrm/oauth"
      REDIRECT_URL: "https://quiz.pena.digital/integrations"
      INTEGRATION_ID: "48fc50c2-67a6-4619-bd54-23311619cc79"
      INTEGRATION_SECRET: "YRvT2CRFprN7r5N021YTSe1LKT0HJdhaE6GJbGYs08q9llyDrwE5FMuM3HXl7CZ0"

