This is a dockerized version of Portainer with custom templates that can be trivially run. There are existing open source projects that meet a similar need, but the available templates are limited or configurations are not extensive enough for my needs over the years. So this is my patch kit. Be sure to check out these Tampermonkey scripts that include a Portainer dropdown selector and local storage memory for template URLS so you can switch easily.
Portainer app templates include forms to facilitate managing deployment parameters (unlike Portainer custom app templates).
Reverse proxy versions of some public services are provided to facilitate domain mapping and SSL certificate management.
This is a fairly new repo and will be updated frequently. The goal is to establish a set of core templates for rapid containerized development or production deployments.
Prerequisites: You will need docker installed and either curl/wget or git.
-
Run directly
To run portianer directly without cloning this repository, navigate to the folder where you want to base your container mounts and run:
# Download the Docker Compose file from the specified URL curl -o docker-compose.yml https://raw.githubusercontent.com/Mugane/Portainer/main/docker-compose.yml # Run Docker Compose using the downloaded file docker compose up -d -
Clone & Run
# Clone the repository git clone https://github.com/Mugane/Portainer.git # Change directory to the cloned repository cd Portainer # Run Docker Compose docker compose up -d
This repo contains custom portainer templates, you can install them after running Portainer by switching the App Templates URL (under Settings) to (https://mugane.github.io/Portainer/templates.json)
Commits to the main branch automatically trigger the collate.sh script to generate and publish the final templates.json file to GitHub Pages. templates.json is not present in the main branch to avoid confusion when making source updates.
- Need to update the collation script to modify a README.md for the templates that compiles descriptions and links to each README.md and other resources (images, home pages, etc). But, this needs to be in Git. So not part of Github actions, but part of the collate.sh script.
The following containers would be nice to have.
SEO:
Productivity:
- Adobe clones (remove top bar and make PWA)
DevOps:
- Cypress
- Forgejo Exclusively free fork of for-profit Gitea
- Dokku
- OPC Router
- Grafana + Prometheus + Loki + Tempo
- Terraform/Ansible
- Dockflare Automate Cloudflare Tunnels with Docker Labels
- Terramate Use terraform hcl with other IaC platforms - see https://spacelift.io/blog/terraform-alternatives and https://www.qovery.com/blog/infrastructure-automation-tools-comparison
- Pulumi
AI:
- LangConfig - LangChain/LangGraph orchestrator/workflow builder docs
- LiteLLM - LLM proxy API router (see https://portainer-templates.as93.net/litellm)
- OmniRoute - AI Gateway
- Agent Reach
- n8n - Visual building/custom code (LangChain), integrations
- Free LLM APIs
- Patchright - from https://playwright.dev/
- Unsloth - Model fine tuning/training
- Heretic (abliteration) - see https://github.com/dreamfast/heretic-docker/ as an example
- Open Code - The open source AI coding agent
- Open-Webui
- Bolt.diy Prompt, run, edit, and deploy full-stack web apps (docs)
- Ollama
- Hugging face setup (run hugging face models like https://huggingface.co/fastino/GLiNER2.5-Decide)
- Free LLM API 7.4 billion tokens per month. 34 free LLM providers. 635 free model endpoints. All behind one /v1 endpoint, plus any custom OpenAI-compatible endpoint. Smart routing, automatic failover, encrypted keys. Personal experimentation only.
- Free Claude Code Use Claude Code, Codex, VSCode, Pi, and OpenCode (and 6 other harnesses) for free (1.3B+ free tokens) from your terminal, app, IDE, or phone, and now from the browser with native browser sessions (multi-harness + multi-model) like OpenClaw (voice supported + ToS friendly)
See Portainer Documentation for format descriptions.
Edit the json and optional docker-compose.yml files under the templates folder. To test locally, run the collate.sh script to regenerate the template.json file with the full list of templates, run the git http server, and commit your changes locally before testing (See steps 1 and 2 below).
Use http://localhost:8080/templates.json for the templates url in your local Portainer settings. If you can't open that in a browser, try http://http://172.17.0.1:8080/templates.json
By convention the ./templates/name.json file and the optional ./templates/name/docker-compose.yml folder use the same name for clarity. It is dash-separated, lowercase and describes the primary nature of the template contents.
- Automatic (Windows): you can set up a watch by running the
monitor.ps1script in PowerShell. Open PowerShell as Administrator, navigate to the Portainer repo folder and run:docker run -d -v ${PWD}:/usr/share/nginx/html -p 8080:80 --name templates-json nginx:latest Set-ExecutionPolicy RemoteSigned -Scope Process .\monitor.ps1 templates-json - Automatic (Linux): you can set up monitoring (and the docker container templates-json that serves the collated local file), by running:
sudo ./monitor.sh # if your docker install requires sudo, or: . monitor.sh # if your docker install does not require sudo - Manual:
- To serve the template.json file locally, run:
sudo docker run --name templates-json --rm -d -p 8080:80 \ -v "${PWD}/templates.json:/usr/share/nginx/html/templates.json:ro" nginx:alpine - You will also need to restart the templates-json docker container after each run of .collate.sh - so to do the collation, run:
./collate.sh --local && sudo docker restart templates-json
- To serve the template.json file locally, run:
In order to test local ./templates/name/docker-compose.yml and ./templates/name/Dockerfile files, you'll need to specify a Git repository url in the ./templates/name.json file ("repository" section). You need a local Git HTTP SERVER to do this. This templates.json library contains a simple single-repo server exactly for this reason. The template name is Git HTTP Server (Alpine). Point it at your Portainer folder and fire it up prior to starting debugging, and it will provide the endpoint for your local template tests. You should verify that the collate.sh script is updated to use whatever your local docker IP/Port is, if you do not use the defaults below:
In order for changes to be picked up, you will need to commit them (the git server will pull from the advertised refs rather than the working tree).
-
To commit the changes locally:
git add -A && git commit -m "some message" # all changes, including new files, or: git add [files] && git commit -m "some message" # for specific new files && changes, or: git commit -m "some message" [files] # for changes to specific files only (no new files), or: git commit -am "some message" # for all changes only (no new files) -
Once you're satisfied with the tests, roll back the commits and consolidate the changes into one with this sequence.
merge-baseprevents cutting changes from a stale main branchgit reset --soft $(git merge-base HEAD origin/main) git commit -m "complete change summary" git pull --ff-only # Check whether origin/main has changedIf this succeeds, there is no divergence and the local branch can be pushed directly:
git pushIf it fails with:
fatal: Not possible to fast-forward, aborting.the local branch and
origin/mainhave diverged. Rebase the consolidated local commit onto the remote changes:git rebase origin/main git push