feat(template): add convex.dev

This commit is contained in:
mafrasil 2025-02-14 09:23:41 +04:00
parent 209029214e
commit ed54df9bd2
4 changed files with 1575 additions and 1480 deletions

View File

@ -0,0 +1,5 @@
<svg width="184" height="188" viewBox="0 0 184 188" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M108.092 130.021C126.258 128.003 143.385 118.323 152.815 102.167C148.349 142.128 104.653 167.385 68.9858 151.878C65.6992 150.453 62.8702 148.082 60.9288 145.034C52.9134 132.448 50.2786 116.433 54.0644 101.899C64.881 120.567 86.8748 132.01 108.092 130.021Z" fill="#F3B01C"/>
<path d="M53.4012 90.1735C46.0375 107.191 45.7186 127.114 54.7463 143.51C22.9759 119.608 23.3226 68.4578 54.358 44.7949C57.2286 42.6078 60.64 41.3097 64.2178 41.1121C78.9312 40.336 93.8804 46.0225 104.364 56.6193C83.0637 56.831 62.318 70.4756 53.4012 90.1735Z" fill="#8D2676"/>
<path d="M114.637 61.8552C103.89 46.8701 87.0686 36.6684 68.6387 36.358C104.264 20.1876 148.085 46.4045 152.856 85.1654C153.3 88.7635 152.717 92.4322 151.122 95.6775C144.466 109.195 132.124 119.679 117.702 123.559C128.269 103.96 126.965 80.0151 114.637 61.8552Z" fill="#EE342F"/>
</svg>

After

Width:  |  Height:  |  Size: 948 B

View File

@ -0,0 +1,37 @@
services:
backend:
image: ghcr.io/get-convex/convex-backend:6c974d219776b753cd23d26f4a296629ff7c2cad
ports:
- "${PORT:-3210}:3210"
- "${SITE_PROXY_PORT:-3211}:3211"
volumes:
- data:/convex/data
environment:
- INSTANCE_NAME=${INSTANCE_NAME:-}
- INSTANCE_SECRET=${INSTANCE_SECRET:-}
- CONVEX_RELEASE_VERSION_DEV=${CONVEX_RELEASE_VERSION_DEV:-}
- ACTIONS_USER_TIMEOUT_SECS=${ACTIONS_USER_TIMEOUT_SECS:-}
- CONVEX_CLOUD_ORIGIN=${CONVEX_CLOUD_ORIGIN:-http://127.0.0.1:3210}
- CONVEX_SITE_ORIGIN=${CONVEX_SITE_ORIGIN:-http://127.0.0.1:3211}
- DATABASE_URL=${DATABASE_URL:-}
- DISABLE_BEACON=${DISABLE_BEACON:-}
- REDACT_LOGS_TO_CLIENT=${REDACT_LOGS_TO_CLIENT:-}
- RUST_LOG=${RUST_LOG:-info}
- RUST_BACKTRACE=${RUST_BACKTRACE:-}
healthcheck:
test: curl -f http://localhost:3210/version
interval: 5s
start_period: 5s
dashboard:
image: ghcr.io/get-convex/convex-dashboard:4499dd4fd7f2148687a7774599c613d052950f46
ports:
- "${DASHBOARD_PORT:-6791}:6791"
environment:
- NEXT_PUBLIC_DEPLOYMENT_URL=${NEXT_PUBLIC_DEPLOYMENT_URL:-http://127.0.0.1:3210}
depends_on:
backend:
condition: service_healthy
volumes:
data:

View File

@ -0,0 +1,38 @@
import {
type DomainSchema,
type Schema,
type Template,
generateRandomDomain,
} from "../utils";
export function generate(schema: Schema): Template {
const dashboardDomain = generateRandomDomain(schema);
const backendDomain = generateRandomDomain(schema);
const actionsDomain = generateRandomDomain(schema);
const domains: DomainSchema[] = [
{
host: dashboardDomain,
port: 6791,
serviceName: "dashboard",
},
{
host: backendDomain,
port: 3210,
serviceName: "backend",
},
{
host: actionsDomain,
port: 3211,
serviceName: "backend",
},
];
const envs = [
`NEXT_PUBLIC_DEPLOYMENT_URL=${backendDomain}`,
`CONVEX_CLOUD_ORIGIN=${backendDomain}`,
`CONVEX_SITE_ORIGIN=${actionsDomain}`,
];
return { envs, domains };
}

File diff suppressed because it is too large Load Diff