TaitoUnited / full-stack-template

Template for cloud-native applications and microservices running as containers/functions on Kubernetes, Docker Compose, or cloud. You can choose the stack during project creation.
https://taitounited.github.io/taito-cli/templates
MIT License
35 stars 8 forks source link

Linux node_modules volume fix #46

Open keskiju opened 5 years ago

keskiju commented 5 years ago

The "/DIR/node_modules" volumes of docker-compose.yaml do not work on Linux correctly if the node_modules directory does not exist on host when starting up docker-compose.

Somehow make sure that ./DIR/node_modules exists on host when starting a container. Perhaps check if node_modules is empty or does not exist on start (CMD command of Dockerfile), and print some error message.

keskiju commented 5 years ago

Changing the mount order might fix this:

  volumes:
    - "./server:/server"
    - "/server/node_modules"

-->

  volumes:
    - "/server/node_modules"
    - "./server:/server"
keskiju commented 5 years ago

He problem occurs only if you have run taito start before taito install. Added instructions in taito --trouble.