mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
feat: add metabase template
This commit is contained in:
BIN
public/templates/metabase.png
Normal file
BIN
public/templates/metabase.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
38
templates/metabase/docker-compose.yml
Normal file
38
templates/metabase/docker-compose.yml
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
version: "3.8"
|
||||||
|
services:
|
||||||
|
metabase:
|
||||||
|
image: metabase/metabase:v0.50.8
|
||||||
|
volumes:
|
||||||
|
- /dev/urandom:/dev/random:ro
|
||||||
|
ports:
|
||||||
|
- ${METABASE_PORT}
|
||||||
|
environment:
|
||||||
|
MB_DB_TYPE: postgres
|
||||||
|
MB_DB_DBNAME: metabaseappdb
|
||||||
|
MB_DB_PORT: 5432
|
||||||
|
MB_DB_USER: metabase
|
||||||
|
MB_DB_PASS: mysecretpassword
|
||||||
|
MB_DB_HOST: postgres
|
||||||
|
networks:
|
||||||
|
- dokploy-network
|
||||||
|
healthcheck:
|
||||||
|
test: curl --fail -I http://localhost:3000/api/health || exit 1
|
||||||
|
interval: 15s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
labels:
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.http.routers.${HASH}.rule=Host(`${METABASE_HOST}`)
|
||||||
|
- traefik.http.services.${HASH}.loadbalancer.server.port=${METABASE_PORT}
|
||||||
|
postgres:
|
||||||
|
image: postgres:14
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: metabase
|
||||||
|
POSTGRES_DB: metabaseappdb
|
||||||
|
POSTGRES_PASSWORD: mysecretpassword
|
||||||
|
networks:
|
||||||
|
- dokploy-network
|
||||||
|
|
||||||
|
networks:
|
||||||
|
dokploy-network:
|
||||||
|
external: true
|
||||||
20
templates/metabase/index.ts
Normal file
20
templates/metabase/index.ts
Normal file
@@ -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 = [
|
||||||
|
`METABASE_HOST=${randomDomain}`,
|
||||||
|
"METABASE_PORT=3000",
|
||||||
|
`HASH=${mainServiceHash}`,
|
||||||
|
];
|
||||||
|
|
||||||
|
return {
|
||||||
|
envs,
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -289,4 +289,19 @@ export const templates: TemplateData[] = [
|
|||||||
tags: ["storage"],
|
tags: ["storage"],
|
||||||
load: () => import("./minio/index").then((m) => m.generate),
|
load: () => import("./minio/index").then((m) => m.generate),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: "metabase",
|
||||||
|
name: "Metabase",
|
||||||
|
version: "v0.50.8",
|
||||||
|
description:
|
||||||
|
"Metabase is an open source business intelligence tool that allows you to ask questions and visualize data.",
|
||||||
|
logo: "metabase.png",
|
||||||
|
links: {
|
||||||
|
github: "https://github.com/metabase/metabase",
|
||||||
|
website: "https://www.metabase.com/",
|
||||||
|
docs: "https://www.metabase.com/docs/",
|
||||||
|
},
|
||||||
|
tags: ["database", "dashboard"],
|
||||||
|
load: () => import("./metabase/index").then((m) => m.generate),
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user