mirror of
https://github.com/freedbygrace/ActiveDirectoryManager.git
synced 2026-08-13 12:19:08 +00:00
Add LDAP query builder feature with REST API and UI.
Replit-Commit-Author: Agent Replit-Commit-Session-Id: 705f2157-ef97-4fbd-89e4-8c7f2ecaea90 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7ed01c5f-a82d-405a-b728-b2e3d127c60c/321aa6e4-ad8d-46b1-8b60-5a6d4c572512.jpg
This commit is contained in:
+31
-5
@@ -11,12 +11,17 @@ RUN npm ci
|
||||
# Copy the rest of the source code
|
||||
COPY . .
|
||||
|
||||
# Build the application
|
||||
# Build the application (optimized for production)
|
||||
RUN npm run build
|
||||
|
||||
# Production stage
|
||||
FROM node:20-slim AS runner
|
||||
|
||||
# Install necessary system dependencies
|
||||
RUN apt-get update && apt-get install -y \
|
||||
curl \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Set environment to production
|
||||
@@ -33,14 +38,35 @@ COPY --from=builder /app/dist ./dist
|
||||
COPY ./shared/schema.ts ./shared/
|
||||
COPY ./drizzle.config.ts ./
|
||||
|
||||
# Set the database URL environment variable (this will be overridden at runtime)
|
||||
ENV DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres
|
||||
# Create a directory for logs
|
||||
RUN mkdir -p /app/logs
|
||||
|
||||
# Set session secret (should be overridden at runtime)
|
||||
# Set default environment variables (these should be overridden at runtime)
|
||||
ENV DATABASE_URL=postgres://postgres:postgres@postgres:5432/postgres
|
||||
ENV REDIS_URL=redis://redis:6379
|
||||
ENV SESSION_SECRET=changeme
|
||||
|
||||
# Set rate limiting configuration
|
||||
ENV RATE_LIMIT_WINDOW_MS=900000
|
||||
ENV RATE_LIMIT_MAX_REQUESTS=100
|
||||
|
||||
# Set compression level (1-9, where 9 is maximum compression)
|
||||
ENV COMPRESSION_LEVEL=6
|
||||
|
||||
# Set logging level (debug, info, warn, error)
|
||||
ENV LOG_LEVEL=info
|
||||
|
||||
# Expose the port the app runs on
|
||||
EXPOSE 5000
|
||||
|
||||
# Start the application
|
||||
# Add startup script with health check
|
||||
COPY ./docker-entrypoint.sh /
|
||||
RUN chmod +x /docker-entrypoint.sh
|
||||
|
||||
# Health check to ensure the application is running properly
|
||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
|
||||
CMD curl -f http://localhost:5000/api/health || exit 1
|
||||
|
||||
# Start the application using the entrypoint script
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
CMD ["node", "dist/index.js"]
|
||||
Reference in New Issue
Block a user