Skip to content

This is a template for deploying Portainer stacks. It includes a GitHub Actions workflow for building and pushing Docker images, and a webhook for automatic stack updates on Portainer.

Notifications You must be signed in to change notification settings

inputstudio/portainer-stack-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Portainer stack deployment template

This is a template for deploying Portainer stacks.

Features

  • 🐋 GitHub Actions workflow to build and push the image to whatever registry you want (defaults to ghcr.io)
  • 🪝 Webhook to automatically update the stack on Portainer

Usage

  1. Use degit to clone this repo and remove the git history:
npm install -g degit # if you don't have degit installed
cd your-project-folder
degit github:inputstudio/portainer-stack-template
  1. Make your changes to the compose.yaml and Dockerfile file and commit them to your repo.
  2. Add a stack on Portainer. Learn how to do it here.
  3. Enable the webhook on the stack. Learn how to do it here.
  4. Add the webhook URL to your GitHub repo secrets as PORTAINER_STACK_WEBHOOK.
  5. Enjoy!

A Docker image build will be triggered every time you push to the main branch. The image will be tagged with the commit hash and pushed to ghcr.io (you can change that). The stack will be updated automatically via webhook.

About

This is a template for deploying Portainer stacks. It includes a GitHub Actions workflow for building and pushing Docker images, and a webhook for automatic stack updates on Portainer.

Topics

Resources

Stars

Watchers

Forks