Skip to content

Commit

Permalink
feat: included user product review and staring product functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
Jhaemis-hack committed Feb 28, 2025
1 parent 4966505 commit 1e59d1d
Show file tree
Hide file tree
Showing 14 changed files with 34,189 additions and 78 deletions.
46 changes: 19 additions & 27 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,41 +1,33 @@
NODE_ENV=development
PROFILE=local
PORT=5000
HOST=
REDIS_PORT= 6379
DB_SSL=true
NODE_ENV=development

PORT=3008

JWT_SECRET=someSecrets
JWT_EXPIRY_TIMEFRAME=3600


REDIS_HOST=localhost
REDIS_PORT=6379
DB_TYPE=

DB_TYPE=postgres
DB_USERNAME=
DB_PASSWORD=
DB_HOST=
DB_NAME=hng
DB_HOST=localhost
DB_DATABASE=
DB_ENTITIES=dist/src/modules/**/entities/**/*.entity{.ts,.js}
DB_MIGRATIONS=dist/db/migrations/*{.ts,.js}
POSGRES_USER=$DB_USERNAME
POST
JWT_SECRET=gsgs
JWT_EXPIRY_TIMEFRAME=1500000
DB_SSL=false
JWT_REFRESH_SECRET=bbp
JWT_REFRESH_EXPIRY_TIMEFRAME=15
GOOGLE_REDIRECT_URI=

JWT_SECRET=someSecrets
JWT_EXPIRY_TIMEFRAME=3600

ADMIN_SECRET_KEY=sometext

GOOGLE_CLIENT_SECRET=
GOOGLE_CLIENT_ID=
OAUTH_LOGIN_REDIRECT=
SMTP_HOST=

SMTP_HOST=sandbox.smtp.mailtrap.io
SMTP_PORT=587
SERVER_NAME=Boilerplate
SERVER_NAME=api
SMTP_USER=
SMTP_PASSWORD=
FRONTEND_URL=
ADMIN_SECRET=
SUPPORT_EMAIL=
AUTH_PASSWORD=
BASE_URL=
FLUTTERWAVE_SECRET_KEY=
FLUTTERWAVE_BASE_URL=
SMTP_PASSWORD=
2 changes: 1 addition & 1 deletion .env.local
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ NODE_ENV=development
PORT=3000

DB_USERNAME=username
DB_PASSWORD=password
DB_PASSWORD=password123
DB_TYPE=postgres
DB_NAME=database
DB_HOST=localhost
Expand Down
135 changes: 86 additions & 49 deletions compose/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,65 +1,102 @@
name: nestjs

services:
app:
image: ${COMPOSE_PROJECT_NAME}
build: .
env_file:
- .env
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: 'wget -qO- http://app:${PORT}'
interval: 10s
timeout: 10s
retries: 3
# services:
# app:
# image: ${COMPOSE_PROJECT_NAME}
# build: .
# env_file:
# - .env
# depends_on:
# db:
# condition: service_healthy
# redis:
# condition: service_healthy
# healthcheck:
# test: 'wget -qO- http://app:${PORT}'
# interval: 10s
# timeout: 10s
# retries: 3

# db:
# image: postgres:16-alpine
# env_file:
# - .env
# environment:
# - POSTGRES_USER=${DB_USERNAME}
# - POSTGRES_PASSWORD=${DB_PASSWORD}
# - POSTGRES_DB=${DB_NAME}
# volumes:
# - postgres_data:/var/lib/postgresql/data
# healthcheck:
# test: 'pg_isready -U postgres'
# interval: 5s
# timeout: 5s
# retries: 3
# restart: always

# redis:
# image: redis:7-alpine
# env_file:
# - .env
# volumes:
# - redis_data:/data
# healthcheck:
# test: 'redis-cli ping | grep PONG'
# interval: 5s
# timeout: 5s
# retries: 3
# restart: always

db:
image: postgres:16-alpine
env_file:
- .env
# nginx:
# image: nginx:alpine
# volumes:
# - ./nginx/nginx.conf:/etc/nginx/nginx.conf
# depends_on:
# app:
# condition: service_healthy
# healthcheck:
# test: 'wget -qO- http://nginx:80'
# interval: 5s
# timeout: 5s
# retries: 3

# volumes:
# postgres_data:
# redis_data:

services:
postgres:
container_name: postgres-boiler
image: postgres:latest
ports:
- '5432:5432'
environment:
- POSTGRES_USER=${DB_USERNAME}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
- POSTGRES_DB=${DB_DATABASE}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: 'pg_isready -U postgres'
interval: 5s
timeout: 5s
retries: 3
- ./data/db:/var/lib/postgresql/data
restart: always

adminer:
image: adminer
container_name: adminer-boiler
ports:
- '8080:8080'
restart: always
depends_on:
- postgres

redis:
image: redis:7-alpine
env_file:
- .env
image: redis:latest
container_name: redis-boiler
ports:
- '6379:6379'
command: ['redis-server', '--appendonly', 'yes']
volumes:
- redis_data:/data
healthcheck:
test: 'redis-cli ping | grep PONG'
interval: 5s
timeout: 5s
retries: 3
restart: always

nginx:
image: nginx:alpine
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
depends_on:
app:
condition: service_healthy
healthcheck:
test: 'wget -qO- http://nginx:80'
interval: 5s
timeout: 5s
retries: 3

volumes:
postgres_data:
data:
redis_data:
Loading

0 comments on commit 1e59d1d

Please sign in to comment.