<commit_before>'use strict';

const Schema = require('joyent-cp-gql-schema');
const Graphi = require('graphi');
const Hoek = require('hoek');
const Piloted = require('piloted');
const Data = require('./data');
const Pack = require('../package.json');
const Resolvers = require('./resolvers');
const ContainerPilotWatcher = require('./watch/container-pilot');
const MachinesWatcher = require('./watch/machines');


const internals = {
  namespace: process.env.NAMESPACE ? `/${process.env.NAMESPACE}` : '',
  defaults: {
    data: {
      db: {
        host: 'localhost'
      }
    },
    watch: {
      url: process.env.SDC_URL,
      account: process.env.SDC_ACCOUNT,
      keyId: process.env.SDC_KEY_ID
    }
  }
};

module.exports = function (server, options, next) {
  const settings = Hoek.applyToDefaults(internals.defaults, options || {});

  try {
    const docker = Piloted.service('docker-compose-api');
    if (docker) {<commit_msg>fix(portal-api): fallback dockerComposeHost to localhost<commit_after>'use strict';

const Schema = require('joyent-cp-gql-schema');
const Graphi = require('graphi');
const Hoek = require('hoek');
const Piloted = require('piloted');
const Data = require('./data');
const Pack = require('../package.json');
const Resolvers = require('./resolvers');
const ContainerPilotWatcher = require('./watch/container-pilot');
const MachinesWatcher = require('./watch/machines');


const internals = {
  namespace: process.env.NAMESPACE ? `/${process.env.NAMESPACE}` : '',
  defaults: {
    data: {
      db: {
        host: 'localhost'
      },
      dockerComposeHost: 'tcp://0.0.0.0:4242'
    },
    watch: {
      url: process.env.SDC_URL,
      account: process.env.SDC_ACCOUNT,
      keyId: process.env.SDC_KEY_ID
    }
  }
};

module.exports = function (server, options, next) {
  const settings = Hoek.applyToDefaults(internals.defaults, options || {});

  try {
    const docker = Piloted.service('docker-compose-api');
    if (docker) {
{'fraction_non_alphanumeric': 0.16548582995951416, 'fraction_numerical': 0.004048582995951417, 'mean_word_length': 3.651764705882353, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '4647191', 'n_tokens_mistral': 652, 'n_tokens_neox': 637, 'n_words': 128}