use a host mapping so that mongodb resolves to 127.0.0.1 in the builder

This commit is contained in:
Nick 2025-10-16 18:30:29 +02:00
parent 5ed18338f7
commit c35d930f21
2 changed files with 3 additions and 1 deletions

View File

@ -257,7 +257,7 @@ Local (Docker Compose) MongoDB:
NODE_ENV=development
# Database (Docker)
MONGODB_URI=mongodb://root:example@127.0.0.1:27017/openstock?authSource=admin
MONGODB_URI=mongodb://root:example@mongodb:27017/openstock?authSource=admin
# Better Auth
BETTER_AUTH_SECRET=your_better_auth_secret

View File

@ -3,6 +3,8 @@ services:
build:
context: .
network: host
extra_hosts:
- "mongodb=127.0.0.1"
ports:
- "3000:3000"
env_file: