docker / docker/compose

Watch different command/entrypoint

Open
#12,835 10 comments 0 reactions 1 assignee View on GitHub

@ndeloof is already working on this.

Since May 16, 2025.

kind/feature
Dominant language
Go
Stars
38.2k
Forks
5.8k
Avg merge
2d 14h
Merged PRs (30d)
55

Description

Description

When running with docker compose watch, i want my service to start their dev servers (those that support hotreloading & watch files)

When running with docker compose up, i want services to use their prod server (that will not start a file watcher & so on)

I was hoping to find something like services.app.develop.entrypoint or services.app.develop.command

Potential example:

services:
  web:
    build: .
    command: npm start
    develop:
      command: npm dev
      watch:
        - action: sync
          path: ./web
          target: /src/web
          ignore:
            - node_modules/
        - action: rebuild
          path: package.json

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.