mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
feat: add aptabase template
This commit is contained in:
5
apps/dokploy/public/templates/aptabase.svg
Normal file
5
apps/dokploy/public/templates/aptabase.svg
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<svg class="w-12 text-primary" viewBox="0 0 1000 760" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill="#1a61ff"
|
||||||
|
d="M626.7 177.36c-55.8-98.4-197.59-98.4-253.39 0L112.97 636.44H500c0-51.67 41.88-93.55 93.55-93.55h22.09l57.82 93.55h213.57L626.69 177.37Zm-11.06 365.52-70.21-123.82c-20.01-35.28-70.84-35.28-90.85 0l-70.21 123.82H273.58l181.01-319.19c20.01-35.28 70.84-35.28 90.85 0l181.01 319.19H615.66Z"
|
||||||
|
style="--darkreader-inline-fill:currentColor" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 465 B |
45
apps/dokploy/templates/aptabase/docker-compose.yml
Normal file
45
apps/dokploy/templates/aptabase/docker-compose.yml
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
services:
|
||||||
|
aptabase_db:
|
||||||
|
container_name: aptabase_db
|
||||||
|
image: postgres:15-alpine
|
||||||
|
restart: always
|
||||||
|
volumes:
|
||||||
|
- db-data:/var/lib/postgresql/data
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: aptabase
|
||||||
|
POSTGRES_PASSWORD: sTr0NGp4ssw0rd
|
||||||
|
|
||||||
|
aptabase_events_db:
|
||||||
|
container_name: aptabase_events_db
|
||||||
|
image: clickhouse/clickhouse-server:23.8.16.16-alpine
|
||||||
|
restart: always
|
||||||
|
volumes:
|
||||||
|
- events-db-data:/var/lib/clickhouse
|
||||||
|
environment:
|
||||||
|
CLICKHOUSE_USER: aptabase
|
||||||
|
CLICKHOUSE_PASSWORD: sTr0NGp4ssw0rd
|
||||||
|
ulimits:
|
||||||
|
nofile:
|
||||||
|
soft: 262144
|
||||||
|
hard: 262144
|
||||||
|
|
||||||
|
aptabase:
|
||||||
|
container_name: aptabase_app
|
||||||
|
image: ghcr.io/aptabase/aptabase:main
|
||||||
|
restart: always
|
||||||
|
depends_on:
|
||||||
|
- aptabase_events_db
|
||||||
|
- aptabase_db
|
||||||
|
ports:
|
||||||
|
- 8000:8080
|
||||||
|
environment:
|
||||||
|
BASE_URL: http://localhost:8000 # replace with your ip or domain, including port if needed
|
||||||
|
AUTH_SECRET: c4rI4x8kz5DgKJ1is5Eiu9bNncSQ6ROD # get a strong secret from https://randomkeygen.com/
|
||||||
|
DATABASE_URL: Server=aptabase_db;Port=5432;User Id=aptabase;Password=sTr0NGp4ssw0rd;Database=aptabase
|
||||||
|
CLICKHOUSE_URL: Host=aptabase_events_db;Port=8123;Username=aptabase;Password=sTr0NGp4ssw0rd
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
db-data:
|
||||||
|
driver: local
|
||||||
|
events-db-data:
|
||||||
|
driver: local
|
||||||
36
apps/dokploy/templates/aptabase/index.ts
Normal file
36
apps/dokploy/templates/aptabase/index.ts
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
import {
|
||||||
|
type DomainSchema,
|
||||||
|
type Schema,
|
||||||
|
type Template,
|
||||||
|
generateBase64,
|
||||||
|
generateRandomDomain,
|
||||||
|
} from "../utils";
|
||||||
|
|
||||||
|
export function generate(schema: Schema): Template {
|
||||||
|
const mainDomain = generateRandomDomain(schema);
|
||||||
|
const authSecret = generateBase64(32);
|
||||||
|
const postgresPassword = generateBase64(16);
|
||||||
|
const clickhousePassword = generateBase64(16);
|
||||||
|
|
||||||
|
const domains: DomainSchema[] = [
|
||||||
|
{
|
||||||
|
host: mainDomain,
|
||||||
|
port: 8000,
|
||||||
|
serviceName: "aptabase",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const envs = [
|
||||||
|
`BASE_URL=http://${mainDomain}`,
|
||||||
|
`AUTH_SECRET=${authSecret}`,
|
||||||
|
`POSTGRES_PASSWORD=${postgresPassword}`,
|
||||||
|
`CLICKHOUSE_PASSWORD=${clickhousePassword}`,
|
||||||
|
`DATABASE_URL=Server=aptabase_db;Port=5432;User Id=aptabase;Password=${postgresPassword};Database=aptabase`,
|
||||||
|
`CLICKHOUSE_URL=Host=aptabase_events_db;Port=8123;Username=aptabase;Password=${clickhousePassword}`,
|
||||||
|
];
|
||||||
|
|
||||||
|
return {
|
||||||
|
envs,
|
||||||
|
domains,
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -423,4 +423,19 @@ export const templates: TemplateData[] = [
|
|||||||
tags: ["chat"],
|
tags: ["chat"],
|
||||||
load: () => import("./soketi/index").then((m) => m.generate),
|
load: () => import("./soketi/index").then((m) => m.generate),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: "aptabase",
|
||||||
|
name: "Aptabase",
|
||||||
|
version: "v1.0.0",
|
||||||
|
description: "Aptabase is a self-hosted web analytics platform that lets you track website traffic and user behavior.",
|
||||||
|
logo: "aptabase.svg",
|
||||||
|
links: {
|
||||||
|
github: "https://github.com/aptabase/aptabase",
|
||||||
|
website: "https://aptabase.com/",
|
||||||
|
docs: "https://github.com/aptabase/aptabase/blob/main/README.md",
|
||||||
|
},
|
||||||
|
tags: ["analytics", "self-hosted"],
|
||||||
|
load: () => import("./aptabase/index").then((m) => m.generate),
|
||||||
|
},
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user