https://github.com/dotpep/scalable-ecommerce-microservices
Scalable E-Commerce Backend Platform Microservices written in Golang, gRPC, API Gateway, Docker, K8s and etc. (https://roadmap.sh/projects/scalable-ecommerce-platform)
https://github.com/dotpep/scalable-ecommerce-microservices
Last synced: 4 months ago
JSON representation
Scalable E-Commerce Backend Platform Microservices written in Golang, gRPC, API Gateway, Docker, K8s and etc. (https://roadmap.sh/projects/scalable-ecommerce-platform)
- Host: GitHub
- URL: https://github.com/dotpep/scalable-ecommerce-microservices
- Owner: dotpep
- Created: 2024-10-23T19:54:08.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-11-15T17:30:14.000Z (8 months ago)
- Last Synced: 2025-01-14T01:15:49.797Z (6 months ago)
- Language: Go
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Core Shop Service (Scalable E-Commerce Microservices)
One Paragraph of project description goes here
## Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
## TO DO
- [ ] Use .env or config/main.yml file for giving PORT (to Dockerfile and etc)
- [ ] Rename of .env variables
- [ ] restructure to clean architecture
- [ ] use .air.toml for watch in dockerfile
- [ ] write endpoints for core-shop-service (routes) (repository)
- [ ] write unit tests
- [ ] write CI/CD
- [ ] divide docker compose to two docker composes (app, storage) and also for staging (development, production)
- [ ] connect swagger/openapi documentation---
- [ ] docker compose (app for api) and (storage for postges)
- [ ] dockerfile and docker compose stagging dev/prod
- [ ] docker image to dockerhub for production## Notes
### Docker
- `docker exec -it core-shop-service-psql_bp-1 bash` (to troubleshoot inside container with bash)
- `docker-compose down -v` deletes volumes (if you have error with /health endpoint that check connection of postgres database)### Powershell
- `netstat` for checking networks and what port they are using
- `ps` is alias for `Get-Process` for checking process that is running or just Task Manager---
How to find web/api-server that is running on specific `port`? and also stop this process.
PORT=8080
PID=160641. `netstat -ano | findstr ` for finding the Process ID (PID)
2. `Get-Process -Id ` for verifying the Process is running
3. `Stop-Process -Id -Force` for terminating the ProcessFull Example:
```powershell
# Find the process ID (PID) on port 8080
$pid = (netstat -ano | findstr :8080 | ForEach-Object { $_ -split '\s+' })[-1]# Verify the process (optional step)
Get-Process -Id $pid# Kill the process
Stop-Process -Id $pid -Force
```### Problems
Problems that can occur:
- port conflict of your LocalMachine Postgres with Docker Postgres (you need to modify: `BLUEPRINT_DB_PORT=5433` in `.env` - `psql_bp: ports: - "${BLUEPRINT_DB_PORT}:5432"` of `docker-compose.yml`)
## MakeFile
Run build make command with tests
```bash
make all
```Build the application
```bash
make build
```Run the application
```bash
make run
```
Create DB container
```bash
make docker-run
```
Show Logs
```bash
make docker-logs
```Shutdown DB Container
```bash
make docker-down
```DB Integrations Test:
```bash
make itest
```Live reload the application:
```bash
make watch
```Run the test suite:
```bash
make test
```Clean up binary from the last build:
```bash
make clean
```
#