Follow these steps to set up and run the project:
-
Clone the repository(SSH)
git clone git@github.com:99Notesdevs/backend.git cd backend
-
Clone the repository(HTTPS)
git clone https://github.com/99Notesdevs/backend.git cd backend
-
Start the containers First Time ONLY
docker-compose up --build -d
After First Time
docker-compose up -d
-
Run database migrations First Time ONLY
docker exec -it local_app npx prisma migrate dev
-
Seed the database
docker exec -it local_app node prisma/seed
In case of redis cache hit problem
docker exec -it local_redis redis-cli FLUSHALL
DON'T FORGET TO SET THE .env file
Now your backend is running with the Prisma client and migrations applied.
-
Check logs in backend:
docker logs -f local_app
-
Check logs in grafana:
docker logs -f local_grafana
-
Check logs in loki:
docker logs -f local_loki
** Configure Data Source in Grafana at http://localhost:3200
to http://loki:3100
**
- local_app:
http://localhost:5000
- local_grafana:
http://grafana:3200
- local_loki:
http://loki:3100
- local_postgres:
postgres:5432
- local_redis:
redis:6379