mirror of
https://github.com/Dokploy/templates
synced 2025-06-26 18:16:07 +00:00
feat: Add numerous new blueprint templates for various applications
This commit is contained in:
67
blueprints/teable/docker-compose.yml
Normal file
67
blueprints/teable/docker-compose.yml
Normal file
@@ -0,0 +1,67 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
teable:
|
||||
image: ghcr.io/teableio/teable:latest
|
||||
restart: always
|
||||
volumes:
|
||||
- teable-data:/app/.assets
|
||||
# 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}
|
||||
depends_on:
|
||||
teable-db-migrate:
|
||||
condition: service_completed_successfully
|
||||
|
||||
teable-db:
|
||||
image: postgres:15.4
|
||||
restart: always
|
||||
ports:
|
||||
- "${TEABLE_DB_PORT}:${POSTGRES_PORT}"
|
||||
volumes:
|
||||
- teable-db:/var/lib/postgresql/data
|
||||
# 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}
|
||||
|
||||
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}
|
||||
|
||||
depends_on:
|
||||
teable-db:
|
||||
condition: service_healthy
|
||||
|
||||
volumes:
|
||||
teable-data: {}
|
||||
teable-db: {}
|
||||
54
blueprints/teable/index.ts
Normal file
54
blueprints/teable/index.ts
Normal file
@@ -0,0 +1,54 @@
|
||||
import {
|
||||
type DomainSchema,
|
||||
type Schema,
|
||||
type Template,
|
||||
generatePassword,
|
||||
generateRandomDomain,
|
||||
} from "../utils";
|
||||
|
||||
export function generate(schema: Schema): Template {
|
||||
const password = generatePassword();
|
||||
const mainDomain = generateRandomDomain(schema);
|
||||
|
||||
const publicDbPort = ((min: number, max: number) => {
|
||||
return Math.round(Math.random() * (max - min) + min);
|
||||
})(32769, 65534);
|
||||
|
||||
const domains: DomainSchema[] = [
|
||||
{
|
||||
host: mainDomain,
|
||||
port: 3000,
|
||||
serviceName: "teable",
|
||||
},
|
||||
];
|
||||
|
||||
const envs = [
|
||||
`TEABLE_HOST=${mainDomain}`,
|
||||
`TEABLE_DB_PORT=${publicDbPort}`,
|
||||
"TIMEZONE=UTC",
|
||||
"# Postgres",
|
||||
"POSTGRES_HOST=teable-db",
|
||||
"POSTGRES_PORT=5432",
|
||||
"POSTGRES_DB=teable",
|
||||
"POSTGRES_USER=teable",
|
||||
`POSTGRES_PASSWORD=${password}`,
|
||||
"# App",
|
||||
"PUBLIC_ORIGIN=https://${TEABLE_HOST}",
|
||||
"PRISMA_DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}",
|
||||
"PUBLIC_DATABASE_PROXY=${TEABLE_HOST}:${TEABLE_DB_PORT}",
|
||||
"# 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,
|
||||
domains,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user