Structure of Angular / NodeJS repository which will run in docker

We have repository with an application written in Angular.
It needs a docker container with nginx to be hosted.
The nodejs needs a docker container of nodejs so our app will be split up in 2 containers which will be linked.

So to write 2 dockerfiles (one for each image) we have to split up our folders in our repo like:

  • When would a Docker image and its repository have different names?
  • Port forwarding with docker for wordpress
  • How to change the ownership of Docker-Tomcat log files?
  • Alpine variants of PHP and Apache/httpd in Docker
  • How can I make an overlay network in docker without using docker-machine commands
  • Network mode - host on docker native
    • root

      • Angular : contains dockerfile for nginx

      • NodeJS : contains dockerfile for nodejs

    But the problem is they both need the package.json. (Angular for devdependencies and NodeJS for the dependencies).

    Which is the best structure in the repo for your application?

  • No value has been specified for property 'imageId' while creating container
  • Docker not starting “ could not delete the default bridge network: network bridge has active endpoints”"
  • Cannot connect to MySQL within running docker container
  • Docker Compose Volumes doesn't push latest code
  • Docker not releasing memory when shutdown, windows 10
  • Docker registry (distribution) token authentication setup
  • One Solution collect form web for “Structure of Angular / NodeJS repository which will run in docker”

    The Nginx and Nodejs containers can share a volume in Docker Compose if you like. You can use the volumes_from parameter. It will mount all of the volumes from another service or container, optionally specifying read-only access(ro) or read-write(rw).

          - service_name
          - container_name
          - service_name:rw

    In your case, package.json can be in your Nodejs container but it can also be accessible by the Nginx container using this parameter.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.