wip: use develop to keep code in sync

This commit is contained in:
Joao P Dubas 2024-09-18 08:41:59 -03:00
parent 4d545074f5
commit 42b2675a22

View File

@ -21,15 +21,30 @@ services:
depends_on:
- db
init: true
develop:
watch:
- path: ./
ignore:
- ./build/
- ./deps/
target: /opt/app
action: sync
- path: ./config/
target: /opt/app
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: &app_environment
POSTGRES_HOST: *db_host
POSTGRES_USER: *db_user
POSTGRES_PASS: *db_pass
POSTGRES_NAME: wabanex_dev
volumes: &app_volumes
- '.:/opt/app'
- 'app_build:/opt/app/_build'
- 'app_deps:/opt/app/deps'
working_dir: /opt/app
restart: unless-stopped
entrypoint: sleep
@ -41,7 +56,6 @@ services:
profiles:
- setup
environment: *app_environment
volumes: *app_volumes
restart: 'no'
command: |
mix ecto.setup \
@ -53,7 +67,6 @@ services:
profiles:
- migrate
environment: *app_environment
volumes: *app_volumes
restart: 'no'
command: |
mix ecto.migrate \
@ -61,5 +74,3 @@ services:
volumes:
db_data: {}
app_build: {}
app_deps: {}