chore(docker): simplify development rules

* when `mix.lock` is changed, rebuild the image
* when any other file is changed, sync and restart the service
  * except for directories that are related to deps/build/test/lsp
This commit is contained in:
João Paulo Dubas 2025-04-30 17:05:59 +00:00
parent 9f51d95e0a
commit 10842836a2
Signed by: joao.dubas
SSH Key Fingerprint: SHA256:V1mixgOGRc/YMhGx/DNkOSmJxgA2vHNrDZEk3wt/kOA

View File

@ -29,23 +29,17 @@ services:
init: true init: true
develop: develop:
watch: watch:
- path: ./mix.lock
action: rebuild
- path: ./ - path: ./
ignore: ignore:
- ./build/ - ./build/
- ./deps/ - ./deps/
target: /opt/app - ./.elixir_ls/
action: sync - ./cover/
- path: ./config/ - ./report/
target: /opt/app target: /opt/app
action: sync+restart action: sync+restart
- path: ./lib/wabanex/application.ex
target: /opt/app
action: sync+restart
- path: ./mix.exs
target: /opt/app
action: sync+restart
- path: ./mix.lock
action: rebuild
environment: environment:
DNS_CLUSTER_QUERY: *app_host DNS_CLUSTER_QUERY: *app_host
POSTGRES_HOST: *db_host POSTGRES_HOST: *db_host