Fixes for the `gargantext init` function
The problem is that when a fresh DB starts up, migrations are applied (c.f. docker-compose.yaml
), but it is still required to call gargantext init
.
We have to differentiate the use cases:
- dev/prod instances don't use docker. As such the migrations are still applied by hand.
gargantext init
is not needed, because, apart from the system user, it also creates test usersuser1
,user2
, ... - developers do use
docker-compose
. They also don't need much thegargantext init
functionality because almost always they want those test users.
What I propose is this:
- add another migration to
docker-compose
which will create master and test users - remove
gargantext init
- add
gargantext user create-admin
to explicitly create the system user (and not other users) - optionally add
gargantext user create
to create users with given passwords from command line