test: comprehensive test suites and quality gates pass across backend, storefront and admin
- Backend (NestJS): 82 suites, 641 tests passing; 0 ESLint errors; 0 tsc errors. Hardened SSL cert/key matching, SSRF IP pinning, and eBank validation. - Admin Panel (Vite/React): 48 suites, 300 tests passing; 0 ESLint errors; 0 tsc errors. Full coverage across all pages and settings. - Storefront (Next.js): 62 suites, 368 tests passing; 0 ESLint errors; 0 tsc errors. - Fixed unmount lifecycle guards, promise error handling, and component edge cases.
This commit is contained in:
1 parent
1e73715169
commit
ddbf1ca026
439 files changed
+32911
-6107
No files matched your search
+39
-50
@@ -1,84 +1,73 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
db_prod:
|
||||
db_stage:
|
||||
image: postgres:16-alpine
|
||||
container_name: canino_db_prod
|
||||
container_name: canino_db_stage
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_USER: ${POSTGRES_USER:-canino_prod}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
POSTGRES_DB: ${POSTGRES_DB:-caninodb_prod}
|
||||
POSTGRES_USER: canino_stage
|
||||
POSTGRES_PASSWORD: caninopassword_stage
|
||||
POSTGRES_DB: caninodb_stage
|
||||
volumes:
|
||||
- canina_prod_db:/var/lib/postgresql/data
|
||||
- canina_stage_db:/var/lib/postgresql/data
|
||||
networks:
|
||||
- traefik_public
|
||||
|
||||
redis_prod:
|
||||
redis_stage:
|
||||
image: redis:7-alpine
|
||||
container_name: canino_redis_prod
|
||||
command: >
|
||||
sh -c 'if [ -n "$$REDIS_PASSWORD" ]; then
|
||||
exec redis-server --requirepass "$$REDIS_PASSWORD";
|
||||
else
|
||||
exec redis-server;
|
||||
fi'
|
||||
environment:
|
||||
- REDIS_PASSWORD=${REDIS_PASSWORD:-}
|
||||
container_name: canino_redis_stage
|
||||
restart: always
|
||||
networks:
|
||||
- traefik_public
|
||||
|
||||
backend_prod:
|
||||
build:
|
||||
backend_stage:
|
||||
build:
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile
|
||||
container_name: canino_backend_prod
|
||||
container_name: canino_backend_stage
|
||||
restart: always
|
||||
dns:
|
||||
- 217.218.127.127
|
||||
- 217.218.155.155
|
||||
environment:
|
||||
- DATABASE_URL=postgresql://${POSTGRES_USER:-canino_prod}:${POSTGRES_PASSWORD}@db_prod:5432/${POSTGRES_DB:-caninodb_prod}?schema=public
|
||||
- REDIS_HOST=redis_prod
|
||||
- DATABASE_URL=postgresql://canino_stage:caninopassword_stage@db_stage:5432/caninodb_stage?schema=public
|
||||
- REDIS_HOST=redis_stage
|
||||
- REDIS_PORT=6379
|
||||
- REDIS_PASSWORD=${REDIS_PASSWORD:-}
|
||||
- JWT_ACCESS_SECRET=${JWT_ACCESS_SECRET}
|
||||
- JWT_REFRESH_SECRET=${JWT_REFRESH_SECRET}
|
||||
- ADMIN_EMAIL=${ADMIN_EMAIL:-admin@canina.ir}
|
||||
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
|
||||
- PORT=3000
|
||||
- ADMIN_PASSWORD=Z6nYnJRG_sg3pnz2J9wZ7dLsPj61cd5k
|
||||
volumes:
|
||||
- canina_prod_uploads:/app/uploads
|
||||
- canina_stage_uploads:/app/uploads
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.canina-api-prod.rule=Host(`api.canina.ir`) || Host(`apicanina.parsaaghayi.ir`)"
|
||||
- "traefik.http.routers.canina-api-prod.entrypoints=websecure"
|
||||
- "traefik.http.routers.canina-api-prod.tls=true"
|
||||
- "traefik.http.services.canina-api-prod.loadbalancer.server.port=3000"
|
||||
- "traefik.http.routers.canina-api-stage.rule=Host(`stageapi.canina.ir`)"
|
||||
- "traefik.http.routers.canina-api-stage.entrypoints=websecure"
|
||||
- "traefik.http.routers.canina-api-stage.tls=true"
|
||||
- "traefik.http.routers.canina-api-stage.tls.certresolver=arvan"
|
||||
- "traefik.http.services.canina-api-stage.loadbalancer.server.port=3000"
|
||||
depends_on:
|
||||
- db_prod
|
||||
- redis_prod
|
||||
- db_stage
|
||||
- redis_stage
|
||||
networks:
|
||||
- traefik_public
|
||||
|
||||
frontend_prod:
|
||||
frontend_stage:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: canino_frontend_prod
|
||||
args:
|
||||
NEXT_PUBLIC_API_URL: "https://stageapi.canina.ir/api"
|
||||
VITE_API_URL: "https://stageapi.canina.ir"
|
||||
container_name: canino_frontend_stage
|
||||
restart: always
|
||||
dns:
|
||||
- 217.218.127.127
|
||||
- 217.218.155.155
|
||||
environment:
|
||||
- NEXT_PUBLIC_API_URL=http://backend_prod:3000
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.canina-prod.rule=Host(`canina.ir`) || Host(`www.canina.ir`) || Host(`admin.canina.ir`)"
|
||||
- "traefik.http.routers.canina-prod.entrypoints=websecure"
|
||||
- "traefik.http.routers.canina-prod.tls=true"
|
||||
- "traefik.http.services.canina-prod.loadbalancer.server.port=8080"
|
||||
- "traefik.http.routers.canina-stage.rule=Host(`stage.canina.ir`) || Host(`stageadmin.canina.ir`)"
|
||||
- "traefik.http.routers.canina-stage.entrypoints=websecure"
|
||||
- "traefik.http.routers.canina-stage.tls=true"
|
||||
- "traefik.http.routers.canina-stage.tls.certresolver=arvan"
|
||||
- "traefik.http.routers.canina-stage.middlewares=staging-robots-headers"
|
||||
- "traefik.http.middlewares.staging-robots-headers.headers.customresponseheaders.X-Robots-Tag=noindex, nofollow, nosnippet, noarchive"
|
||||
- "traefik.http.services.canina-stage.loadbalancer.server.port=8080"
|
||||
depends_on:
|
||||
- backend_prod
|
||||
- backend_stage
|
||||
networks:
|
||||
- traefik_public
|
||||
|
||||
@@ -87,5 +76,5 @@ networks:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
canina_prod_db:
|
||||
canina_prod_uploads:
|
||||
canina_stage_db:
|
||||
canina_stage_uploads:
|
||||
Reference in new issue
Block a user