feat: comprehensive project structure improvements and Cloud for Sovereignty landing zone
- Add Cloud for Sovereignty landing zone architecture and deployment - Implement complete legal document management system - Reorganize documentation with improved navigation - Add infrastructure improvements (Dockerfiles, K8s, monitoring) - Add operational improvements (graceful shutdown, rate limiting, caching) - Create comprehensive project structure documentation - Add Azure deployment automation scripts - Improve repository navigation and organization
This commit is contained in:
90
scripts/dev/docker-compose-dev.yml
Normal file
90
scripts/dev/docker-compose-dev.yml
Normal file
@@ -0,0 +1,90 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:15-alpine
|
||||
environment:
|
||||
POSTGRES_USER: theorder
|
||||
POSTGRES_PASSWORD: theorder_dev
|
||||
POSTGRES_DB: theorder_dev
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U theorder"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
ports:
|
||||
- "6379:6379"
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
opensearch:
|
||||
image: opensearchproject/opensearch:2.11.0
|
||||
environment:
|
||||
- discovery.type=single-node
|
||||
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
|
||||
- "DISABLE_SECURITY_PLUGIN=true"
|
||||
ports:
|
||||
- "9200:9200"
|
||||
- "9600:9600"
|
||||
volumes:
|
||||
- opensearch_data:/usr/share/opensearch/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -f http://localhost:9200/_cluster/health || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
|
||||
opensearch-dashboards:
|
||||
image: opensearchproject/opensearch-dashboards:2.11.0
|
||||
ports:
|
||||
- "5601:5601"
|
||||
environment:
|
||||
- 'OPENSEARCH_HOSTS=["http://opensearch:9200"]'
|
||||
- "DISABLE_SECURITY_DASHBOARDS_PLUGIN=true"
|
||||
depends_on:
|
||||
opensearch:
|
||||
condition: service_healthy
|
||||
|
||||
prometheus:
|
||||
image: prom/prometheus:latest
|
||||
ports:
|
||||
- "9090:9090"
|
||||
volumes:
|
||||
- ./prometheus-config.yml:/etc/prometheus/prometheus.yml
|
||||
- prometheus_data:/prometheus
|
||||
command:
|
||||
- '--config.file=/etc/prometheus/prometheus.yml'
|
||||
- '--storage.tsdb.path=/prometheus'
|
||||
|
||||
grafana:
|
||||
image: grafana/grafana:latest
|
||||
ports:
|
||||
- "3000:3000"
|
||||
environment:
|
||||
- GF_SECURITY_ADMIN_USER=admin
|
||||
- GF_SECURITY_ADMIN_PASSWORD=admin
|
||||
- GF_SERVER_ROOT_URL=http://localhost:3000
|
||||
volumes:
|
||||
- grafana_data:/var/lib/grafana
|
||||
depends_on:
|
||||
- prometheus
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
redis_data:
|
||||
opensearch_data:
|
||||
prometheus_data:
|
||||
grafana_data:
|
||||
|
||||
48
scripts/dev/setup-dev.sh
Executable file
48
scripts/dev/setup-dev.sh
Executable file
@@ -0,0 +1,48 @@
|
||||
#!/bin/bash
|
||||
# Development environment setup script
|
||||
|
||||
set -e
|
||||
|
||||
echo "🚀 Setting up development environment..."
|
||||
|
||||
# Check prerequisites
|
||||
command -v docker >/dev/null 2>&1 || { echo "Docker is required but not installed. Aborting." >&2; exit 1; }
|
||||
command -v docker-compose >/dev/null 2>&1 || { echo "Docker Compose is required but not installed. Aborting." >&2; exit 1; }
|
||||
command -v pnpm >/dev/null 2>&1 || { echo "pnpm is required but not installed. Aborting." >&2; exit 1; }
|
||||
|
||||
# Start services
|
||||
echo "Starting Docker services..."
|
||||
docker-compose -f scripts/dev/docker-compose-dev.yml up -d
|
||||
|
||||
# Wait for services to be ready
|
||||
echo "Waiting for services to be ready..."
|
||||
sleep 10
|
||||
|
||||
# Check service health
|
||||
echo "Checking service health..."
|
||||
docker-compose -f scripts/dev/docker-compose-dev.yml ps
|
||||
|
||||
# Install dependencies
|
||||
echo "Installing dependencies..."
|
||||
pnpm install
|
||||
|
||||
# Run database migrations
|
||||
echo "Running database migrations..."
|
||||
pnpm --filter @the-order/database migrate
|
||||
|
||||
# Build packages
|
||||
echo "Building packages..."
|
||||
pnpm build
|
||||
|
||||
echo "✅ Development environment ready!"
|
||||
echo ""
|
||||
echo "Services available at:"
|
||||
echo " • PostgreSQL: localhost:5432"
|
||||
echo " • Redis: localhost:6379"
|
||||
echo " • OpenSearch: localhost:9200"
|
||||
echo " • OpenSearch Dashboards: http://localhost:5601"
|
||||
echo " • Prometheus: http://localhost:9090"
|
||||
echo " • Grafana: http://localhost:3000 (admin/admin)"
|
||||
echo ""
|
||||
echo "To start services: pnpm dev"
|
||||
|
||||
Reference in New Issue
Block a user