nightscout / nightscout-docker

docker resources for creating Nightscout boxen
38 stars 38 forks source link

For development efforts just a suggestion to make /opt/app a shared volume. #7

Open necroscope opened 7 years ago

necroscope commented 7 years ago

On the nodejs container the suggestion is to make /opt/app a shared docker volume. A docker volume would allow for easier development as we could use our IDE development tools on our host (windows, mac and linux) against the files on the volume that the container uses. Just an easier way of editing things like servers.js for testing things out. This way we don't have to install tools in the container etc.

https://docs.docker.com/engine/tutorials/dockervolumes/

mastacheata commented 6 years ago

You could always just go into the container: docker-compose exec nightscout bash

Also since this is a docker-compose file, you should rather look here for details on how to persist data to a well-known folder on your machine: https://docs.docker.com/compose/compose-file/#volumes

To add a volume mapping for /opt/app to the app subfolder of the compose file add this below ports on the nightscout service:

volumes:
  - "./app:/opt/app"