Sign inSign up

apped/sqlexplorer

By apped

•Updated 10 months ago

Simple, slick SQL Server explorer with container discovery, ERD diagrams, and one-click deployments

Image
Databases & storage
1

929

apped/sqlexplorer repository overview

⁠SQL Explorer

Docker Pulls Docker Image Size Docker Image Version

Simple, slick SQL Server explorer with automatic container discovery, ERD diagrams, one-click deployment, and secure connection management for browsing and querying databases.

⁠Quick Start

# Run SQL Explorer with Docker auto-discovery
docker run -d \
  --name sqlexplorer \
  -p 3000:3001 \
  -v /var/run/docker.sock:/var/run/docker.sock:ro \
  --user root \
  apped/sqlexplorer
⁠Or single line
docker run -d --name sqlexplorer -p 3000:3001 -v /var/run/docker.sock:/var/run/docker.sock:ro --user root apped/sqlexplorer
services:
  sql-explorer:
    image: apped/sqlexplorer:latest
    ports:
      - "3000:3001"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
    environment:
#      - PORT=3001              #optional - default 3001
#      - VERBOSE_LOGGING=true   #optional - default false
#      - READONLY_MODE=true     #optional - default false
#      - ENCRYPTION_KEY=true    #optional - default self generates 

⁠Key Features

  • Auto-Discovery - Automatically finds SQL Server containers on your Docker host
  • One-Click Deployment - Create new SQL Server containers instantly with pre-configured settings
  • Multi-Connection Support - Connect to multiple SQL Server instances simultaneously
  • Interactive ERD Diagrams - Visual database relationship mapping with foreign key detection
  • Advanced Query Interface - Execute queries with syntax highlighting and result visualization
  • Query Results Export - Download results in JSON and CSV formats
  • Detailed Schema Browser - Explore table structures, constraints, and relationships
  • Connection String Export - Copy database connection strings to clipboard
  • Secure Connection Management - Encrypted password storage for enhanced security

⁠Environment Variables

VariableDefaultDescription
PORT3001Server port
VERBOSE_LOGGINGfalseEnable detailed logging for troubleshooting
ENCRYPTION_KEYAuto-generated64-character encryption key for password security
READONLY_MODEfalseEnable/disable database write operations and UI buttons

⁠Connecting to SQL Server

⁠Auto-Discovery

When running inside of docker with the correct permissions, the app can automatically discover and connect to SQL Server instances:

  • Docker Network: Direct container-to-container communication
  • Port Mapping: Host-based connections via localhost
  • Docker Host: Cross-network communication via host.docker.internal
⁠Container Creation

Create new SQL Server containers with one click:

  • Pre-configured with strong SA password
  • Automatic port assignment and network setup
  • Instant connection setup after deployment
  • Container management and monitoring
⁠Manual Connections

Add custom connections with:

  • Server address and port configuration
  • Database selection and switching
  • Windows or SQL Server authentication
  • Encrypted password storage for security
  • Connection testing and validation

⁠Security Considerations

  • Docker Socket: Read-only access for container discovery and management
  • Root User: Required only for Docker socket access (container remains isolated)
  • Password Encryption: All stored passwords are encrypted using AES-256-GCM
  • Authentication: Supports both Windows and SQL Server authentication
  • Secure Communications: TLS/SSL support for database connections
  • Container Isolation: Full network and process isolation
  • No Data Persistence: Data stored in memory only (not on disk) - for now at least

⁠Troubleshooting

⁠Docker Features Not Working?

Make sure you're running with Docker socket access and root user:

docker run -d \
  --user root \
  -v /var/run/docker.sock:/var/run/docker.sock:ro \
  -p 3000:3001 \
  apped/sqlexplorer

Don't need docker support?: Manual connections always work, even without Docker features. The app will guide you if there are any issues.

⁠Database Management Mode

SQL Explorer supports two operation modes controlled by the READONLY_MODE environment variable:

⁠Read-Only Mode (Default: READONLY_MODE=true)
  • Query Execution: SELECT statements only
  • Database Operations: View databases, tables, schemas, and data
  • Security: Write operations are blocked at the server level
  • Use Case: Safe database exploration and reporting
⁠Management Mode (READONLY_MODE=false)
  • Full SQL Access: All SQL statements including INSERT, UPDATE, DELETE, CREATE, DROP
  • Database Management: Create, delete, rename, and clone databases
  • Row Editing: Add, edit, and delete table rows with dynamic type-aware input fields
  • Advanced Operations: Full database administration capabilities
  • Use Case: Complete database management
# Enable management mode
docker run -e READONLY_MODE=false -p 3000:3001 apped/sqlexplorer

# Explicit read-only mode (default)
docker run -e READONLY_MODE=true -p 3000:3001 apped/sqlexplorer

⁠Integration Examples

⁠With Existing SQL Server
# Connect to existing SQL Server container
docker run -d \
  --network your-sql-network \
  -p 3000:3001 \
  -v /var/run/docker.sock:/var/run/docker.sock:ro \
  --user root \
  apped/sqlexplorer

⁠License

© Apped Ltd⁠, all rights reserved.

Usage Terms:

  • Permission is granted to use the Docker images free of charge
  • Redistribution or modification is not permitted
  • Future versions may require a paid license for commercial usage

Tag summary

Content type

Image

Digest

sha256:e7b6b5d8a…

Size

85.3 MB

Last updated

11 months ago

docker pull apped/sqlexplorer