Git Product home page Git Product logo

portainer-templates's Introduction

Portainer Templates

There are two types of Portainer templates:

  • type stack: the new type that uses Docker stack under the hood and is better to use on Portainer
  • type container: the old type that can only start one container, discouraged to use except if the stack type is too limited (e.g. old DB2 and old MSSQL server containers need more priviliges that only the container type can provide)

How to create a new stack type template

A stack type template consists of two things:

  1. a YAML file in the Docker stack format that contains definitions like which container(s) to start on which ports, by our convention always named docker-stack.yml (to avoid confusion with Docker Compose)
  2. an entry in the new-stack-templates.json that includes some metadata about the template and makes the Docker stack YAML file available in Portainer UI

To create a new one:

  1. In the stacks directory create a new subdirectory with the name of your stack (please follow existing naming scheme) and create a new docker-stack.yml inside that subdirectory or duplicate an existing subdirectory and modify the included docker-stack.yml with different Docker image or ports etc.
  2. Edit the file new-stack-templates.json to create or duplicate an entry and supply metadata as required, minimum is changed title and description fields (for Portainer UI) and the correct path in stackfile field!
  3. Run python3 generate-stack-templates.py to regenerate the stack-templates.json which is the definitive file consumed by Portainer
  4. Create a new branch (e.g. use JIRA issue number), check in all modified/new files e.g. via git add .
  5. Push the new commit and open a Pull Request
  6. When the PR is merged it may take some minutes for the change to be available in Portainer UI (due to Github caching)

How to modify an existing stack type template

  1. Modify a docker-stack.yml or the file new-stack-templates.json as needed
  2. Run python3 generate-stack-templates.py to regenerate the stack-templates.json which is the definitive file consumed by Portainer
  3. Create a new branch (e.g. use JIRA issue number), check in all modified/new files e.g. via git add .
  4. Push the new commit and open a Pull Request
  5. When the PR is merged it may take some minutes for the change to be available in Portainer UI (due to Github caching)

portainer-templates's People

Contributors

aabouzaid avatar akifhazarvi avatar chaima-mnsr avatar cmur2 avatar hari-parasuraman avatar hawky-4s- avatar koevskinikola avatar marstamm avatar maxdanilov avatar mboskamp avatar mschoe avatar tasso94 avatar tmetzke avatar yanavasileva avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.