cage
cage copied to clipboard
Source isn't mounted with local source code
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.
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.
Hi, here is how to reproceduce the bug:
- 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.
Hello @emk, any updates on this?
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.