Databse reset issue in dev docker server.
@thomast @Prastoin @charles
Hello everyone, when I try to run the database reset command in my development Docker container using yarn nx database:reset twenty-server, I get this error

10 Replies
Hey @Dhruvraj please try using
npx
i am trying to run this command in dokcer container so it is asking me to yarn install but it should be installed in docker right ?

If you're running this within a
twenty-server
container then you indeed need to pass through the yarn nx
script, I'm not sure if it has ever been used in a container before 🤔
What you can still do is update your local .env
database credentials information to be hitting your dev remote database instead of your local
Edit: Yes I don't think nx
script entry was planned to be used in container, ../../
seems broken in the docker container double checkingwe are trying to run npx nx reset command in /app directory but we are unable to find nx

That's because unless I'm mistaken
nx
is not shipped
Please refer towe already try in /app/packages/twenty-server but it's not working

As said above:
Edit: Yes I don't think nx script entry was planned to be used in container, ../../ seems broken in the docker container double checkingIMO you have two options either: 1/ ( recommended )
What you can still do is update your local .env database credentials information to be hitting your dev remote database instead of your local2/ Build your own image that either ships
database:reset
yarn script entry mocking the nx command or ship nxThanks @Prastoin ,
1 - on production, we have a private network setup so from the local we can't do a database:reset.
So we'll try to go with 2nd approach.
No worries @Jay Patel
You can find
database:reset
nx command detail in packages/twenty-server/project.json
@Jay Patel @Dhruvraj After double checking the nx command definition the below command might be enough for your use case
( to be run in your twenty-server container )
Please always do a backup before@Prastoin okay 👍