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:
parent
f99cac21cf
commit
3dd561bd24
|
|
@ -1,61 +1,10 @@
|
|||
# =============================================================================
|
||||
# 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
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install production dependencies only
|
||||
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"]
|
||||
RUN echo "Admin service not yet implemented" > /app/README.txt
|
||||
CMD ["cat", "/app/README.txt"]
|
||||
|
|
|
|||
|
|
@ -462,36 +462,37 @@ services:
|
|||
networks:
|
||||
- rwa-network
|
||||
|
||||
admin-service:
|
||||
build:
|
||||
context: ./admin-service
|
||||
dockerfile: Dockerfile
|
||||
container_name: rwa-admin-service
|
||||
ports:
|
||||
- "3010:3010"
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- APP_PORT=3010
|
||||
- DATABASE_URL=postgresql://${POSTGRES_USER:-rwa_user}:${POSTGRES_PASSWORD:-rwa_secure_password}@postgres:5432/rwa_identity?schema=public
|
||||
- JWT_SECRET=${JWT_SECRET}
|
||||
- REDIS_HOST=redis
|
||||
- REDIS_PORT=6379
|
||||
- REDIS_PASSWORD=${REDIS_PASSWORD:-}
|
||||
- REDIS_DB=9
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-q", "--spider", "http://localhost:3010/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- rwa-network
|
||||
# admin-service:
|
||||
# # NOTE: Service not yet implemented - uncomment when ready
|
||||
# build:
|
||||
# context: ./admin-service
|
||||
# dockerfile: Dockerfile
|
||||
# container_name: rwa-admin-service
|
||||
# ports:
|
||||
# - "3010:3010"
|
||||
# environment:
|
||||
# - NODE_ENV=production
|
||||
# - APP_PORT=3010
|
||||
# - DATABASE_URL=postgresql://${POSTGRES_USER:-rwa_user}:${POSTGRES_PASSWORD:-rwa_secure_password}@postgres:5432/rwa_identity?schema=public
|
||||
# - JWT_SECRET=${JWT_SECRET}
|
||||
# - REDIS_HOST=redis
|
||||
# - REDIS_PORT=6379
|
||||
# - REDIS_PASSWORD=${REDIS_PASSWORD:-}
|
||||
# - REDIS_DB=9
|
||||
# depends_on:
|
||||
# postgres:
|
||||
# condition: service_healthy
|
||||
# redis:
|
||||
# condition: service_healthy
|
||||
# healthcheck:
|
||||
# test: ["CMD", "wget", "-q", "--spider", "http://localhost:3010/health"]
|
||||
# interval: 30s
|
||||
# timeout: 10s
|
||||
# retries: 3
|
||||
# start_period: 40s
|
||||
# restart: unless-stopped
|
||||
# networks:
|
||||
# - rwa-network
|
||||
|
||||
# ===========================================================================
|
||||
# Volumes
|
||||
|
|
|
|||
Loading…
Reference in New Issue