Hi!
This is just a question to investigate if you had the chance to test it within a Docker context.
Currently, I have a Java 8 microservice with a watching thread (using java.nio.file.WatcherService) that listens to changes to a bind-mounted directory. Here is the relevant part inside the docker-compose config:
services:
filemanager:
container_name: filemanager
restart: always
build:
context: filemanager
dockerfile: Dockerfile
image: filemanager:latest
ports:
- ${FILE_MANAGER_PORT}:${FILE_MANAGER_PORT}
environment:
- FILE_MANAGER_PORT=${FILE_MANAGER_PORT}
- MUSIC_DIRECTORY=${MUSIC_CONTAINER_DIRECTORY}
- MYSQL_HOST=${MYSQL_CONTAINER_NAME}
- MYSQL_PORT=${MYSQL_LOCAL_PORT}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- ENV=DEVELOPMENT
volumes:
- ${MUSIC_LOCAL_DIRECTORY}:${MUSIC_CONTAINER_DIRECTORY}
depends_on:
- mysql
If I run it without Docker or modify files directly inside Docker, the events are correctly dispatched and captured. If instead, I modify files on Ubuntu (MUSIC_LOCAL_DIRECTORY), just the files are modified inside the container but no events get captured.
I'm trying to understand if I need to do something different or if this feature cannot be used in this context (as said in this post for example). Thanks!
Hi!
This is just a question to investigate if you had the chance to test it within a Docker context.
Currently, I have a Java 8 microservice with a watching thread (using java.nio.file.WatcherService) that listens to changes to a bind-mounted directory. Here is the relevant part inside the docker-compose config:
If I run it without Docker or modify files directly inside Docker, the events are correctly dispatched and captured. If instead, I modify files on Ubuntu (MUSIC_LOCAL_DIRECTORY), just the files are modified inside the container but no events get captured.
I'm trying to understand if I need to do something different or if this feature cannot be used in this context (as said in this post for example). Thanks!