mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
Merge pull request #182 from DarkPhoenix2704/feat/nocodb-template
feat: nocodb template
This commit is contained in:
commit
5fb682b58d
BIN
public/templates/nocodb.png
Normal file
BIN
public/templates/nocodb.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 131 KiB |
44
templates/nocodb/docker-compose.yml
Normal file
44
templates/nocodb/docker-compose.yml
Normal file
@ -0,0 +1,44 @@
|
||||
version: "3.8"
|
||||
services:
|
||||
nocodb:
|
||||
image: nocodb/nocodb:0.251.0
|
||||
restart: always
|
||||
networks:
|
||||
- dokploy-network
|
||||
ports:
|
||||
- ${NOCODB_PORT}
|
||||
environment:
|
||||
NC_DB : "pg://root_db?u=postgres&p=password&d=root_db"
|
||||
PORT : ${NOCODB_PORT}
|
||||
NC_REDIS_URL: ${NC_REDIS_URL}
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.${HASH}.rule=Host(`${NOCODB_HOST}`)
|
||||
- traefik.http.services.${HASH}.loadbalancer.server.port=${NOCODB_PORT}
|
||||
volumes:
|
||||
- nc_data:/usr/app/data
|
||||
|
||||
root_db:
|
||||
image: postgres:14.7
|
||||
restart: always
|
||||
networks:
|
||||
- dokploy-network
|
||||
environment:
|
||||
POSTGRES_DB: root_db
|
||||
POSTGRES_PASSWORD: password
|
||||
POSTGRES_USER: postgres
|
||||
healthcheck:
|
||||
interval: 10s
|
||||
retries: 10
|
||||
test: "pg_isready -U \"$$POSTGRES_USER\" -d \"$$POSTGRES_DB\""
|
||||
timeout: 2s
|
||||
volumes:
|
||||
- "db_data:/var/lib/postgresql/data"
|
||||
|
||||
networks:
|
||||
dokploy-network:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
db_data: {}
|
||||
nc_data: {}
|
28
templates/nocodb/index.ts
Normal file
28
templates/nocodb/index.ts
Normal file
@ -0,0 +1,28 @@
|
||||
// EXAMPLE
|
||||
import {
|
||||
generateHash,
|
||||
generateRandomDomain,
|
||||
generateBase64,
|
||||
type Template,
|
||||
type Schema,
|
||||
} from "../utils";
|
||||
|
||||
|
||||
export function generate(schema: Schema): Template {
|
||||
|
||||
const mainServiceHash = generateHash(schema.projectName);
|
||||
const randomDomain = generateRandomDomain(schema);
|
||||
const secretBase = generateBase64(64);
|
||||
const toptKeyBase = generateBase64(32);
|
||||
|
||||
const envs = [
|
||||
`NOCODB_HOST=${randomDomain}`,
|
||||
"NOCODB_PORT=8000",
|
||||
`NC_AUTH_JWT_SECRET=${secretBase}`,
|
||||
`HASH=${mainServiceHash}`,
|
||||
];
|
||||
|
||||
return {
|
||||
envs,
|
||||
};
|
||||
}
|
@ -63,4 +63,20 @@ export const templates: TemplateData[] = [
|
||||
tags: ["document-signing"],
|
||||
load: () => import("./documenso/index").then((m) => m.generate),
|
||||
},
|
||||
{
|
||||
id: "nocodb",
|
||||
name: "NocoDB",
|
||||
version: "0.251.0",
|
||||
description:
|
||||
"NocoDB is an opensource Airtable alternative that turns any MySQL, PostgreSQL, SQL Server, SQLite & MariaDB into a smart spreadsheet.",
|
||||
|
||||
links: {
|
||||
github: "https://github.com/nocodb/nocodb",
|
||||
website: "https://nocodb.com/",
|
||||
docs: "https://docs.nocodb.com/",
|
||||
},
|
||||
logo: "nocodb.png",
|
||||
tags: ["database", "spreadsheet", "low-code", 'nocode'],
|
||||
load: () => import("./nocodb/index").then((m) => m.generate),
|
||||
},
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user