https://github.com/coder7475/ecommerce_microservices
Ecommerce Microservice
https://github.com/coder7475/ecommerce_microservices
api docker docker-compose expressjs microservices postgresql prisma typescript
Last synced: 27 days ago
JSON representation
Ecommerce Microservice
- Host: GitHub
- URL: https://github.com/coder7475/ecommerce_microservices
- Owner: coder7475
- Created: 2025-10-29T16:27:49.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-11-25T06:40:46.000Z (3 months ago)
- Last Synced: 2025-11-29T23:34:31.752Z (3 months ago)
- Topics: api, docker, docker-compose, expressjs, microservices, postgresql, prisma, typescript
- Language: TypeScript
- Homepage:
- Size: 477 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ecommerce Microservices
A collection of microservices for ecommerce
## Services
- [Product Service](./services/product/README.md)
- [Inventory Service](./services/inventory/README.md)
- [User Service](./services/user/README.md)
- [API Gateway](./services/api-gateway/README.md)
- [Auth Service](./services/auth/)
- [Email Service](./services/auth/)
## π οΈ Quickstart
### 1. Install pnpm
```bash
npm install -g pnpm
```
### 2. Install all dependencies for all workspaces
```bash
pnpm install
```
### 3. Run all services in development mode
```bash
pnpm dev
```
---
## Running with Docker Compose
Start all services in the background:
```bash
docker compose up -d
```
---
## Database Access via pgAdmin
You can use **pgAdmin** (running in Docker) to manage your **PostgreSQL** service. Follow these steps:
---
### Step 1: Start the Services
```bash
docker compose up -d
```
This launches both containers:
- **postgres_db** (PostgreSQL)
- **pgadmin_ui** (pgAdmin 4)
Check their status:
```bash
docker ps
```
---
### Step 2: Open pgAdmin in Your Browser
Navigate to:
```
http://localhost:5050
```
Login with:
- **Email:** `admin@example.com`
- **Password:** `admin123`
---
### βοΈ Step 3: Register the PostgreSQL Server in pgAdmin
1. Right-click **Servers β Register β Serverβ¦**
2. Under the **General** tab, choose a name (e.g., `PostgresDB`)
3. Under the **Connection** tab, set:
- **Host name/address:** `postgres` (service name from docker-compose) or `host.docker.internal`
- **Port:** `5432`
- **Maintenance database:** `app_db`
- **Username:** `admin`
- **Password:** `admin123`
- (Optional) Check **Save Password**
Click **Save** to connect!
---
### (Optional) Connect from Your Local Machine
To connect with external tools (e.g., DBeaver, psql) use:
```sh
Host: localhost
Port: 5432
User: admin
Password: admin123
Database: app_db
```
This works because your `docker-compose.yml` maps:
```yaml
ports:
- "5432:5432"
```
---
### Verifying the Connection
After connecting in pgAdmin, you should see:
```
Servers
βββ PostgresDB
βββ Databases
β βββ app_db
```
---
### π References
- [PostgreSQL Docker Image](https://hub.docker.com/_/postgres)
- [pgAdmin Docker Image](https://hub.docker.com/r/dpage/pgadmin4)
- [Docker Compose Networking](https://docs.docker.com/compose/networking/)