Merge pull request #836 from drudge/budibase-template

feat: add Budibase template
This commit is contained in:
Mauricio Siu 2024-12-08 00:55:09 -06:00 committed by GitHub
commit cf3cea6146
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 272 additions and 0 deletions

View File

@ -0,0 +1,13 @@
<svg width="265" height="265" viewBox="0 0 265 265" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1_1799)">
<path d="M158.2 8.6V116.6C158.2 121.3 162 125.2 166.8 125.2H213.8C218 125.2 222 123.2 224.6 119.8L262.9 68.9C265.7 65.2 265.7 60.1 262.9 56.4L224.6 5.4C222 2 218 0 213.8 0H166.8C162 0 158.2 3.8 158.2 8.6Z" fill="#FF4E4E"/>
<path d="M158.2 148.4V256.4C158.2 261.1 162 265 166.8 265H213.8C218 265 222 263 224.6 259.6L262.9 208.7C265.7 205 265.7 199.9 262.9 196.2L224.6 145.3C222.1 141.9 218.1 139.9 213.8 139.9H166.8C162 139.8 158.2 143.7 158.2 148.4Z" fill="#6E56FF"/>
<path d="M0 8.6V116.6C0 121.3 3.8 125.2 8.6 125.2H109.6C113.8 125.2 117.8 123.2 120.4 119.8L155.9 72.5C160.3 66.6 160.3 58.5 155.9 52.6L120.3 5.4C117.8 2 113.8 0 109.5 0H8.6C3.8 0 0 3.8 0 8.6Z" fill="#F97777"/>
<path d="M0 148.4V256.4C0 261.1 3.8 265 8.6 265H109.6C113.8 265 117.8 263 120.4 259.6L155.9 212.3C160.3 206.4 160.3 198.3 155.9 192.4L120.4 145.1C117.9 141.7 113.9 139.7 109.6 139.7H8.6C3.8 139.8 0 143.7 0 148.4Z" fill="#9F8FFF"/>
</g>
<defs>
<clipPath id="clip0_1_1799">
<rect width="265" height="265" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,199 @@
services:
apps:
image: budibase.docker.scarf.sh/budibase/apps:3.2.25
restart: unless-stopped
networks:
- dokploy-network
environment:
SELF_HOSTED: 1
LOG_LEVEL: info
PORT: 4002
INTERNAL_API_KEY: ${BB_INTERNAL_API_KEY}
API_ENCRYPTION_KEY: ${BB_API_ENCRYPTION_KEY}
JWT_SECRET: ${BB_JWT_SECRET}
MINIO_ACCESS_KEY: ${BB_MINIO_ACCESS_KEY}
MINIO_SECRET_KEY: ${BB_MINIO_SECRET_KEY}
MINIO_URL: http://minio:9000
REDIS_URL: redis:6379
REDIS_PASSWORD: ${BB_REDIS_PASSWORD}
WORKER_URL: http://worker:4003
COUCH_DB_USERNAME: budibase
COUCH_DB_PASSWORD: ${BB_COUCHDB_PASSWORD}
COUCH_DB_URL: http://budibase:${BB_COUCHDB_PASSWORD}@couchdb:5984
BUDIBASE_ENVIRONMENT: ${BUDIBASE_ENVIRONMENT:-PRODUCTION}
ENABLE_ANALYTICS: ${ENABLE_ANALYTICS:-true}
BB_ADMIN_USER_EMAIL: ''
BB_ADMIN_USER_PASSWORD: ''
depends_on:
worker:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test:
- CMD
- wget
- '--spider'
- '-qO-'
- 'http://localhost:4002/health'
interval: 15s
timeout: 15s
retries: 5
start_period: 10s
worker:
image: budibase.docker.scarf.sh/budibase/worker:3.2.25
restart: unless-stopped
networks:
- dokploy-network
environment:
SELF_HOSTED: 1
LOG_LEVEL: info
PORT: 4003
CLUSTER_PORT: 10000
INTERNAL_API_KEY: ${BB_INTERNAL_API_KEY}
API_ENCRYPTION_KEY: ${BB_API_ENCRYPTION_KEY}
JWT_SECRET: ${BB_JWT_SECRET}
MINIO_ACCESS_KEY: ${BB_MINIO_ACCESS_KEY}
MINIO_SECRET_KEY: ${BB_MINIO_SECRET_KEY}
APPS_URL: http://apps:4002
MINIO_URL: http://minio:9000
REDIS_URL: redis:6379
REDIS_PASSWORD: ${BB_REDIS_PASSWORD}
COUCH_DB_USERNAME: budibase
COUCH_DB_PASSWORD: ${BB_COUCHDB_PASSWORD}
COUCH_DB_URL: http://budibase:${BB_COUCHDB_PASSWORD}@couchdb:5984
BUDIBASE_ENVIRONMENT: ${BUDIBASE_ENVIRONMENT:-PRODUCTION}
ENABLE_ANALYTICS: ${ENABLE_ANALYTICS:-true}
depends_on:
redis:
condition: service_healthy
minio:
condition: service_healthy
healthcheck:
test:
- CMD
- wget
- '--spider'
- '-qO-'
- 'http://localhost:4003/health'
interval: 15s
timeout: 15s
retries: 5
start_period: 10s
minio:
image: minio/minio:RELEASE.2024-11-07T00-52-20Z
restart: unless-stopped
networks:
- dokploy-network
volumes:
- 'minio_data:/data'
environment:
MINIO_ROOT_USER: ${BB_MINIO_ACCESS_KEY}
MINIO_ROOT_PASSWORD: ${BB_MINIO_SECRET_KEY}
MINIO_BROWSER: off
command: 'server /data --console-address ":9001"'
healthcheck:
test:
- CMD
- curl
- '-f'
- 'http://localhost:9000/minio/health/live'
interval: 30s
timeout: 20s
retries: 3
proxy:
image: budibase/proxy:3.2.25
restart: unless-stopped
networks:
- dokploy-network
environment:
PROXY_RATE_LIMIT_WEBHOOKS_PER_SECOND: 10
PROXY_RATE_LIMIT_API_PER_SECOND: 20
APPS_UPSTREAM_URL: http://apps:4002
WORKER_UPSTREAM_URL: http://worker:4003
MINIO_UPSTREAM_URL: http://minio:9000
COUCHDB_UPSTREAM_URL: http://couchdb:5984
WATCHTOWER_UPSTREAM_URL: http://watchtower:8080
RESOLVER: 127.0.0.11
depends_on:
minio:
condition: service_healthy
worker:
condition: service_healthy
apps:
condition: service_healthy
couchdb:
condition: service_healthy
healthcheck:
test:
- CMD
- curl
- '-f'
- 'http://localhost:10000/'
interval: 15s
timeout: 15s
retries: 5
start_period: 10s
couchdb:
image: budibase/couchdb:v3.3.3
restart: unless-stopped
networks:
- dokploy-network
environment:
COUCHDB_USER: budibase
COUCHDB_PASSWORD: ${BB_COUCHDB_PASSWORD}
TARGETBUILD: docker-compose
healthcheck:
test:
- CMD
- curl
- '-f'
- 'http://localhost:5984/'
interval: 15s
timeout: 15s
retries: 5
start_period: 10s
volumes:
- 'couchdb3_data:/opt/couchdb/data'
redis:
image: redis:7.2-alpine
networks:
- dokploy-network
restart: unless-stopped
command: 'redis-server --requirepass "${BB_REDIS_PASSWORD}"'
volumes:
- 'redis_data:/data'
healthcheck:
test:
- CMD
- redis-cli
- '-a'
- ${BB_REDIS_PASSWORD}
- ping
interval: 15s
timeout: 15s
retries: 5
start_period: 10s
watchtower:
restart: unless-stopped
networks:
- dokploy-network
image: containrrr/watchtower:1.7.1
volumes:
- '/var/run/docker.sock:/var/run/docker.sock'
command: '--debug --http-api-update bbapps bbworker bbproxy'
environment:
WATCHTOWER_HTTP_API: true
WATCHTOWER_HTTP_API_TOKEN: ${BB_WATCHTOWER_PASSWORD}
WATCHTOWER_CLEANUP: true
labels:
- com.centurylinklabs.watchtower.enable=false
networks:
dokploy-network:
external: true
volumes:
minio_data:
couchdb3_data:
redis_data:

