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

Source isn't mounted with local source code #73

Open
voanhduy1512 opened this issue Oct 6, 2017 · 4 comments
Open

Source isn't mounted with local source code #73

voanhduy1512 opened this issue Oct 6, 2017 · 4 comments

Comments

@voanhduy1512
Copy link

I try to run the node_hello example and look likes if build points to local folder, cage status will report the source is mounted but actually it doesn't. I check docker-compose output inside .cage and there is no volumes mount.

@emk emk self-assigned this Oct 6, 2017
@emk
Copy link
Contributor

emk commented Oct 6, 2017

Could you please provide me with a walkthrough of how you triggered this using https://github.com/faradayio/cage/tree/master/examples/node_hello ? What commands did you run? What output did you see? What output did you expect?

It's possible this is just a bug in cage status and that you might be able to get correct behavior using cage source mount node_hello. But it's also possible that local source directories don't work with certain cage features, and that I need to fix this.

@voanhduy1512
Copy link
Author

Hi, here is how to reproceduce the bug:

  1. Clone cage and go into node_hello example
~ cage status
WARNING: No /tmp/cage/examples/node_hello/config/project.yml file, using default values (from cage::project)
frontend        enabled type:service
└─ web          ports:3000 mounted:node_hello

~ cat .cage/pods/frontend.yml
---
"services":
  "web":
    "build": "/tmp/cage/examples/node_hello/pods/../src/node_hello"
    "environment":
      "NODE_ENV": "development"
    "image": "faraday/node_hello"
    "labels":
      "io.fdy.cage.pod": "frontend"
      "io.fdy.cage.target": "development"
    "ports":
      - "3000:3000"

So cage status is wrong here.

~ cage source mount node_hello                                                                       
WARNING: No /tmp/cage/examples/node_hello/config/project.yml file, using default values (from cage::project)
Now run `cage up` for these changes to take effect.
~ cage up
WARNING: No /tmp/cage/examples/node_hello/config/project.yml file, using default values (from cage::project)
Creating network "nodehello_default" with the default driver
Creating nodehello_web_1 ...
Creating nodehello_web_1 ... done
~ cat .cage/pods/frontend.yml
---
"services":
  "web":
    "build": "/tmp/cage/examples/node_hello/pods/../src/node_hello"
    "environment":
      "NODE_ENV": "development"
    "image": "faraday/node_hello"
    "labels":
      "io.fdy.cage.pod": "frontend"
      "io.fdy.cage.target": "development"
    "ports":
      - "3000:3000"

So it looks like cage source mount isn't working at well. On other hand, other examples with remote source works as expected.

@voanhduy1512
Copy link
Author

Hello @emk, any updates on this?

@emk
Copy link
Contributor

emk commented Nov 1, 2017

No, but thank you for reminding me! I did have just enough time to experiment with this and verify that yes, it does appear to be broken.

@emk emk removed their assignment Jan 26, 2020
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

2 participants