Skip to content

Conversation

FooChao
Copy link

@FooChao FooChao commented Sep 18, 2025

To be able to use local mongo db do the following steps

  1. update user service .env file
  • DB_LOCAL_URI=mongodb://root:example@localhost:27017
  • ENV=LOCAL
  1. on development do npm run local db before doing npm run dev
  2. on docker do docker-compose --profile localdb up
  3. to clean up do docker-compose --profile localdb down

Please note that normal docker compose down won't clean up the database and may cause some errors in future as i given it profile localdb for us to swap between local and cloud db

To swap back to cloud in future change .env file to ENV=PROD

mongo-express is at port 8081

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant