Skip to main content

compose-watcher

Cli that restarts you docker compose services when a file inside one of its volumes changes To use with compiled languages place the compilation step in the command field.

Example usage

  • graphql api restart when schema file changes
  • Mongoke restarts when config schema changes
  • Nodejs container restarts when the src folder changes, recompiling with tsc

Install

pip3 install compose-watcher

Usage

Use the directories you want to track as service volumes Also consider using init: true in the compose service definition for faster killing of processes. To not stop the docker-compose logs command, there should be always a running container

version: '3'

services:
  api:
    build: node_api
    command: sh -c 'tsc --incremental && node index.js'
    volumes:
      - ./node_api/src:/src

Then execute compose-watcher to watch changes

compose-watcher -f docker-compose.yml --timeout 5

Metadata

Release files for compose-watcher 1.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for compose-watcher 1.1.2
File Size Uploaded
compose-watcher-1.1.2.tar.gz 4.4 kB Details

Release files / compose-watcher-1.1.2.tar.gz

Download URL compose-watcher-1.1.2.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b882d7f975f56a201afbc64f1345d6dc0613614b40ee7772b7de52e4c8863c7d
BLAKE2b-256 checksum
How to use checksums
264def843ca1b6f8fe1feeb344a6ae85ce798c0565a67129a7ee034932619c9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8

Release history Release notifications | RSS feed

1.2.5

1 release file

1.2.4

1 release file

1.2.3

1 release file

1.2.2

1 release file

1.2.1

1 release file

1.1.5

1 release file

1.1.4

1 release file

1.1.3

1 release file

This release

1.1.2 This release

1 release file

1.1.1

1 release file

1.0.2

1 release file

1.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page