{"action":"created","issue":{"url":"https://api.github.com/repos/lando/lando/issues/960","repository_url":"https://api.github.com/repos/lando/lando","labels_url":"https://api.github.com/repos/lando/lando/issues/960/labels{/name}","comments_url":"https://api.github.com/repos/lando/lando/issues/960/comments","events_url":"https://api.github.com/repos/lando/lando/issues/960/events","html_url":"https://github.com/lando/lando/issues/960","id":322611043,"number":960,"title":"Add service via plugin : error (HTTP code 500) is not connected to the network lando_bridge_network","user":{"login":"jordangidoin","id":5417643,"avatar_url":"https://avatars1.githubusercontent.com/u/5417643?v=4","gravatar_id":"","url":"https://api.github.com/users/jordangidoin","html_url":"https://github.com/jordangidoin","followers_url":"https://api.github.com/users/jordangidoin/followers","following_url":"https://api.github.com/users/jordangidoin/following{/other_user}","gists_url":"https://api.github.com/users/jordangidoin/gists{/gist_id}","starred_url":"https://api.github.com/users/jordangidoin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jordangidoin/subscriptions","organizations_url":"https://api.github.com/users/jordangidoin/orgs","repos_url":"https://api.github.com/users/jordangidoin/repos","events_url":"https://api.github.com/users/jordangidoin/events{/privacy}","received_events_url":"https://api.github.com/users/jordangidoin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-13T17:12:18Z","updated_at":"2018-05-14T21:48:34Z","closed_at":"2018-05-14T21:48:34Z","author_association":"NONE","body":"Hello,\r\nI want to add a service with this plugin.\r\nBut when I do a lando start I get this error:\r\n\r\n```\r\n(HTTP code 500) server error - container 75602b9d132d7c0385938bd324426bbcc930be9cfba87a79e91206e04b1e980c is not connected to the network lando_bridge_network\r\n```\r\n\r\nplugin code\r\n\r\n```\r\nFile : index.js\r\n\r\n'use strict';\r\n\r\nmodule.exports = function (lando) {\r\n\r\n    var _ = lando.node._;\r\n    \r\n    lando.events.setMaxListeners(lando.events.getMaxListeners() + 25);\r\n\r\n    // Services\r\n    var services = [\r\n        'elastichq',\r\n    ];\r\n\r\n    lando.events.on('post-bootstrap', function (lando) {\r\n        _.forEach(services, function (service) {\r\n            var serviceModule = './services/' + [service, service].join('/');\r\n            lando.services.add(service, require(serviceModule)(lando));\r\n        });\r\n    });\r\n};\r\n```\r\n\r\n```\r\nFile : elastichq/elastichq.js\r\n\r\n'use strict';\r\n\r\nmodule.exports = function(lando) {\r\n\r\n    // Modules\r\n    var _ = lando.node._;\r\n    var addConfig = lando.utils.services.addConfig;\r\n    var buildVolume = lando.utils.services.buildVolume;\r\n\r\n    /*\r\n     * Supported versions for elasticsearch\r\n     */\r\n    var versions = [\r\n        'latest',\r\n    ];\r\n\r\n    /*\r\n     * Return the networks needed\r\n     */\r\n    var networks = function() {\r\n        return {};\r\n    };\r\n\r\n    /*\r\n     * Build out elasticsearch\r\n     */\r\n    var services = function(name, config) {\r\n\r\n        // Start a services collector\r\n        var services = {};\r\n\r\n        // Default elasticsearch-kibana service\r\n        var elastichq = {\r\n            image: 'polinux/elastichq:' + config.version,\r\n            command: '',\r\n            environment: {\r\n                LANDO_NO_SCRIPTS: 'true',\r\n                TERM: 'xterm'\r\n            }\r\n        };\r\n\r\n\r\n        // Put it all together\r\n        services[name] = elastichq;\r\n\r\n        // Return our service\r\n        return services;\r\n    };\r\n\r\n    /*\r\n     * Return the volumes needed\r\n     */\r\n    var volumes = function() {\r\n        return {data: {}};\r\n    };\r\n\r\n    /*\r\n     * Metadata about our service\r\n     */\r\n    var info = function(name, config) {\r\n\r\n        // Add in generic info\r\n        var info = {\r\n            'internal_connection': {\r\n                host: name,\r\n                port: config.port || 5000\r\n            },\r\n            'external_connection': {\r\n                host: 'localhost',\r\n                port: config.portforward || 'not forwarded'\r\n            }\r\n        };\r\n\r\n        // Surfaces the config file if specified\r\n        /*if (_.has(config, 'config')) {\r\n            info.config = config.config;\r\n        }*/\r\n\r\n        // Return the collected info\r\n        return info;\r\n\r\n    };\r\n\r\n    return {\r\n    \tdefaultVersion: 'latest',\r\n        info: info,\r\n        networks: networks,\r\n        services: services,\r\n        versions: versions,\r\n        volumes: volumes,\r\n        configDir: __dirname\r\n    };\r\n\r\n};\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/lando/lando/issues/comments/388974065","html_url":"https://github.com/lando/lando/issues/960#issuecomment-388974065","issue_url":"https://api.github.com/repos/lando/lando/issues/960","id":388974065,"user":{"login":"pirog","id":713424,"avatar_url":"https://avatars2.githubusercontent.com/u/713424?v=4","gravatar_id":"","url":"https://api.github.com/users/pirog","html_url":"https://github.com/pirog","followers_url":"https://api.github.com/users/pirog/followers","following_url":"https://api.github.com/users/pirog/following{/other_user}","gists_url":"https://api.github.com/users/pirog/gists{/gist_id}","starred_url":"https://api.github.com/users/pirog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pirog/subscriptions","organizations_url":"https://api.github.com/users/pirog/orgs","repos_url":"https://api.github.com/users/pirog/repos","events_url":"https://api.github.com/users/pirog/events{/privacy}","received_events_url":"https://api.github.com/users/pirog/received_events","type":"User","site_admin":false},"created_at":"2018-05-14T21:48:34Z","updated_at":"2018-05-14T21:48:34Z","author_association":"MEMBER","body":"@jordangidoin see #894 "}}
{"actor":{"display_login":"pirog"}}