diff --git a/public/templates/baserow.webp b/public/templates/baserow.webp new file mode 100644 index 00000000..3e825f7a Binary files /dev/null and b/public/templates/baserow.webp differ diff --git a/public/templates/directus.jpg b/public/templates/directus.jpg new file mode 100644 index 00000000..a6f55062 Binary files /dev/null and b/public/templates/directus.jpg differ diff --git a/public/templates/ghost.jpeg b/public/templates/ghost.jpeg new file mode 100644 index 00000000..9bfefe83 Binary files /dev/null and b/public/templates/ghost.jpeg differ diff --git a/public/templates/grafana.svg b/public/templates/grafana.svg new file mode 100644 index 00000000..54be1e2f --- /dev/null +++ b/public/templates/grafana.svg @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + diff --git a/public/templates/n8n.png b/public/templates/n8n.png new file mode 100644 index 00000000..0e9a607e Binary files /dev/null and b/public/templates/n8n.png differ diff --git a/public/templates/uptime-kuma.png b/public/templates/uptime-kuma.png new file mode 100644 index 00000000..c5ea28c5 Binary files /dev/null and b/public/templates/uptime-kuma.png differ diff --git a/templates/baserow/docker-compose.yml b/templates/baserow/docker-compose.yml new file mode 100644 index 00000000..0b54f183 --- /dev/null +++ b/templates/baserow/docker-compose.yml @@ -0,0 +1,22 @@ +version: "3.4" +services: + baserow: + image: baserow/baserow:1.25.2 + networks: + - dokploy-network + environment: + BASEROW_PUBLIC_URL: "http://${BASEROW_HOST}" + ports: + - "80" + labels: + - traefik.enable=true + - traefik.http.routers.${HASH}.rule=Host(`${BASEROW_HOST}`) + - traefik.http.services.${HASH}.loadbalancer.server.port=${BASEROW_PORT} + volumes: + - baserow_data:/baserow/data +volumes: + baserow_data: + +networks: + dokploy-network: + external: true \ No newline at end of file diff --git a/templates/baserow/index.ts b/templates/baserow/index.ts new file mode 100644 index 00000000..40966881 --- /dev/null +++ b/templates/baserow/index.ts @@ -0,0 +1,20 @@ +import { + generateHash, + generateRandomDomain, + type Template, + type Schema, +} from "../utils"; + +export function generate(schema: Schema): Template { + const mainServiceHash = generateHash(schema.projectName); + const randomDomain = generateRandomDomain(schema); + const envs = [ + `BASEROW_HOST=${randomDomain}`, + "BASEROW_PORT=80", + `HASH=${mainServiceHash}`, + ]; + + return { + envs, + }; +} diff --git a/templates/directus/docker-compose.yml b/templates/directus/docker-compose.yml new file mode 100644 index 00000000..f4901d5b --- /dev/null +++ b/templates/directus/docker-compose.yml @@ -0,0 +1,63 @@ +version: "3" +services: + database: + image: postgis/postgis:13-master + volumes: + - directus:/var/lib/postgresql/data + networks: + - dokploy-network + environment: + POSTGRES_USER: "directus" + POSTGRES_PASSWORD: "directus" + POSTGRES_DB: "directus" + + cache: + image: redis:6 + networks: + - dokploy-network + + directus: + image: directus/directus:10.12.1 + networks: + - dokploy-network + ports: + - 8055 + volumes: + - ./uploads:/directus/uploads + - ./extensions:/directus/extensions + depends_on: + - cache + - database + labels: + - traefik.enable=true + - traefik.http.routers.${HASH}.rule=Host(`${DIRECTUS_HOST}`) + - traefik.http.services.${HASH}.loadbalancer.server.port=${DIRECTUS_PORT} + environment: + SECRET: "replace-with-secure-random-value" + + DB_CLIENT: "pg" + DB_HOST: "database" + DB_PORT: "5432" + DB_DATABASE: "directus" + DB_USER: "directus" + DB_PASSWORD: "directus" + + CACHE_ENABLED: "true" + CACHE_AUTO_PURGE: "true" + CACHE_STORE: "redis" + REDIS: "redis://cache:6379" + + ADMIN_EMAIL: "admin@example.com" + ADMIN_PASSWORD: "d1r3ctu5" + # Make sure to set this in production + # (see https://docs.directus.io/self-hosted/config-options#general) + # PUBLIC_URL: "https://directus.example.com" + + # Environment variables can also be defined in a file (for example `.env`): + # env_file: + # - .env +networks: + dokploy-network: + external: true +volumes: + directus: \ No newline at end of file diff --git a/templates/directus/index.ts b/templates/directus/index.ts new file mode 100644 index 00000000..1a4feb10 --- /dev/null +++ b/templates/directus/index.ts @@ -0,0 +1,20 @@ +import { + generateHash, + generateRandomDomain, + type Template, + type Schema, +} from "../utils"; + +export function generate(schema: Schema): Template { + const mainServiceHash = generateHash(schema.projectName); + const randomDomain = generateRandomDomain(schema); + const envs = [ + `DIRECTUS_HOST=${randomDomain}`, + "DIRECTUS_PORT=8055", + `HASH=${mainServiceHash}`, + ]; + + return { + envs, + }; +} diff --git a/templates/ghost/docker-compose.yml b/templates/ghost/docker-compose.yml new file mode 100644 index 00000000..8bcb31b5 --- /dev/null +++ b/templates/ghost/docker-compose.yml @@ -0,0 +1,46 @@ +version: '3.1' + +services: + + ghost: + image: ghost:5-alpine + restart: always + networks: + - dokploy-network + ports: + - 2368 + environment: + # see https://ghost.org/docs/config/#configuration-options + database__client: mysql + database__connection__host: db + database__connection__user: root + database__connection__password: example + database__connection__database: ghost + # this url value is just an example, and is likely wrong for your environment! + url: http://${GHOST_HOST} + # contrary to the default mentioned in the linked documentation, this image defaults to NODE_ENV=production (so development mode needs to be explicitly specified if desired) + #NODE_ENV: development + labels: + - traefik.enable=true + - traefik.http.routers.${HASH}.rule=Host(`${GHOST_HOST}`) + - traefik.http.services.${HASH}.loadbalancer.server.port=${GHOST_PORT} + volumes: + - ghost:/var/lib/ghost/content + + db: + image: mysql:8.0 + restart: always + networks: + - dokploy-network + environment: + MYSQL_ROOT_PASSWORD: example + volumes: + - db:/var/lib/mysql + +volumes: + ghost: + db: + +networks: + dokploy-network: + external: true \ No newline at end of file diff --git a/templates/ghost/index.ts b/templates/ghost/index.ts new file mode 100644 index 00000000..6eadb9d0 --- /dev/null +++ b/templates/ghost/index.ts @@ -0,0 +1,20 @@ +import { + generateHash, + generateRandomDomain, + type Template, + type Schema, +} from "../utils"; + +export function generate(schema: Schema): Template { + const mainServiceHash = generateHash(schema.projectName); + const randomDomain = generateRandomDomain(schema); + const envs = [ + `GHOST_HOST=${randomDomain}`, + "GHOST_PORT=2368", + `HASH=${mainServiceHash}`, + ]; + + return { + envs, + }; +} diff --git a/templates/grafana/docker-compose.yml b/templates/grafana/docker-compose.yml new file mode 100644 index 00000000..b1d525b8 --- /dev/null +++ b/templates/grafana/docker-compose.yml @@ -0,0 +1,20 @@ +version: "3.8" +services: + grafana: + networks: + - dokploy-network + image: grafana/grafana-enterprise:9.5.20 + restart: unless-stopped + ports: + - '3000' + labels: + - traefik.enable=true + - traefik.http.routers.${HASH}.rule=Host(`${GRAFANA_HOST}`) + - traefik.http.services.${HASH}.loadbalancer.server.port=${GRAFANA_PORT} + volumes: + - grafana-storage:/var/lib/grafana +networks: + dokploy-network: + external: true +volumes: + grafana-storage: {} \ No newline at end of file diff --git a/templates/grafana/index.ts b/templates/grafana/index.ts new file mode 100644 index 00000000..5587e0bc --- /dev/null +++ b/templates/grafana/index.ts @@ -0,0 +1,20 @@ +import { + generateHash, + generateRandomDomain, + type Template, + type Schema, +} from "../utils"; + +export function generate(schema: Schema): Template { + const mainServiceHash = generateHash(schema.projectName); + const randomDomain = generateRandomDomain(schema); + const envs = [ + `GRAFANA_HOST=${randomDomain}`, + "GRAFANA_PORT=3000", + `HASH=${mainServiceHash}`, + ]; + + return { + envs, + }; +} diff --git a/templates/n8n/docker-compose.yml b/templates/n8n/docker-compose.yml new file mode 100644 index 00000000..446b6297 --- /dev/null +++ b/templates/n8n/docker-compose.yml @@ -0,0 +1,29 @@ +version: "3.7" +services: + n8n: + image: docker.n8n.io/n8nio/n8n:1.48.1 + restart: always + networks: + - dokploy-network + ports: + - "5678" + labels: + - traefik.enable=true + - traefik.http.routers.${HASH}.rule=Host(`${N8N_HOST}`) + - traefik.http.services.${HASH}.loadbalancer.server.port=${N8N_PORT} + environment: + - N8N_HOST=${N8N_HOST} + - N8N_PORT=5678 + - N8N_PROTOCOL=http + - NODE_ENV=production + - WEBHOOK_URL=https://${N8N_HOST}/ + - GENERIC_TIMEZONE=${GENERIC_TIMEZONE} + - N8N_SECURE_COOKIE=false + volumes: + - n8n_data:/home/node/.n8n + +volumes: + n8n_data: +networks: + dokploy-network: + external: true \ No newline at end of file diff --git a/templates/n8n/index.ts b/templates/n8n/index.ts new file mode 100644 index 00000000..5cc23b4b --- /dev/null +++ b/templates/n8n/index.ts @@ -0,0 +1,21 @@ +import { + generateHash, + generateRandomDomain, + type Template, + type Schema, +} from "../utils"; + +export function generate(schema: Schema): Template { + const mainServiceHash = generateHash(schema.projectName); + const randomDomain = generateRandomDomain(schema); + const envs = [ + `N8N_HOST=${randomDomain}`, + "N8N_PORT=5678", + `HASH=${mainServiceHash}`, + "GENERIC_TIMEZONE=Europe/Berlin", + ]; + + return { + envs, + }; +} diff --git a/templates/templates.ts b/templates/templates.ts index 918838ba..fd01176d 100644 --- a/templates/templates.ts +++ b/templates/templates.ts @@ -47,4 +47,94 @@ export const templates: TemplateData[] = [ tags: ["scheduling", "booking"], load: () => import("./calcom/index").then((m) => m.generate), }, + { + id: "grafana", + name: "Grafana", + version: "9.5.20", + description: + "Grafana is an open source platform for data visualization and monitoring.", + logo: "grafana.svg", + links: { + github: "https://github.com/grafana/grafana", + website: "https://grafana.com/", + docs: "https://grafana.com/docs/", + }, + tags: ["monitoring"], + load: () => import("./grafana/index").then((m) => m.generate), + }, + { + id: "directus", + name: "Directus", + version: "10.12.1", + description: + "Directus is an open source headless CMS that provides an API-first solution for building custom backends.", + logo: "directus.jpg", + links: { + github: "https://github.com/directus/directus", + website: "https://directus.io/", + docs: "https://docs.directus.io/", + }, + tags: ["cms"], + load: () => import("./directus/index").then((m) => m.generate), + }, + { + id: "baserow", + name: "Baserow", + version: "1.25.2", + description: + "Baserow is an open source database management tool that allows you to create and manage databases.", + logo: "baserow.webp", + links: { + github: "https://github.com/Baserow/baserow", + website: "https://baserow.io/", + docs: "https://baserow.io/docs/index", + }, + tags: ["database"], + load: () => import("./baserow/index").then((m) => m.generate), + }, + { + id: "ghost", + name: "Ghost", + version: "5.0.0", + description: + "Ghost is a free and open source, professional publishing platform built on a modern Node.js technology stack.", + logo: "ghost.jpeg", + links: { + github: "https://github.com/TryGhost/Ghost", + website: "https://ghost.org/", + docs: "https://ghost.org/docs/", + }, + tags: ["cms"], + load: () => import("./ghost/index").then((m) => m.generate), + }, + { + id: "uptime-kuma", + name: "Uptime Kuma", + version: "1.21.4", + description: + "Uptime Kuma is a free and open source monitoring tool that allows you to monitor your websites and applications.", + logo: "uptime-kuma.png", + links: { + github: "https://github.com/louislam/uptime-kuma", + website: "https://uptime.kuma.pet/", + docs: "https://github.com/louislam/uptime-kuma/wiki", + }, + tags: ["monitoring"], + load: () => import("./uptime-kuma/index").then((m) => m.generate), + }, + { + id: "n8n", + name: "n8n", + version: "1.48.1", + description: + "n8n is an open source low-code platform for automating workflows and integrations.", + logo: "n8n.png", + links: { + github: "https://github.com/n8n-io/n8n", + website: "https://n8n.io/", + docs: "https://docs.n8n.io/", + }, + tags: ["automation"], + load: () => import("./n8n/index").then((m) => m.generate), + }, ]; diff --git a/templates/uptime-kuma/docker-compose.yml b/templates/uptime-kuma/docker-compose.yml new file mode 100644 index 00000000..acec0e67 --- /dev/null +++ b/templates/uptime-kuma/docker-compose.yml @@ -0,0 +1,21 @@ +version: "3.4" +services: + uptime-kuma: + networks: + - dokploy-network + image: louislam/uptime-kuma:1 + restart: always + ports: + - "3001" + volumes: + - uptime-kuma-data:/app/data + labels: + - traefik.enable=true + - traefik.http.routers.${HASH}.rule=Host(`${UPTIME_KUMA_HOST}`) + - traefik.http.services.${HASH}.loadbalancer.server.port=${UPTIME_KUMA_PORT} + +volumes: + uptime-kuma-data: +networks: + dokploy-network: + external: true \ No newline at end of file diff --git a/templates/uptime-kuma/index.ts b/templates/uptime-kuma/index.ts new file mode 100644 index 00000000..84004ac8 --- /dev/null +++ b/templates/uptime-kuma/index.ts @@ -0,0 +1,20 @@ +import { + generateHash, + generateRandomDomain, + type Template, + type Schema, +} from "../utils"; + +export function generate(schema: Schema): Template { + const mainServiceHash = generateHash(schema.projectName); + const randomDomain = generateRandomDomain(schema); + const envs = [ + `UPTIME_KUMA_HOST=${randomDomain}`, + "UPTIME_KUMA_PORT=3001", + `HASH=${mainServiceHash}`, + ]; + + return { + envs, + }; +}