View File

@ -0,0 +1,45 @@
import {
type DomainSchema,
type Schema,
type Template,
generatePassword,
generateRandomDomain,
} from "../utils";
export function generate(schema: Schema): Template {
const mainDomain = generateRandomDomain(schema);
const apiKey = generatePassword(32);
const encryptionKey = generatePassword(32);
const jwtSecret = generatePassword(32);
const couchDbPassword = generatePassword(32);
const redisPassword = generatePassword(32);
const minioAccessKey = generatePassword(32);
const minioSecretKey = generatePassword(32);
const watchtowerPassword = generatePassword(32);
const domains: DomainSchema[] = [
{
host: mainDomain,
port: 10000,
serviceName: "proxy",
},
];
const envs = [
`BB_HOST=${mainDomain}`,
`BB_INTERNAL_API_KEY=${apiKey}`,
`BB_API_ENCRYPTION_KEY=${encryptionKey}`,
`BB_JWT_SECRET=${jwtSecret}`,
`BB_COUCHDB_PASSWORD=${couchDbPassword}`,
`BB_REDIS_PASSWORD=${redisPassword}`,
`BB_WATCHTOWER_PASSWORD=${watchtowerPassword}`,
`BB_MINIO_ACCESS_KEY=${minioAccessKey}`,
`BB_MINIO_SECRET_KEY=${minioSecretKey}`,
];
return {
domains,
envs,
};
}

View File

@ -107,6 +107,21 @@ export const templates: TemplateData[] = [
tags: ["database"],
load: () => import("./baserow/index").then((m) => m.generate),
},
{
id: "budibase",
name: "Budibase",
version: "3.2.25",
description:
"Budibase is an open-source low-code platform that saves engineers 100s of hours building forms, portals, and approval apps, securely.",
logo: "budibase.svg",
links: {
github: "https://github.com/Budibase/budibase",
website: "https://budibase.com/",
docs: "https://docs.budibase.com/docs/",
},
tags: ["database", "low-code", "nocode", "applications"],
load: () => import("./budibase/index").then((m) => m.generate),
},
{
id: "ghost",
name: "Ghost",