Fixed live reload of Nuxt for docker-compose

- If code was changed by the developer in backend and webapp live reload was not executed.
This commit is contained in:
Wolfgang Huß 2021-01-18 15:53:08 +01:00
parent 2ffab3a0a4
commit 2495f4fa72
2 changed files with 5 additions and 5 deletions

View File

@ -6,21 +6,18 @@ services:
build: build:
context: webapp context: webapp
target: build-and-test target: build-and-test
volumes:
- ./webapp:/develop-webapp
environment: environment:
- NUXT_BUILD=/tmp/nuxt # avoid file permission issues when `rm -rf .nuxt/` - NUXT_BUILD=/tmp/nuxt # avoid file permission issues when `rm -rf .nuxt/`
- PUBLIC_REGISTRATION=true - PUBLIC_REGISTRATION=true
command: yarn run dev command: yarn run dev
volumes: volumes:
- webapp_node_modules:/nitro-web/node_modules - ./webapp:/develop-webapp
- webapp_node_modules:/develop-webapp/node_modules
backend: backend:
image: ocelotsocialnetwork/develop-backend:build-and-test image: ocelotsocialnetwork/develop-backend:build-and-test
build: build:
context: backend context: backend
target: build-and-test target: build-and-test
volumes:
- ./backend:/develop-backend
command: yarn run dev command: yarn run dev
environment: environment:
- SMTP_HOST=mailserver - SMTP_HOST=mailserver
@ -29,6 +26,7 @@ services:
- "DEBUG=${DEBUG}" - "DEBUG=${DEBUG}"
- PUBLIC_REGISTRATION=false - PUBLIC_REGISTRATION=false
volumes: volumes:
- ./backend:/develop-backend
- backend_node_modules:/develop-backend/node_modules - backend_node_modules:/develop-backend/node_modules
- uploads:/develop-backend/public/uploads - uploads:/develop-backend/public/uploads
neo4j: neo4j:

View File

@ -16,6 +16,7 @@ services:
depends_on: depends_on:
- backend - backend
volumes: volumes:
- ./webapp:/develop-webapp
- webapp_node_modules:/develop-webapp/node_modules - webapp_node_modules:/develop-webapp/node_modules
environment: environment:
- HOST=0.0.0.0 - HOST=0.0.0.0
@ -35,6 +36,7 @@ services:
ports: ports:
- 4000:4000 - 4000:4000
volumes: volumes:
- ./backend:/develop-backend
- backend_node_modules:/develop-backend/node_modules - backend_node_modules:/develop-backend/node_modules
- uploads:/develop-backend/public/uploads - uploads:/develop-backend/public/uploads
environment: environment: