Strapi5 in dev mode keeps restarting every 10 seconds or so

In dev mode, I’m running a local postgres database in a docker container. I’m persisting the postgres data volume in a “data” directory within the Strapi5 project. Whenever postgres updates the write-ahead-log, Strapi5 sees this as a file change and restarts the server, with the following log message:

[2024-09-24 14:43:45.615] info: File changed: <project-dir>/data/postgres/pg_wal/000000010000000000000001

This doesn’t seem like it should be happening. I tried using the “–no-watch-admin” flag when going into dev mode, but this doesn’t do anything to prevent Strapi from constantly restarting. Am I missing something? Is it bad practice to have the persistent postgres data volume in the same directory as the Strapi Project?

This topic has been created from a Discord post (1288243288926720041) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord

It’s because your writing data into the project directory. I’d suggest putting that data directory into .tmp

We watch the entire project directory for any code change in development mode with a few hard coded files and dirs.

<@211722558385553408> Thanks! I’ll follow your suggestion.