Fix the build error in #23 by starting mongodb before building and allowing the builder access to mongodb
This commit is contained in:
parent
46c8efca83
commit
5ed18338f7
|
|
@ -185,7 +185,7 @@ MONGODB_URI=mongodb://root:example@mongodb:27017/openstock?authSource=admin
|
||||||
4) Start the stack:
|
4) Start the stack:
|
||||||
```bash
|
```bash
|
||||||
# from the repository root
|
# from the repository root
|
||||||
docker compose up -d --build
|
docker compose up -d mongodb && docker compose up -d --build
|
||||||
```
|
```
|
||||||
|
|
||||||
5) Access the app:
|
5) Access the app:
|
||||||
|
|
@ -257,7 +257,7 @@ Local (Docker Compose) MongoDB:
|
||||||
NODE_ENV=development
|
NODE_ENV=development
|
||||||
|
|
||||||
# Database (Docker)
|
# Database (Docker)
|
||||||
MONGODB_URI=mongodb://root:example@mongodb:27017/openstock?authSource=admin
|
MONGODB_URI=mongodb://root:example@127.0.0.1:27017/openstock?authSource=admin
|
||||||
|
|
||||||
# Better Auth
|
# Better Auth
|
||||||
BETTER_AUTH_SECRET=your_better_auth_secret
|
BETTER_AUTH_SECRET=your_better_auth_secret
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
services:
|
services:
|
||||||
openstock:
|
openstock:
|
||||||
build: .
|
build:
|
||||||
|
context: .
|
||||||
|
network: host
|
||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
- "3000:3000"
|
||||||
env_file:
|
env_file:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue