Sign inSign up

ntodd/livereload

By ntodd

•Updated over 5 years ago

LiveReload for Docker Compose applications

Image
0

1.2K

ntodd/livereload repository overview

This container wraps https://www.npmjs.com/package/livereload⁠ for easy use in Docker Compose. Additionally, https://github.com/krallin/tini⁠ is used to improve signal handling when docker-compose up is killed (without needing to add init:true to every docker-compose.yml).

⁠Usage

⁠Docker Compose

Add this to your docker-compose.yml file:

livereload:
  image: ntodd/livereload
  ports:
    - "35729:35729"
  volumes:
    - /your/local/watch/directory:/usr/src/app

You can also add additional configuration via ENV vars:

livereload:
  image: ntodd/livereload
  ports:
    - "35729:35729"
  volumes:
    - /your/local/watch/directory:/usr/src/app
  environment:
    - ADDITIONAL_EXTENSIONS=scss,haml,slim,json
    - EXCLUSIONS=app/webpacker/
    - WAIT=500

Default watched extensions: html, css, js, png, gif, jpg, php, php5, py, rb, erb, coffee

⁠HTML

Add the following script to your layout:

<script>
  document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] +
  ':35729/livereload.js?snipver=1"></' + 'script>')
</script> 

Or use the browser extensions at http://help.livereload.com/kb/general-use/browser-extensions⁠

Tag summary

Content type

Image

Digest

Size

29 MB

Last updated

over 5 years ago

docker pull ntodd/livereload