Skip to content

Centralize/dockerScripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dockerScripts

A comprehensive collection of bash scripts for quickly deploying and managing Docker containers for various applications and services.

Overview

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.

Features

  • 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

Supported Applications

Web Applications

  • 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

Databases

  • MySQL: MySQL server with configurable ports
  • MariaDB: MariaDB database server

Development Tools

  • Portainer: Docker management interface
  • Portainer CE: Community edition
  • Portainer Agent: Remote management agent
  • Prometheus: Monitoring and alerting system

System Services

  • PiHole: Network-wide ad blocking
  • Nginx Proxy: Reverse proxy for container services
  • Redmine: Project management tool

Gaming

  • Minecraft: Minecraft server
  • Cuberite: Lightweight Minecraft server alternative

Quick Start

Interactive Menu

./menu.sh

Dialog-based Menu

./dmenu.sh

Script Categories

Setup Scripts

All setup scripts follow the naming convention setup<Application>.sh:

  • setupWordpress.sh <domain> <customerName> - WordPress with MySQL
  • setupMysql.sh <password> - Standalone MySQL server
  • setupPortainer.sh - Portainer management interface
  • setupPiHole.sh - Pi-hole ad blocker
  • setupRedmineSQLite3.sh <domain> - Redmine with SQLite

Management Scripts

  • cleanNetwork.sh <customerName> - Remove customer networks
  • removeContainer.sh <containerName> - Stop and remove containers
  • cleanUp.sh <domain> - Clean up by domain
  • startAllContainers.sh <containerFile> - Bulk container startup

Utility Scripts

  • console.sh <containerID> <command> - Execute commands in containers
  • createDB.sh <user> <database> - Create MySQL databases
  • listDomains.sh - List active domains
  • setupHosts.sh <hostname> - Add entries to /etc/hosts

Backup & Restore

  • backupAll.sh <containerFile> - Backup multiple containers
  • dockerBackup.sh <container> - Backup single container
  • dockerRestore.sh <container> - Restore container from backup

Usage Examples

WordPress Deployment

./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

Database Setup

./setupMysql.sh mySecurePassword

Container Management

./removeContainer.sh customer1-wordpress
./cleanNetwork.sh customer1

Backup Operations

./dockerBackup.sh customer1-wordpress
./backupAll.sh container_list.txt

Network Architecture

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

Security Features

  • 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

Prerequisites

  • Docker installed and running
  • Sufficient permissions for Docker operations
  • pwgen for password generation (WordPress setup)
  • dialog for interactive menus

Configuration

Port Management

Scripts automatically detect port conflicts and adjust:

  • MySQL: Defaults to 3306, falls back to 3307 if occupied
  • Applications: Configurable port mapping

Domain Setup

Most web applications support virtual host configuration for reverse proxy setups.

File Structure

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

Contributing

When adding new setup scripts:

  1. Follow the naming convention setup<Application>.sh
  2. Include syntax validation and help text
  3. Use consistent variable naming
  4. Add error handling for missing parameters
  5. Update the menu system accordingly

License

Scripts to easily get containers up and running.

About

Scripts to easily get containers up and running.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages