diff --git a/apps/dokploy/public/templates/portainer.svg b/apps/dokploy/public/templates/portainer.svg new file mode 100644 index 00000000..e8c91b36 --- /dev/null +++ b/apps/dokploy/public/templates/portainer.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/dokploy/templates/portainer/docker-compose.yml b/apps/dokploy/templates/portainer/docker-compose.yml new file mode 100644 index 00000000..fa4fe410 --- /dev/null +++ b/apps/dokploy/templates/portainer/docker-compose.yml @@ -0,0 +1,30 @@ +version: '3.8' + +services: + agent: + image: portainer/agent + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - /var/lib/docker/volumes:/var/lib/docker/volumes + networks: + - dokploy-network + + deploy: + mode: global + placement: + constraints: [node.platform.os == linux] + + portainer: + image: portainer/portainer-ce + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - portainer-data:/data + deploy: + mode: replicated + placement: + constraints: [node.role == manager] + + +volumes: + portainer-data: + \ No newline at end of file diff --git a/apps/dokploy/templates/portainer/index.ts b/apps/dokploy/templates/portainer/index.ts new file mode 100644 index 00000000..7775a0ed --- /dev/null +++ b/apps/dokploy/templates/portainer/index.ts @@ -0,0 +1,19 @@ +import { + type DomainSchema, + type Schema, + type Template, + generateRandomDomain, +} from "../utils"; + +export function generate(schema: Schema): Template { + const domains: DomainSchema[] = [ + { + host: generateRandomDomain(schema), + port: 9000, + serviceName: "portainer", + }, + ]; + return { + domains, + }; +} diff --git a/apps/dokploy/templates/templates.ts b/apps/dokploy/templates/templates.ts index ce52d6b1..8f8f524b 100644 --- a/apps/dokploy/templates/templates.ts +++ b/apps/dokploy/templates/templates.ts @@ -526,5 +526,20 @@ export const templates: TemplateData[] = [ }, tags: ["self-hosted", "i18n", "localization", "translations"], load: () => import("./tolgee/index").then((m) => m.generate), + }, + { + id: "portainer", + name: "Portainer", + version: "2.21.4", + description: + "Portainer is a container management tool for deploying, troubleshooting, and securing applications across cloud, data centers, and IoT.", + logo: "portainer.svg", + links: { + github: "https://github.com/portainer/portainer", + website: "https://www.portainer.io/", + docs: "https://docs.portainer.io/", + }, + tags: ["cloud", "monitoring"], + load: () => import("./portainer/index").then((m) => m.generate), }, ];