nxtgauge-backend-rust/docker-compose.yml
Ashwin Kumar Sivakumar c570d7df67 chore: remove the dead apps/leads microservice
apps/leads implemented its own, independent "lead request" system
(POST /api/leads, /api/lead-requests/send, accept/reject) with a
schema that never matched the live one (message vs remarks, no
professional_user_id, accepted_at/rejected_at instead of resolved_at —
see 20260721030000_create_lead_requests's commit message). Confirmed
unreachable: the frontend's live flows use apps/customers'
/api/customers/requirements and each profession's /leads/request
(crates/contracts::profession_shared), never anything under
apps/leads' own paths. Its /api/lead-requests/* endpoints weren't even
reachable through the gateway (wrong prefix, never matched
/api/leads or /api/admin/leads).

Removed:
- apps/leads/ entirely, and its Cargo.toml workspace membership
- the `leads` docker-compose service, its LEADS_SERVICE_URL env var on
  gateway, and gateway's depends_on entry
- the `leads` entry from both CI build matrices (.gitea/.forgejo)
- gateway's leads_url field/routing branch — gateway no longer hard-
  requires LEADS_SERVICE_URL to boot (.expect() would have panicked
  once the service was gone); /api/admin/leads now falls through to
  the customers service, which already had a matching (previously
  shadowed) branch for it

NOTE: this service may still have a live Deployment/Service in
nxtgauge-gitops (a separate repo not touched here) — that manifest
should be removed too, or the next deploy will reference an image that
no CI job builds anymore.
2026-07-21 04:19:56 +05:30

350 lines
11 KiB
YAML

services:
postgres:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_USER: nxtgauge
POSTGRES_PASSWORD: nxtgauge_dev
POSTGRES_DB: nxtgauge_db
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
- ./scripts/seed.sql:/docker-entrypoint-initdb.d/seed.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U nxtgauge -d nxtgauge_db"]
interval: 5s
timeout: 5s
retries: 10
redis:
image: redis:7-alpine
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- redisdata:/data
command: redis-server --appendonly yes
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 10
# ── Gateway ───────────────────────────────────────────────────────────────
gateway:
platform: linux/amd64
image: ci.nxtgauge.com/ashwin/nxtgauge-rust-gateway:high-performance-latest
ports:
- "9100:9100"
environment:
PORT: "9100"
DATABASE_URL: postgresql://nxtgauge:nxtgauge_dev@postgres:5432/nxtgauge_db
REDIS_URL: redis://redis:6379
JWT_SECRET: local_dev_jwt_secret
RUST_LOG: info
FRONTEND_URL: http://localhost:9201
ADMIN_URL: http://localhost:9202
USERS_SERVICE_URL: http://users:9101
COMPANIES_SERVICE_URL: http://companies:9102
JOBS_SERVICE_URL: http://jobs:9103
JOB_SEEKERS_SERVICE_URL: http://job-seekers:9104
CUSTOMERS_SERVICE_URL: http://customers:9105
EMPLOYEES_SERVICE_URL: http://employees:9106
PHOTOGRAPHERS_SERVICE_URL: http://photographers:9107
TUTORS_SERVICE_URL: http://tutors:9108
MAKEUP_ARTISTS_SERVICE_URL: http://makeup-artists:9109
DEVELOPERS_SERVICE_URL: http://developers:9110
VIDEO_EDITORS_SERVICE_URL: http://video-editors:9111
GRAPHIC_DESIGNERS_SERVICE_URL: http://graphic-designers:9112
SOCIAL_MEDIA_MANAGERS_SERVICE_URL: http://social-media-managers:9113
FITNESS_TRAINERS_SERVICE_URL: http://fitness-trainers:9114
CATERING_SERVICES_SERVICE_URL: http://catering-services:9115
PAYMENTS_SERVICE_URL: http://payments:9116
UGC_CONTENT_CREATORS_SERVICE_URL: http://ugc-content-creators:9117
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
users:
condition: service_started
companies:
condition: service_started
jobs:
condition: service_started
job-seekers:
condition: service_started
customers:
condition: service_started
employees:
condition: service_started
photographers:
condition: service_started
tutors:
condition: service_started
makeup-artists:
condition: service_started
developers:
condition: service_started
video-editors:
condition: service_started
graphic-designers:
condition: service_started
social-media-managers:
condition: service_started
fitness-trainers:
condition: service_started
catering-services:
condition: service_started
payments:
condition: service_started
ugc-content-creators:
condition: service_started
# ── Core Services ─────────────────────────────────────────────────────────
users:
platform: linux/amd64
image: ci.nxtgauge.com/ashwin/nxtgauge-rust-users:high-performance-latest
environment:
PORT: "9101"
DATABASE_URL: postgresql://nxtgauge:nxtgauge_dev@postgres:5432/nxtgauge_db
REDIS_URL: redis://redis:6379
JWT_SECRET: local_dev_jwt_secret
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
companies:
platform: linux/amd64
image: ci.nxtgauge.com/ashwin/nxtgauge-rust-companies:high-performance-latest
environment:
PORT: "9102"
DATABASE_URL: postgresql://nxtgauge:nxtgauge_dev@postgres:5432/nxtgauge_db
REDIS_URL: redis://redis:6379
JWT_SECRET: local_dev_jwt_secret
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
jobs:
platform: linux/amd64
image: ci.nxtgauge.com/ashwin/nxtgauge-rust-jobs:high-performance-latest
environment:
PORT: "9103"
DATABASE_URL: postgresql://nxtgauge:nxtgauge_dev@postgres:5432/nxtgauge_db
depends_on:
postgres:
condition: service_healthy
job-seekers:
platform: linux/amd64
image: ci.nxtgauge.com/ashwin/nxtgauge-rust-job-seekers:high-performance-latest
environment:
PORT: "9104"
DATABASE_URL: postgresql://nxtgauge:nxtgauge_dev@postgres:5432/nxtgauge_db
REDIS_URL: redis://redis:6379
JWT_SECRET: local_dev_jwt_secret
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
customers:
platform: linux/amd64
image: ci.nxtgauge.com/ashwin/nxtgauge-rust-customers:high-performance-latest
environment:
PORT: "9105"
DATABASE_URL: postgresql://nxtgauge:nxtgauge_dev@postgres:5432/nxtgauge_db
REDIS_URL: redis://redis:6379
JWT_SECRET: local_dev_jwt_secret
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
employees:
platform: linux/amd64
image: ci.nxtgauge.com/ashwin/nxtgauge-rust-employees:high-performance-latest
environment:
PORT: "9106"
DATABASE_URL: postgresql://nxtgauge:nxtgauge_dev@postgres:5432/nxtgauge_db
REDIS_URL: redis://redis:6379
JWT_SECRET: local_dev_jwt_secret
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
# ── 9 Profession Services ─────────────────────────────────────────────────
photographers:
platform: linux/amd64
image: ci.nxtgauge.com/ashwin/nxtgauge-rust-photographers:high-performance-latest
environment:
PORT: "9107"
DATABASE_URL: postgresql://nxtgauge:nxtgauge_dev@postgres:5432/nxtgauge_db
REDIS_URL: redis://redis:6379
JWT_SECRET: local_dev_jwt_secret
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
tutors:
platform: linux/amd64
image: ci.nxtgauge.com/ashwin/nxtgauge-rust-tutors:high-performance-latest
environment:
PORT: "9108"
DATABASE_URL: postgresql://nxtgauge:nxtgauge_dev@postgres:5432/nxtgauge_db
REDIS_URL: redis://redis:6379
JWT_SECRET: local_dev_jwt_secret
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
makeup-artists:
platform: linux/amd64
image: ci.nxtgauge.com/ashwin/nxtgauge-rust-makeup-artists:high-performance-latest
environment:
PORT: "9109"
DATABASE_URL: postgresql://nxtgauge:nxtgauge_dev@postgres:5432/nxtgauge_db
REDIS_URL: redis://redis:6379
JWT_SECRET: local_dev_jwt_secret
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
developers:
platform: linux/amd64
image: ci.nxtgauge.com/ashwin/nxtgauge-rust-developers:high-performance-latest
environment:
PORT: "9110"
DATABASE_URL: postgresql://nxtgauge:nxtgauge_dev@postgres:5432/nxtgauge_db
REDIS_URL: redis://redis:6379
JWT_SECRET: local_dev_jwt_secret
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
video-editors:
platform: linux/amd64
image: ci.nxtgauge.com/ashwin/nxtgauge-rust-video-editors:high-performance-latest
environment:
PORT: "9111"
DATABASE_URL: postgresql://nxtgauge:nxtgauge_dev@postgres:5432/nxtgauge_db
REDIS_URL: redis://redis:6379
JWT_SECRET: local_dev_jwt_secret
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
graphic-designers:
platform: linux/amd64
image: ci.nxtgauge.com/ashwin/nxtgauge-rust-graphic-designers:high-performance-latest
environment:
PORT: "9112"
DATABASE_URL: postgresql://nxtgauge:nxtgauge_dev@postgres:5432/nxtgauge_db
REDIS_URL: redis://redis:6379
JWT_SECRET: local_dev_jwt_secret
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
social-media-managers:
platform: linux/amd64
image: ci.nxtgauge.com/ashwin/nxtgauge-rust-social-media-managers:high-performance-latest
environment:
PORT: "9113"
DATABASE_URL: postgresql://nxtgauge:nxtgauge_dev@postgres:5432/nxtgauge_db
REDIS_URL: redis://redis:6379
JWT_SECRET: local_dev_jwt_secret
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
fitness-trainers:
platform: linux/amd64
image: ci.nxtgauge.com/ashwin/nxtgauge-rust-fitness-trainers:high-performance-latest
environment:
PORT: "9114"
DATABASE_URL: postgresql://nxtgauge:nxtgauge_dev@postgres:5432/nxtgauge_db
REDIS_URL: redis://redis:6379
JWT_SECRET: local_dev_jwt_secret
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
catering-services:
platform: linux/amd64
image: ci.nxtgauge.com/ashwin/nxtgauge-rust-catering-services:high-performance-latest
environment:
PORT: "9115"
DATABASE_URL: postgresql://nxtgauge:nxtgauge_dev@postgres:5432/nxtgauge_db
REDIS_URL: redis://redis:6379
JWT_SECRET: local_dev_jwt_secret
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
# ── Payments ──────────────────────────────────────────────────────────────
payments:
platform: linux/amd64
image: ci.nxtgauge.com/ashwin/nxtgauge-rust-payments:high-performance-latest
environment:
PORT: "9116"
DATABASE_URL: postgresql://nxtgauge:nxtgauge_dev@postgres:5432/nxtgauge_db
REDIS_URL: redis://redis:6379
JWT_SECRET: local_dev_jwt_secret
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
# ── UGC ───────────────────────────────────────────────────────────────────
ugc-content-creators:
platform: linux/amd64
image: ci.nxtgauge.com/ashwin/nxtgauge-rust-ugc-content-creators:high-performance-latest
environment:
PORT: "9117"
DATABASE_URL: postgresql://nxtgauge:nxtgauge_dev@postgres:5432/nxtgauge_db
REDIS_URL: redis://redis:6379
JWT_SECRET: local_dev_jwt_secret
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
volumes:
pgdata:
redisdata: