A comprehensive collection of bash scripts for quickly deploying and managing Docker containers for various applications and services.
This repository provides automated setup scripts for common web applications, databases, development tools, and system services using Docker. Each script handles container creation, network configuration, and service-specific setup requirements.
- Automated Container Deployment: One-command setup for popular applications
- Network Management: Automatic network creation and configuration
- Security: Password generation and secure container networking
- Backup & Restore: Container backup and restoration utilities
- Interactive Menus: User-friendly script selection interfaces
- Lifecycle Management: Start, stop, and cleanup operations
- WordPress: Full WordPress setup with MySQL backend
- Drupal: Drupal CMS deployment
- Ghost Blog: Ghost blogging platform
- OpenCart: E-commerce platform
- Magento: Advanced e-commerce solution
- MySQL: MySQL server with configurable ports
- MariaDB: MariaDB database server
- Portainer: Docker management interface
- Portainer CE: Community edition
- Portainer Agent: Remote management agent
- Prometheus: Monitoring and alerting system
- PiHole: Network-wide ad blocking
- Nginx Proxy: Reverse proxy for container services
- Redmine: Project management tool
- Minecraft: Minecraft server
- Cuberite: Lightweight Minecraft server alternative
./menu.sh
./dmenu.sh
All setup scripts follow the naming convention setup<Application>.sh
:
setupWordpress.sh <domain> <customerName>
- WordPress with MySQLsetupMysql.sh <password>
- Standalone MySQL serversetupPortainer.sh
- Portainer management interfacesetupPiHole.sh
- Pi-hole ad blockersetupRedmineSQLite3.sh <domain>
- Redmine with SQLite
cleanNetwork.sh <customerName>
- Remove customer networksremoveContainer.sh <containerName>
- Stop and remove containerscleanUp.sh <domain>
- Clean up by domainstartAllContainers.sh <containerFile>
- Bulk container startup
console.sh <containerID> <command>
- Execute commands in containerscreateDB.sh <user> <database>
- Create MySQL databaseslistDomains.sh
- List active domainssetupHosts.sh <hostname>
- Add entries to /etc/hosts
backupAll.sh <containerFile>
- Backup multiple containersdockerBackup.sh <container>
- Backup single containerdockerRestore.sh <container>
- Restore container from backup
./setupWordpress.sh example.com customer1
Creates:
- Customer-specific Docker network
- MySQL container with generated password
- WordPress container linked to MySQL
- Domain configuration for reverse proxy
./setupMysql.sh mySecurePassword
./removeContainer.sh customer1-wordpress
./cleanNetwork.sh customer1
./dockerBackup.sh customer1-wordpress
./backupAll.sh container_list.txt
Scripts automatically create isolated networks for multi-container applications:
- Customer-specific networks (e.g.,
customer1-wordpress-net
) - Secure inter-container communication
- External access via reverse proxy
- Generated Passwords: Automatic secure password generation
- Network Isolation: Containers run in isolated networks
- Access Control: Domain-based access restrictions
- No Hardcoded Credentials: Passwords generated at runtime
- Docker installed and running
- Sufficient permissions for Docker operations
pwgen
for password generation (WordPress setup)dialog
for interactive menus
Scripts automatically detect port conflicts and adjust:
- MySQL: Defaults to 3306, falls back to 3307 if occupied
- Applications: Configurable port mapping
Most web applications support virtual host configuration for reverse proxy setups.
dockerScripts/
├── README.md # This file
├── menu.sh # Interactive menu system
├── dmenu.sh # Dialog-based menu
├── menuitems.lst # Menu items list
├── setup*.sh # Application setup scripts
├── clean*.sh # Cleanup utilities
├── docker*.sh # Backup/restore tools
├── *.sh # Additional utilities
└── updateTheFatCyclist # Specific update script
When adding new setup scripts:
- Follow the naming convention
setup<Application>.sh
- Include syntax validation and help text
- Use consistent variable naming
- Add error handling for missing parameters
- Update the menu system accordingly
Scripts to easily get containers up and running.