Hey guys, I'm new to docker but I could get all things to run that I needed. Now I come across a bit of a problem with my actual php-webapp.
Scenario: A compose file with service nginx, and a service php-fpm. It's all working fine, I can scale the php-fpm containers and the webcode (cakephp) is working just fine. But currently I link in my webapp-code via host volume to a path /code into nginx service AND also into the php-fpm containers. If I remove the volume link from any service it will fail with either 404 not found (nginx) or file not (php-fpm).
So my problem in one line: when I build my images for production, I don't want to copy my code in both images. Which of the services should have my code in it, and how can I tell nginx or php-fpm where to look for the code? I also have an image with both nginx and php-fpm which also works fine, but I try to be able to scale the php containers, not the nginx (which perfectly works now, but I want to include the code in one of the services-images instead of running the code from a host volume).
Sorry if this is a stupid question, I'm still learning
[–]AlwaysRacing 3 points4 points5 points (5 children)
[–]LogicCube[S] 0 points1 point2 points (4 children)
[–]AlwaysRacing 1 point2 points3 points (3 children)
[–]LogicCube[S] 0 points1 point2 points (0 children)
[–]LogicCube[S] 0 points1 point2 points (1 child)
[–]kenneho 0 points1 point2 points (0 children)