Skip to content

Commit 64bdf07

Browse files
authored
Merge pull request #1319 from mafrasil/feat-add-convex-tpl
feat(template): add convex.dev
2 parents 12034e4 + 8366219 commit 64bdf07

File tree

4 files changed

+95
-0
lines changed

4 files changed

+95
-0
lines changed
Lines changed: 5 additions & 0 deletions
Loading
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
services:
2+
backend:
3+
image: ghcr.io/get-convex/convex-backend:6c974d219776b753cd23d26f4a296629ff7c2cad
4+
ports:
5+
- "${PORT:-3210}:3210"
6+
- "${SITE_PROXY_PORT:-3211}:3211"
7+
volumes:
8+
- data:/convex/data
9+
environment:
10+
- INSTANCE_NAME=${INSTANCE_NAME:-}
11+
- INSTANCE_SECRET=${INSTANCE_SECRET:-}
12+
- CONVEX_RELEASE_VERSION_DEV=${CONVEX_RELEASE_VERSION_DEV:-}
13+
- ACTIONS_USER_TIMEOUT_SECS=${ACTIONS_USER_TIMEOUT_SECS:-}
14+
- CONVEX_CLOUD_ORIGIN=${CONVEX_CLOUD_ORIGIN:-http://127.0.0.1:3210}
15+
- CONVEX_SITE_ORIGIN=${CONVEX_SITE_ORIGIN:-http://127.0.0.1:3211}
16+
- DATABASE_URL=${DATABASE_URL:-}
17+
- DISABLE_BEACON=${DISABLE_BEACON:-}
18+
- REDACT_LOGS_TO_CLIENT=${REDACT_LOGS_TO_CLIENT:-}
19+
- RUST_LOG=${RUST_LOG:-info}
20+
- RUST_BACKTRACE=${RUST_BACKTRACE:-}
21+
healthcheck:
22+
test: curl -f http://localhost:3210/version
23+
interval: 5s
24+
start_period: 5s
25+
26+
dashboard:
27+
image: ghcr.io/get-convex/convex-dashboard:4499dd4fd7f2148687a7774599c613d052950f46
28+
ports:
29+
- "${DASHBOARD_PORT:-6791}:6791"
30+
environment:
31+
- NEXT_PUBLIC_DEPLOYMENT_URL=${NEXT_PUBLIC_DEPLOYMENT_URL:-http://127.0.0.1:3210}
32+
depends_on:
33+
backend:
34+
condition: service_healthy
35+
36+
volumes:
37+
data:
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import {
2+
type DomainSchema,
3+
type Schema,
4+
type Template,
5+
generateRandomDomain,
6+
} from "../utils";
7+
8+
export function generate(schema: Schema): Template {
9+
const dashboardDomain = generateRandomDomain(schema);
10+
const backendDomain = generateRandomDomain(schema);
11+
const actionsDomain = generateRandomDomain(schema);
12+
13+
const domains: DomainSchema[] = [
14+
{
15+
host: dashboardDomain,
16+
port: 6791,
17+
serviceName: "dashboard",
18+
},
19+
{
20+
host: backendDomain,
21+
port: 3210,
22+
serviceName: "backend",
23+
},
24+
{
25+
host: actionsDomain,
26+
port: 3211,
27+
serviceName: "backend",
28+
},
29+
];
30+
31+
const envs = [
32+
`NEXT_PUBLIC_DEPLOYMENT_URL=http://${backendDomain}`,
33+
`CONVEX_CLOUD_ORIGIN=http://${backendDomain}`,
34+
`CONVEX_SITE_ORIGIN=http://${actionsDomain}`,
35+
];
36+
37+
return { envs, domains };
38+
}

apps/dokploy/templates/templates.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1498,4 +1498,19 @@ export const templates: TemplateData[] = [
14981498
tags: ["self-hosted", "productivity", "personal-use"],
14991499
load: () => import("./trilium/index").then((m) => m.generate),
15001500
},
1501+
{
1502+
id: "convex",
1503+
name: "Convex",
1504+
version: "latest",
1505+
description:
1506+
"Convex is an open-source reactive database designed to make life easy for web app developers.",
1507+
logo: "convex.svg",
1508+
links: {
1509+
github: "https://github.com/get-convex/convex",
1510+
website: "https://www.convex.dev/",
1511+
docs: "https://www.convex.dev/docs",
1512+
},
1513+
tags: ["backend", "database", "api"],
1514+
load: () => import("./convex/index").then((m) => m.generate),
1515+
},
15011516
];

0 commit comments

Comments
 (0)