Skip to content

recamshak/watchexec-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

watchexec-docker

A docker image that contains a statically linked version of watchexec.

Usage Example

It was specifically build for running dev environment using docker-compose without changing your docker images. The following example shows how to restart a python server on file change:

version: "2.4"
services:
  watchexec:
    image: recamshak/watchexec

  service1:
    image: service1
    build:
      context: service1
    entrypoint: "/watchexec/watchexec"
    command: ["--restart", "--no-shell", "--exts", "py", "python", "service1/server.py"]
    volumes:
      - "./service1/src:/app/src:ro"
    volumes_from:
      - watchexec:ro

The watchexec binary is self-contained and should run inside any container. It's language agnostics and can be used to restart your services as the example above or to run linter, complier, tests, etc.

About

A statically linked watchexec docker image.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages