Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions aiopslab-runs/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Git and version control
.git
.gitignore

# Node.js
node_modules
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Environment files (should be mounted or configured at runtime)
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# Development tools
.vscode
.idea
*.swp
*.swo

# OS generated files
.DS_Store
.DS_Store?
._*
Thumbs.db

# Documentation and non-essential files
README.md
*.md
docs/

# Test files
test/
tests/
__tests__/
*.test.js
*.spec.js

# Coverage and build artifacts
coverage/
dist/
build/

# Logs
logs/
*.log

# Runtime data
pids/
*.pid
*.seed
*.pid.lock

# Optional cache directories
.npm
.yarn-integrity
.cache

# Temporary files
tmp/
temp/
.tmp/

# Docker files (not needed inside container)
Dockerfile*
.dockerignore
docker-compose*.yml

# CI/CD files
.github/
.gitlab-ci.yml
.travis.yml
Jenkinsfile
25 changes: 25 additions & 0 deletions aiopslab-runs/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# AIOpsLab Viewer Server Configuration
# Copy this file to .env and modify as needed

# Server Configuration
PORT=3000
HTTPS_PORT=3443
HOST=0.0.0.0

# Runs Configuration
RUNS_PATH=./runs

# Database Configuration
DATABASE_PATH=./runs.db


# Security Configuration
RATE_LIMIT_WINDOW_MS=900000
RATE_LIMIT_MAX_REQUESTS=100

# Development/Production Mode
NODE_ENV=development

# Logging
LOG_LEVEL=info
LOG_FORMAT=combined
156 changes: 156 additions & 0 deletions aiopslab-runs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
# Node.js dependencies
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
package-lock.json

# Environment configuration (keep .env.example for reference)
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

runs/
*.db

# SSL certificates and keys (regenerate with npm run generate-certs)
ssl/
*.key
*.crt
*.pem
*.p12
*.pfx

# NOTE: We keep the following for the project:
# - runs/ directory and all run data (log files, evaluation files)
# - runs.db database file with run metadata
# This allows full project reproduction with actual data

# Log files
logs/
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Runtime data
pids/
*.pid
*.seed
*.pid.lock

# Coverage directory used by tools like istanbul
coverage/
*.lcov

# nyc test coverage
.nyc_output

# Dependency directories
jspm_packages/

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
public

# Storybook build outputs
.out
.storybook-out

# Temporary folders
tmp/
temp/

# Editor directories and files
.vscode/
.idea/
*.swp
*.swo
*~

# OS generated files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Backup files
*.bak
*.backup
*.old

# Runtime and cache
.cache/
.temp/
.tmp/

# ESLint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
37 changes: 37 additions & 0 deletions aiopslab-runs/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Use Node.js 18 Alpine for smaller image size
FROM infyartifactory.jfrog.io/docker-local/node:18.12.1-alpine3.15

# Set working directory
WORKDIR /app

# Install OpenSSL for certificate generation
RUN apk add --no-cache openssl

# Copy package files first for better Docker layer caching
COPY package*.json ./

# Install dependencies
RUN npm ci --only=production

# Copy application source code
COPY . .

# Create necessary directories with proper permissions
RUN mkdir -p /app/ssl /app/runs && \
chown -R node:node /app

# Generate SSL certificates (self-signed for development)
RUN npm run generate-certs

# Switch to non-root user for security
USER node

# Expose both HTTP and HTTPS ports
EXPOSE 3000 3443

# Health check endpoint
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD node -e "require('http').get('http://localhost:3000/health', (res) => { process.exit(res.statusCode === 200 ? 0 : 1) })"

# Start the server
CMD ["npm", "start"]
Loading