Skip to content

OpenStock is an open-source alternative to expensive market platforms. Track real-time prices, set personalized alerts, and explore detailed company insights — built openly, for everyone, forever free.

Fix the build error in #23 by starting mongodb before building and allowing the builder access to mongodb

Nick5ed18338f77b
diff --git a/README.md b/README.md
index e190e26..182ec11 100644
--- a/README.md
+++ b/README.md
@@ -185,7 +185,7 @@ MONGODB_URI=mongodb://root:example@mongodb:27017/openstock?authSource=admin
4) Start the stack:
```bash
# from the repository root
-docker compose up -d --build
+docker compose up -d mongodb && docker compose up -d --build
```
5) Access the app:
@@ -257,7 +257,7 @@ Local (Docker Compose) MongoDB:
NODE_ENV=development
# Database (Docker)
-MONGODB_URI=mongodb://root:example@mongodb:27017/openstock?authSource=admin
+MONGODB_URI=mongodb://root:[email protected]:27017/openstock?authSource=admin
# Better Auth
BETTER_AUTH_SECRET=your_better_auth_secret
diff --git a/docker-compose.yml b/docker-compose.yml
index b08fe1a..16ad864 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,6 +1,8 @@
services:
openstock:
- build: .
+ build:
+ context: .
+ network: host
ports:
- "3000:3000"
env_file: