This is a template for deploying Portainer stacks.
- 🐋 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
- 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
- Make your changes to the
compose.yaml
andDockerfile
file and commit them to your repo. - Add a stack on Portainer. Learn how to do it here.
- Enable the webhook on the stack. Learn how to do it here.
- Add the webhook URL to your GitHub repo secrets as
PORTAINER_STACK_WEBHOOK
. - 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.