Docker Local Setup
I just cloned the twenty repository with the intention of contributing to the project. I followed the instructions in the "twenty" local setup guide and successfully provisioned the database using the "make postgres-on-docker" command.
However, when I run "npx nx database:reset twenty-server" to set up the database, it appears to configure the PostgreSQL database locally instead of on Docker. How can I ensure that this command executes on Docker instead?
Is there a set of Docker commands I can use to get the project up and running with minimal hassle, without needing to configure things locally? thank you
8 Replies
Sounds weird, so you have a docker running
twenty_postgres
on 5432 ?
maybe you already have postgres running on 5432? But then I don't know why you would not see an error when trying to setup your docker
another solution to fix this is setting up your docker on another port. Like 5433.
- PG_DATABASE_URL=postgres://twenty:twenty@localhost:5433/default
in your env file
- ports: - "5432:5432"
in twenty-postgres/docker/docker-compose.yml
- make postgres-on-docker
againhello @thomast thank you for asisting, here is a screenshot of docker running on port 5432
and how do you know
npx nx database:reset twenty-server
update the local DB and not docker?when run npx command I'm getting these errors because I don't have those extensions installed on my local PostgreSQL. I assume this means the script is being executed on the local PostgreSQL database instead of the Docker PostgreSQL instance.
my environment is wsl + docker BTW
indeed. Did you try using another port as suggested above?
Hello @thomast you can close this issue now i was able to run the project on ubuntu os without any errors
Thank you for assistance