Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

custom network name #86

Open
danknittle opened this issue Dec 5, 2017 · 0 comments
Open

custom network name #86

danknittle opened this issue Dec 5, 2017 · 0 comments

Comments

@danknittle
Copy link

This is a Feature Proposal

Description

Docker run argument for --network uses projectName and always appends _default.
lib/invoke/local.js : line: 20
const network = func.projectName ? ${func.projectName}_default : ''

This doesn't play well with other local docker projects that have their own/shared defined network. This forces us to use the docker network defined by this plugin.

What I propose

Add the following to the invoke function.

lib/invoke/local.js : line: 20

  const network = func.network ? func.network : ''
  log(`Network: ${network}`)

And the following to the config parser in getFunctionConfig.
lib/config.js : line: 18

  const network = serverless.service.custom &&
    serverless.service.custom.simulate &&
    serverless.service.custom.simulate.network

line: 27 to the return Object.freeze({

network: network,

Then the serverless.yml file will need a network: parameter added to it.

custom:
  simulate:
    network: custom_docker_network

Additional Data

  • Serverless Framework Version you're using: 1.24.1
  • Serverless Docker Plugin Version you're using: serverless-plugin-simulate: "0.0.17"
  • Operating System: OS X High Sierra
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant