1

Situation

I have project A and project B, that A depends on B via composer. B implements functionality of interface in A.

I have unit tests in B that correctly execute. Now, I want to test this via API - to do that, I lunch project A and test all functionality via HTTP API.

Given project A, have own docker-compose.yml shared with others developers and I can't change this configuration.

Wider context

I have much more project B like in project A. Additionally, I have more projects A like too, that mostly have similar shared dependency with project A.

Problem

To not run tests, update B on bugs, tags and run composer update on A had simple solution - inside vendor, I created symlink to replace of installed project B.

Problem with docker is that, on mounting volume, docker don't see content of symlink (my library).

I have

  • Docker for Mac - edge

Links

Similar problem, but on build image

Standard symlink, that didn't help.

Ideas

Copy project

I think, about copy project B to given project A vendor, but considering wider context, this is not solution in future.

Question

  • is there possibility this setup to work, without copy project?

If not, then:

  • how to manage sub projects or symlinks in given architecture to actively develop project all projects?
  • do you have some proposition of work around or other setup?
piet.t
  • 11,718
  • 21
  • 43
  • 52
timiTao
  • 1,417
  • 3
  • 20
  • 34

1 Answers1

1

Yes, it is possible.

My setup, it to mount volume to main container with overwriting configuration. - for that use multimes -f in docker-compose.

Then via composer, symlink given volume inside container to project A.

"repositories": [
    { "type": "path", "url": "PATH INSIDE CONTAINER", "options": {"symlink": true}}
],
timiTao
  • 1,417
  • 3
  • 20
  • 34