name: adapter-1c

services:
  adapter-1c-rest:
    build:
      context: ../../../../plugins/1c
      dockerfile: connector/Dockerfile
    image: ${ADAPTER_1C_IMAGE:-adapter-1c-rest:latest}
    container_name: ${ADAPTER_1C_CONTAINER_NAME:-adapter-1c-rest}
    restart: unless-stopped
    ports:
      - "${ADAPTER_1C_HOST_PORT:-8011}:8011"
    volumes:
      - adapter-1c-data:/data
    environment:
      ONEC_ADAPTER_HOST: 0.0.0.0
      ONEC_ADAPTER_PORT: 8011
      ONEC_ADAPTER_SERVICE_TOKEN: ${ONEC_ADAPTER_SERVICE_TOKEN:-}
      ONEC_ADAPTER_ALLOW_UNAUTHENTICATED_ADMIN: ${ONEC_ADAPTER_ALLOW_UNAUTHENTICATED_ADMIN:-true}
      ONEC_SQL_BASES_JSON: ${ONEC_SQL_BASES_JSON:-}
      ONEC_SQL_BASES_JSON_FILE: ${ONEC_SQL_BASES_JSON_FILE:-/data/onec-sql-bases.json}
      ONEC_INFOBASE_USER_ADMIN_BASES_JSON: ${ONEC_INFOBASE_USER_ADMIN_BASES_JSON:-}
      ONEC_INFOBASE_USER_ADMIN_BASES_JSON_FILE: ${ONEC_INFOBASE_USER_ADMIN_BASES_JSON_FILE:-/data/onec-infobase-user-admin.json}
      ONEC_INFOBASE_USER_ADMIN_TOKEN_UPO_TEST: ${ONEC_INFOBASE_USER_ADMIN_TOKEN_UPO_TEST:-}
      ONEC_INFOBASE_USER_ADMIN_ALLOW_UNAUTHENTICATED: ${ONEC_INFOBASE_USER_ADMIN_ALLOW_UNAUTHENTICATED:-false}
      ONEC_REPOSITORY_RUNNER_TOKEN: ${ONEC_REPOSITORY_RUNNER_TOKEN:-}
      ONEC_ADAPTER_ENABLE_EXTERNAL_1C: ${ONEC_ADAPTER_ENABLE_EXTERNAL_1C:-false}
      ONEC_REPOSITORY_REQUEST_TTL_SECONDS: ${ONEC_REPOSITORY_REQUEST_TTL_SECONDS:-86400}
      ONEC_REPOSITORY_CONFIRMATION_TTL_SECONDS: ${ONEC_REPOSITORY_CONFIRMATION_TTL_SECONDS:-7200}

volumes:
  adapter-1c-data:
