A lightweight C++ automation tool designed to streamline the process of launching and managing Docker, Ollama, and Open WebUI. The tool will monitor the Docker process and clean up after it has been closed.
- Config.json creation to define paths to executables
- Automated startup sequence for Docker Desktop and Ollama
- Automatic deployment of Open WebUI container and launches into your web browser when it's ready
- Monitors Docker process and starts the shutdown and cleanup processes when it has been closed (Right click Docker icon in tray and exit)
- Shutdown of all components when Docker closes
- WSL shutdown automation
- Windows 10/11
- Visual Studio 2022 (for editing source files)
- Docker Desktop
- Ollama
- WSL (Windows Subsystem for Linux)
- Administrator privileges for execution
- Clone the repository:
git clone https://github.com/NicholasBly/OpenWebUI-Automation.git
-
Open the solution in Visual Studio 2022
-
Configure the project properties:
- Set C++ Language Standard to ISO C++17
- Set Character Set to "Use Unicode Character Set"
- Add required libraries: shell32.lib and user32.lib
-
Adjust paths in the config.json to match your system:
- Ollama executable path
- Docker Desktop executable path
-
Build the solution in Visual Studio 2022
-
Run the executable as Administrator
The program will:
- Start Ollama
- Launch Docker Desktop
- Wait for Docker to be fully operational
- Deploy the Open WebUI container
- Open the WebUI in your default browser
- Monitor Docker status
- Perform cleanup when Docker is closed
The default Docker container configuration is:
docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main
Modify these settings in the code as needed.
The tool actively monitors:
- Docker Desktop process
- Ollama process
- WSL status
When Docker Desktop is closed, the tool automatically:
- Terminates Ollama
- Shuts down WSL
- Open the solution in Visual Studio 2022
- Set build configuration to Release/x64
- Build the solution
- Find the executable in the Release folder
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Docker Desktop
- Ollama
- Open WebUI