mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
feat(template): add teable template (one more no/low-code database)
This commit is contained in:
BIN
apps/dokploy/public/templates/teable.png
Normal file
BIN
apps/dokploy/public/templates/teable.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 757 B |
83
apps/dokploy/templates/teable/docker-compose.yml
Normal file
83
apps/dokploy/templates/teable/docker-compose.yml
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
version: '3.9'
|
||||||
|
|
||||||
|
services:
|
||||||
|
teable:
|
||||||
|
image: ghcr.io/teableio/teable:1.2.0-beta
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- ${TEABLE_PORT}
|
||||||
|
volumes:
|
||||||
|
- teable-data:/app/.assets:rw
|
||||||
|
# you may use a bind-mounted host directory instead,
|
||||||
|
# so that it is harder to accidentally remove the volume and lose all your data!
|
||||||
|
# - ./docker/teable/data:/app/.assets:rw
|
||||||
|
environment:
|
||||||
|
- TZ=${TIMEZONE}
|
||||||
|
- NEXT_ENV_IMAGES_ALL_REMOTE=true
|
||||||
|
- PUBLIC_ORIGIN=${PUBLIC_ORIGIN}
|
||||||
|
- PRISMA_DATABASE_URL=${PRISMA_DATABASE_URL}
|
||||||
|
- PUBLIC_DATABASE_PROXY=${PUBLIC_DATABASE_PROXY}
|
||||||
|
- BACKEND_MAIL_HOST=${BACKEND_MAIL_HOST}
|
||||||
|
- BACKEND_MAIL_PORT=${BACKEND_MAIL_PORT}
|
||||||
|
- BACKEND_MAIL_SECURE=${BACKEND_MAIL_SECURE}
|
||||||
|
- BACKEND_MAIL_SENDER=${BACKEND_MAIL_SENDER}
|
||||||
|
- BACKEND_MAIL_SENDER_NAME=${BACKEND_MAIL_SENDER_NAME}
|
||||||
|
- BACKEND_MAIL_AUTH_USER=${BACKEND_MAIL_AUTH_USER}
|
||||||
|
- BACKEND_MAIL_AUTH_PASS=${BACKEND_MAIL_AUTH_PASS}
|
||||||
|
networks:
|
||||||
|
- dokploy-network
|
||||||
|
- teable-standalone
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.${HASH}.rule=Host(`${TEABLE_HOST}`)"
|
||||||
|
- "traefik.http.services.${HASH}.loadbalancer.server.port=${TEABLE_PORT}"
|
||||||
|
depends_on:
|
||||||
|
teable-db-migrate:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
|
||||||
|
teable-db:
|
||||||
|
image: postgres:15.4
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- '42345:5432'
|
||||||
|
volumes:
|
||||||
|
- teable-db:/var/lib/postgresql/data:rw
|
||||||
|
# you may use a bind-mounted host directory instead,
|
||||||
|
# so that it is harder to accidentally remove the volume and lose all your data!
|
||||||
|
# - ./docker/db/data:/var/lib/postgresql/data:rw
|
||||||
|
environment:
|
||||||
|
- TZ=${TIMEZONE}
|
||||||
|
- POSTGRES_DB=${POSTGRES_DB}
|
||||||
|
- POSTGRES_USER=${POSTGRES_USER}
|
||||||
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||||
|
networks:
|
||||||
|
- dokploy-network
|
||||||
|
- teable-standalone
|
||||||
|
healthcheck:
|
||||||
|
test: ['CMD-SHELL', "sh -c 'pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}'"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 3s
|
||||||
|
retries: 3
|
||||||
|
|
||||||
|
teable-db-migrate:
|
||||||
|
image: ghcr.io/teableio/teable-db-migrate:latest
|
||||||
|
environment:
|
||||||
|
- TZ=${TIMEZONE}
|
||||||
|
- PRISMA_DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
|
||||||
|
networks:
|
||||||
|
- teable-standalone
|
||||||
|
- dokploy-network
|
||||||
|
depends_on:
|
||||||
|
teable-db:
|
||||||
|
condition: service_healthy
|
||||||
|
|
||||||
|
networks:
|
||||||
|
teable-standalone:
|
||||||
|
name: teable-standalone-network
|
||||||
|
driver: bridge
|
||||||
|
dokploy-network:
|
||||||
|
external: true
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
teable-data: {}
|
||||||
|
teable-db: {}
|
||||||
41
apps/dokploy/templates/teable/index.ts
Normal file
41
apps/dokploy/templates/teable/index.ts
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
import {
|
||||||
|
type Schema,
|
||||||
|
type Template,
|
||||||
|
generateHash,
|
||||||
|
generateRandomDomain, generatePassword,
|
||||||
|
} from "../utils";
|
||||||
|
|
||||||
|
export function generate(schema: Schema): Template {
|
||||||
|
const mainServiceHash = generateHash(schema.projectName);
|
||||||
|
const password = generatePassword();
|
||||||
|
const randomDomain = generateRandomDomain(schema);
|
||||||
|
const envs = [
|
||||||
|
`TEABLE_HOST=${randomDomain}`,
|
||||||
|
`TEABLE_PORT=3000`,
|
||||||
|
`HASH=${mainServiceHash}`,
|
||||||
|
`TIMEZONE=UTC`,
|
||||||
|
`# Postgres`,
|
||||||
|
`POSTGRES_HOST=teable-db`,
|
||||||
|
`POSTGRES_PORT=5432`,
|
||||||
|
`POSTGRES_DB=teable`,
|
||||||
|
`POSTGRES_USER=teable`,
|
||||||
|
`POSTGRES_PASSWORD=${password}`,
|
||||||
|
`# App`,
|
||||||
|
`PUBLIC_ORIGIN=https://\${TABLE_HOST}`,
|
||||||
|
`PRISMA_DATABASE_URL=postgresql://\${POSTGRES_USER}:\${POSTGRES_PASSWORD}@\${POSTGRES_HOST}:\${POSTGRES_PORT}/\${POSTGRES_DB}`,
|
||||||
|
`PUBLIC_DATABASE_PROXY=127.0.0.1:42345`,
|
||||||
|
`# Need to support sending emails to enable the following configurations`,
|
||||||
|
`# You need to modify the configuration according to the actual situation, otherwise it will not be able to send emails correctly.`,
|
||||||
|
`#BACKEND_MAIL_HOST=smtp.teable.io`,
|
||||||
|
`#BACKEND_MAIL_PORT=465`,
|
||||||
|
`#BACKEND_MAIL_SECURE=true`,
|
||||||
|
`#BACKEND_MAIL_SENDER=noreply.teable.io`,
|
||||||
|
`#BACKEND_MAIL_SENDER_NAME=Teable`,
|
||||||
|
`#BACKEND_MAIL_AUTH_USER=username`,
|
||||||
|
`#BACKEND_MAIL_AUTH_PASS=password`,
|
||||||
|
];
|
||||||
|
|
||||||
|
return {
|
||||||
|
envs,
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -393,4 +393,19 @@ export const templates: TemplateData[] = [
|
|||||||
tags: ["media system"],
|
tags: ["media system"],
|
||||||
load: () => import("./jellyfin/index").then((m) => m.generate),
|
load: () => import("./jellyfin/index").then((m) => m.generate),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: "teable",
|
||||||
|
name: "teable",
|
||||||
|
version: "v1.2.0-beta",
|
||||||
|
description:
|
||||||
|
"Teable is a Super fast, Real-time, Professional, Developer friendly, No-code database built on Postgres. It uses a simple, spreadsheet-like interface to create complex enterprise-level database applications. Unlock efficient app development with no-code, free from the hurdles of data security and scalability.",
|
||||||
|
logo: "teable.png",
|
||||||
|
links: {
|
||||||
|
github: "https://github.com/teableio/teable",
|
||||||
|
website: "https://teable.io/",
|
||||||
|
docs: "https://help.teable.io/",
|
||||||
|
},
|
||||||
|
tags: ["database", "spreadsheet", "low-code", "nocode"],
|
||||||
|
load: () => import("./teable/index").then((m) => m.generate),
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user