diff --git a/apps/dokploy/public/templates/unifi.webp b/apps/dokploy/public/templates/unifi.webp new file mode 100644 index 00000000..ffe1f244 Binary files /dev/null and b/apps/dokploy/public/templates/unifi.webp differ diff --git a/apps/dokploy/templates/templates.ts b/apps/dokploy/templates/templates.ts index 917184c5..48840a32 100644 --- a/apps/dokploy/templates/templates.ts +++ b/apps/dokploy/templates/templates.ts @@ -1151,4 +1151,19 @@ export const templates: TemplateData[] = [ tags: ["self-hosted", "development"], load: () => import("./onedev/index").then((m) => m.generate), }, + { + id: "unifi", + name: "Unifi Network", + version: "11.6.6", + description: + "Unifi Network is an open-source enterprise network management platform for wireless networks.", + logo: "unifi.webp", + links: { + github: "https://github.com/ubiquiti", + website: "https://www.ui.com/", + docs: "https://help.ui.com/hc/en-us/articles/360012282453-Self-Hosting-a-UniFi-Network-Server", + }, + tags: ["self-hosted", "networking"], + load: () => import("./unifi/index").then((m) => m.generate), + }, ]; diff --git a/apps/dokploy/templates/unifi/docker-compose.yml b/apps/dokploy/templates/unifi/docker-compose.yml new file mode 100644 index 00000000..ee531f67 --- /dev/null +++ b/apps/dokploy/templates/unifi/docker-compose.yml @@ -0,0 +1,48 @@ +services: + unifi-network-application: + image: lscr.io/linuxserver/unifi-network-application:latest + environment: + - PUID=1000 # User ID + - PGID=1000 # Group ID + - TZ=Etc/UTC # Timezone + - MONGO_HOST=unifi-db + - MONGO_USER=unifi + - MONGO_PASS=unifi_password + - MONGO_PORT=27017 + - MONGO_DBNAME=unifi + - MEM_LIMIT=1024 + - MEM_STARTUP=1024 + - MONGO_TLS= #optional # MongoDB TLS setting + - MONGO_AUTHSOURCE= #optional # MongoDB authentication source + volumes: # Volumes to mount in the container + - ../files/config:/config # Map host directory to container directory + ports: + - 8443:8443 # HTTPS portal + # - 3478:3478/udp # STUN service + # - 10001:10001/udp # UniFi AP discovery + # - 8080:8080 # HTTP portal + # - 1900:1900/udp #optional # For DLNA + # - 8843:8843 #optional # HTTPS guest portal + # - 8880:8880 #optional # HTTP guest portal + # - 6789:6789 #optional # Mobile speed test port + # - 5514:5514/udp #optional # Remote syslog port + restart: unless-stopped + depends_on: + - unifi-db + networks: + - dokploy-network + + unifi-db: + image: mongo:4.4 + volumes: + - ../files/db/data:/data/db + - ../files/init-mongo.sh:/docker-entrypoint-initdb.d/init-mongo.sh:ro + ports: + - 27017 + restart: unless-stopped + networks: + - dokploy-network + +networks: + dokploy-network: + external: true diff --git a/apps/dokploy/templates/unifi/index.ts b/apps/dokploy/templates/unifi/index.ts new file mode 100644 index 00000000..975ce63d --- /dev/null +++ b/apps/dokploy/templates/unifi/index.ts @@ -0,0 +1,27 @@ +import type { Schema, Template } from "../utils"; + +export function generate(schema: Schema): Template { + const mounts: Template["mounts"] = [ + { + filePath: "init-mongo.sh", + content: ` + #!/bin/bash + mongo <