mirror of
https://github.com/freedbygrace/SQL.git
synced 2026-07-26 11:28:16 +00:00
dc5e9f8597
PGADMIN FIX: - Changed email from admin@businessanalytics.local to admin@example.com - pgAdmin rejects .local domains as invalid email addresses - Updated all documentation with correct email SETUP VERIFICATION: - Added 5 SQL verification queries to setup-database.sh - Query 1: Sample countries (top 5) - Query 2: Sample merchant categories (top 5) - Query 3: All transaction types with descriptions - Query 4: All fraud types ordered by severity - Query 5: All customer segments with descriptions BENEFITS: - Users can immediately see that data was loaded correctly - Provides visual confirmation of schema setup - Shows sample data structure before generating full dataset - Helps troubleshoot setup issues early
62 lines
1.8 KiB
YAML
62 lines
1.8 KiB
YAML
# ============================================================================
|
|
# Business Analytics Database - Docker Compose Configuration
|
|
# ============================================================================
|
|
# IMPORTANT: Before running docker-compose up, ensure proper permissions:
|
|
# Run: ./scripts/fix-permissions.sh
|
|
# Or: sudo chown -R $USER:$USER . && chmod -R 755 data/ schema/ scripts/
|
|
# ============================================================================
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: business_analytics_db
|
|
environment:
|
|
POSTGRES_DB: business_analytics
|
|
POSTGRES_USER: data_analyst
|
|
POSTGRES_PASSWORD: SecurePass123!
|
|
PGDATA: /var/lib/postgresql/data/pgdata
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
- ./schema:/docker-entrypoint-initdb.d # Bind mount - requires proper permissions
|
|
- ./data:/data # Bind mount - requires proper permissions
|
|
networks:
|
|
- analytics_network
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U data_analyst -d business_analytics"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
|
|
pgadmin:
|
|
image: dpage/pgadmin4:latest
|
|
container_name: business_analytics_ui
|
|
environment:
|
|
PGADMIN_DEFAULT_EMAIL: admin@example.com
|
|
PGADMIN_DEFAULT_PASSWORD: SecurePass123!
|
|
PGADMIN_CONFIG_SERVER_MODE: 'False'
|
|
PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED: 'False'
|
|
ports:
|
|
- "3000:80"
|
|
networks:
|
|
- analytics_network
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
volumes:
|
|
- pgadmin_data:/var/lib/pgadmin
|
|
|
|
networks:
|
|
analytics_network:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
postgres_data:
|
|
driver: local
|
|
pgadmin_data:
|
|
driver: local
|
|
|