fix(services): comment out admin-service (not yet implemented)

- Comment out admin-service in docker-compose.yml
- Simplify admin-service Dockerfile to placeholder
- Fixes build error due to missing source files

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Developer 2025-12-02 02:19:54 -08:00
parent f99cac21cf
commit 3dd561bd24
2 changed files with 35 additions and 85 deletions

View File

@ -1,61 +1,10 @@
# ============================================================================= # =============================================================================
# Admin Service Dockerfile # Admin Service Dockerfile
# ============================================================================= # =============================================================================
# NOTE: This service is not yet implemented. Placeholder only.
# =============================================================================
# Build stage
FROM node:20-alpine AS builder
WORKDIR /app
# Copy package files
COPY package*.json ./
COPY tsconfig*.json ./
COPY nest-cli.json ./
# Copy Prisma schema if exists
COPY prisma ./prisma/ 2>/dev/null || true
# Install dependencies
RUN npm ci
# Generate Prisma client if schema exists
RUN if [ -f "prisma/schema.prisma" ]; then npx prisma generate; fi
# Copy source code
COPY src ./src
# Build TypeScript
RUN npm run build
# Production stage
FROM node:20-alpine FROM node:20-alpine
WORKDIR /app WORKDIR /app
RUN echo "Admin service not yet implemented" > /app/README.txt
# Install production dependencies only CMD ["cat", "/app/README.txt"]
COPY package*.json ./
RUN npm ci --only=production
# Copy Prisma schema and generate client if exists
COPY prisma ./prisma/ 2>/dev/null || true
RUN if [ -f "prisma/schema.prisma" ]; then npx prisma generate; fi
# Copy built files
COPY --from=builder /app/dist ./dist
# Create non-root user
RUN addgroup -g 1001 -S nodejs && \
adduser -S nestjs -u 1001
# Switch to non-root user
USER nestjs
# Expose port
EXPOSE 3010
# Health check
HEALTHCHECK --interval=30s --timeout=3s --start-period=40s --retries=3 \
CMD wget -q --spider http://localhost:3010/health || exit 1
# Start service
CMD ["node", "dist/main.js"]

View File

@ -462,36 +462,37 @@ services:
networks: networks:
- rwa-network - rwa-network
admin-service: # admin-service:
build: # # NOTE: Service not yet implemented - uncomment when ready
context: ./admin-service # build:
dockerfile: Dockerfile # context: ./admin-service
container_name: rwa-admin-service # dockerfile: Dockerfile
ports: # container_name: rwa-admin-service
- "3010:3010" # ports:
environment: # - "3010:3010"
- NODE_ENV=production # environment:
- APP_PORT=3010 # - NODE_ENV=production
- DATABASE_URL=postgresql://${POSTGRES_USER:-rwa_user}:${POSTGRES_PASSWORD:-rwa_secure_password}@postgres:5432/rwa_identity?schema=public # - APP_PORT=3010
- JWT_SECRET=${JWT_SECRET} # - DATABASE_URL=postgresql://${POSTGRES_USER:-rwa_user}:${POSTGRES_PASSWORD:-rwa_secure_password}@postgres:5432/rwa_identity?schema=public
- REDIS_HOST=redis # - JWT_SECRET=${JWT_SECRET}
- REDIS_PORT=6379 # - REDIS_HOST=redis
- REDIS_PASSWORD=${REDIS_PASSWORD:-} # - REDIS_PORT=6379
- REDIS_DB=9 # - REDIS_PASSWORD=${REDIS_PASSWORD:-}
depends_on: # - REDIS_DB=9
postgres: # depends_on:
condition: service_healthy # postgres:
redis: # condition: service_healthy
condition: service_healthy # redis:
healthcheck: # condition: service_healthy
test: ["CMD", "wget", "-q", "--spider", "http://localhost:3010/health"] # healthcheck:
interval: 30s # test: ["CMD", "wget", "-q", "--spider", "http://localhost:3010/health"]
timeout: 10s # interval: 30s
retries: 3 # timeout: 10s
start_period: 40s # retries: 3
restart: unless-stopped # start_period: 40s
networks: # restart: unless-stopped
- rwa-network # networks:
# - rwa-network
# =========================================================================== # ===========================================================================
# Volumes # Volumes