variables:
  main_domain: ${domain}
  secret_base: ${base64:64}
  totp_key: ${base64:32}

config:
  domains:
    - serviceName: plausible
      port: 8000
      host: ${main_domain}

  env:
    BASE_URL: http://${main_domain}
    SECRET_KEY_BASE: ${secret_base}
    TOTP_VAULT_KEY: ${totp_key}

  mounts:
    - filePath: /clickhouse/clickhouse-config.xml
      content: |
        <clickhouse>
          <logger>
            <level>warning</level>
            <console>true</console>
          </logger>

          <!-- Stop all the unnecessary logging -->
          <query_thread_log remove="remove"/>
          <query_log remove="remove"/>
          <text_log remove="remove"/>
          <trace_log remove="remove"/>
          <metric_log remove="remove"/>
          <asynchronous_metric_log remove="remove"/>
          <session_log remove="remove"/>
          <part_log remove="remove"/>
        </clickhouse>

    - filePath: /clickhouse/clickhouse-user-config.xml
      content: |
        <clickhouse>
          <profiles>
            <default>
              <log_queries>0</log_queries>
              <log_query_threads>0</log_query_threads>
            </default>
          </profiles>
        </clickhouse>
