commit 538cdd6913fd273a1c9df7fcb2f349e131fc742b Author: Nathan Falvey Date: Mon Mar 2 23:52:45 2026 +0000 feat: add initial Portainer stack and template configurations for AdGuard Home diff --git a/.gitea/workflows/create-new-template.yaml b/.gitea/workflows/create-new-template.yaml new file mode 100644 index 0000000..6a05803 --- /dev/null +++ b/.gitea/workflows/create-new-template.yaml @@ -0,0 +1,53 @@ +name: Create New Stack or Template +run-name: Create ${{ inputs.folder_type }}/${{ inputs.app_name }} by @${{ gitea.actor }} + +on: + workflow_dispatch: + inputs: + app_name: + description: 'Name of the app (e.g., plex, nginx)' + required: true + type: string + folder_type: + description: 'Is this a template or a stack?' + required: true + type: choice + options: + - templates + - stacks + default: 'stacks' + +jobs: + create-files: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Create Directory and Files + run: | + TARGET_DIR="${{ inputs.folder_type }}/${{ inputs.app_name }}" + mkdir -p "$TARGET_DIR" + + # Create empty docker-compose + touch "$TARGET_DIR/docker-compose.yml" + + # Create README with basic template + cat < "$TARGET_DIR/README.md" + # ${{ inputs.app_name }} (${{ inputs.folder_type }}) + + ### Description + Description for ${{ inputs.app_name }} goes here. + + ### Configuration + - Path: $TARGET_DIR/docker-compose.yml + - Status: Draft + EOF + + - name: Commit and Push + run: | + git config --global user.name "Gitea Action" + git config --global user.email "actions@gitea.io" + git add . + git commit -m "feat: initialized ${{ inputs.folder_type }}/${{ inputs.app_name }}." + git push \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c9ef196 --- /dev/null +++ b/.gitignore @@ -0,0 +1,35 @@ +# .gitignore for Portainer stacks +# Ignore local environment files, secrets, editor and OS artifacts + +# Environment and secret files (do NOT commit secrets) +.env +.env.* +*.env +*.secret +*.key +*.pem +*.crt + +# Docker Compose local overrides and generated files +docker-compose.override.yml +docker-compose.*.local.yml + +# Logs +*.log + +# Editor and OS files +.DS_Store +Thumbs.db +.vscode/ +*.swp + +# Node / Python / other dependency folders (if present) +node_modules/ +venv/ +__pycache__/ + +# Backup and temp files +*~ +*.bak + +# Add any additional local-only files or directories below diff --git a/README.md b/README.md new file mode 100644 index 0000000..ee0e31a --- /dev/null +++ b/README.md @@ -0,0 +1,38 @@ +# Custom Portainer Configurations + +This repository contains my personal Portainer configuration files and templates used to deploy and manage containers and stacks with Portainer. + +## Purpose + +This repo holds reusable, opinionated configurations for Portainer including stack templates, compose files, and custom settings I use across projects and environments. It exists to: + +- Keep Portainer templates and example stacks in a single place +- Make it easy to reuse, version, and share configurations across machines +- Provide a reference for how I structure and deploy services via Portainer + +## What's Included + +- `stacks/` - Docker Compose stack files and examples for common services +- `templates/` - Portainer app templates (JSON/YAML) for easy import +- `README.md` - This document explaining the repo's purpose and usage + +If any of these folders are not present yet, they may be created over time as I add configurations. + +## How to Use + +1. Browse the `templates/` and `stacks/` folders to find a stack or template you want to run. +2. In Portainer, go to Stacks or App Templates and either paste the Compose file or import the template JSON. +3. Adjust environment variables and volumes to match your host environment. +4. Deploy and monitor through the Portainer UI. + +Notes: + +- These files are intended as starting points. Always review and adapt them before deploying to production. + +## Contributing / Customizing + +- To add a new stack or template, create a new file under `stacks/` or `templates/` and open a pull request. + +## License + +These configurations are for personal use. If you want to reuse or adapt them, feel free to do so — consider adding a license file if you plan to share broadly. \ No newline at end of file diff --git a/stacks/.gitkeep b/stacks/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/.gitkeep b/templates/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/templates/adguard/README.md b/templates/adguard/README.md new file mode 100644 index 0000000..5d1c5f6 --- /dev/null +++ b/templates/adguard/README.md @@ -0,0 +1,20 @@ +# AdGuard Home (Portainer template) + +AdGuard Home is a network-wide software for blocking ads, trackers and unwanted content by acting as a DNS resolver with filtering capabilities. This template contains a ready-to-use configuration to deploy AdGuard Home as a Docker stack via Portainer. + +Quick notes: + +- Expose the DNS ports (`53/tcp` and `53/udp`) so your network devices can use AdGuard as a resolver. +- Mount a persistent directory for configuration and DNS databases to preserve settings across container restarts. +- Keep secrets (if any) out of this repository—use environment variables, Docker secrets, or Portainer credentials. + +Usage: + +1. Import the compose file or template into Portainer's Stacks/App Templates. +2. Adjust the bind paths and ports to match your host and network. +3. Deploy and point your devices or DHCP server to the AdGuard DNS address. + +Helpful links: + +- Official site: https://adguard.com/en/adguard-home/overview.html +- Docs: https://github.com/AdguardTeam/AdGuardHome diff --git a/templates/adguard/docker-compose.yml b/templates/adguard/docker-compose.yml new file mode 100644 index 0000000..9889e29 --- /dev/null +++ b/templates/adguard/docker-compose.yml @@ -0,0 +1,15 @@ +services: + adguard: + image: adguard/adguardhome + container_name: AdGuard + mem_limit: 2g + cpu_shares: 768 + security_opt: + - no-new-privileges:true + network_mode: host + volumes: + - /volume1/docker/adguard/config:/opt/adguardhome/conf:rw + - /volume1/docker/adguard/data:/opt/adguardhome/work:rw + environment: + TZ: Europe/Dublin + restart: always \ No newline at end of file