SciCatProject / scicatlive

Simple getting started procedure for SciCat
9 stars 10 forks source link

Init.js is only run when /data/db is empty #120

Open minottic opened 6 months ago

minottic commented 6 months ago

from here, init.js is only run when /data/db is empty. This means that any change in the seed will not be loaded. We should either change the documentation or make it run everytime

minottic commented 6 months ago

the prefererence would to re-seed, and a quick solution could be to simply not use the docker-entrypoint.d and run the init.js in the command block prepending the mongod command

Long term we should think of moving the seeding logic to the BEs services (not in the BE github, but rather in some init in the scicatlive BEs services as you said). This would also simplify the conditional mongo on the BE_VERSION which conceptually does not make too much sense for me

What I would find confusing of the init in the BE is to have an orphan dead container (as it completed), so we should also maybe check if containers can be automatically removed on completion