diff --git a/blueprints/activepieces/index.ts b/blueprints/activepieces/index.ts deleted file mode 100644 index f1d97cc..0000000 --- a/blueprints/activepieces/index.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - - const apiKey = Array.from({ length: 32 }, () => - Math.floor(Math.random() * 16).toString(16), - ).join(""); - const encryptionKey = Array.from({ length: 32 }, () => - Math.floor(Math.random() * 16).toString(16), - ).join(""); - const jwtSecret = Array.from({ length: 32 }, () => - Math.floor(Math.random() * 16).toString(16), - ).join(""); - const postgresPassword = Array.from({ length: 32 }, () => - Math.floor(Math.random() * 16).toString(16), - ).join(""); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 80, - serviceName: "activepieces", - }, - ]; - - const envs = [ - `AP_HOST=${mainDomain}`, - `AP_API_KEY=${apiKey}`, - `AP_ENCRYPTION_KEY=${encryptionKey}`, - `AP_JWT_SECRET=${jwtSecret}`, - `AP_POSTGRES_PASSWORD=${postgresPassword}`, - ]; - - return { - domains, - envs, - }; -} diff --git a/blueprints/activepieces/template.yml b/blueprints/activepieces/template.yml new file mode 100644 index 0000000..de3b8f5 --- /dev/null +++ b/blueprints/activepieces/template.yml @@ -0,0 +1,21 @@ +variables: + main_domain: ${randomDomain} + api_key: ${generatePassword(32)} + encryption_key: ${generatePassword(32)} + jwt_secret: ${generatePassword(32)} + postgres_password: ${generatePassword(32)} + +config: + domains: + - serviceName: activepieces + port: 80 + host: ${main_domain} + + env: + - AP_HOST=${main_domain} + - AP_API_KEY=${api_key} + - AP_ENCRYPTION_KEY=${encryption_key} + - AP_JWT_SECRET=${jwt_secret} + - AP_POSTGRES_PASSWORD=${postgres_password} + + mounts: [] \ No newline at end of file diff --git a/blueprints/actualbudget/index.ts b/blueprints/actualbudget/index.ts deleted file mode 100644 index 33b6fea..0000000 --- a/blueprints/actualbudget/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const domains: DomainSchema[] = [ - { - host: generateRandomDomain(schema), - port: 5006, - serviceName: "actualbudget", - }, - ]; - - return { - domains, - }; -} diff --git a/blueprints/actualbudget/template.yml b/blueprints/actualbudget/template.yml new file mode 100644 index 0000000..6adb898 --- /dev/null +++ b/blueprints/actualbudget/template.yml @@ -0,0 +1,12 @@ +variables: + main_domain: ${randomDomain} + +config: + domains: + - serviceName: actualbudget + port: 5006 + host: ${main_domain} + + env: [] + + mounts: [] \ No newline at end of file diff --git a/blueprints/alist/index.ts b/blueprints/alist/index.ts deleted file mode 100644 index 2a27f57..0000000 --- a/blueprints/alist/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 5244, - serviceName: "alist", - }, - ]; - - return { - domains, - }; -} diff --git a/blueprints/alist/template.yml b/blueprints/alist/template.yml new file mode 100644 index 0000000..303f039 --- /dev/null +++ b/blueprints/alist/template.yml @@ -0,0 +1,12 @@ +variables: + main_domain: ${randomDomain} + +config: + domains: + - serviceName: alist + port: 5244 + host: ${main_domain} + + env: [] + + mounts: [] \ No newline at end of file diff --git a/blueprints/answer/index.ts b/blueprints/answer/index.ts deleted file mode 100644 index 36d48cb..0000000 --- a/blueprints/answer/index.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateHash, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainServiceHash = generateHash(schema.projectName); - const mainDomain = generateRandomDomain(schema); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 9080, - serviceName: "answer", - }, - ]; - - const envs = [ - `ANSWER_HOST=http://${mainDomain}`, - `SERVICE_HASH=${mainServiceHash}`, - ]; - - const mounts: Template["mounts"] = []; - - return { - envs, - mounts, - domains, - }; -} diff --git a/blueprints/answer/template.yml b/blueprints/answer/template.yml new file mode 100644 index 0000000..6ec15dd --- /dev/null +++ b/blueprints/answer/template.yml @@ -0,0 +1,15 @@ +variables: + main_domain: ${randomDomain} + service_hash: ${generateHash(projectName)} + +config: + domains: + - serviceName: answer + port: 9080 + host: ${main_domain} + + env: + - ANSWER_HOST=http://${main_domain} + - SERVICE_HASH=${service_hash} + + mounts: [] \ No newline at end of file diff --git a/blueprints/appsmith/index.ts b/blueprints/appsmith/index.ts deleted file mode 100644 index 73279e9..0000000 --- a/blueprints/appsmith/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateHash, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const _mainServiceHash = generateHash(schema.projectName); - - const domains: DomainSchema[] = [ - { - host: generateRandomDomain(schema), - port: 80, - serviceName: "appsmith", - }, - ]; - - return { - domains, - }; -} diff --git a/blueprints/appsmith/template.yml b/blueprints/appsmith/template.yml new file mode 100644 index 0000000..f9f9341 --- /dev/null +++ b/blueprints/appsmith/template.yml @@ -0,0 +1,12 @@ +variables: + main_domain: ${randomDomain} + +config: + domains: + - serviceName: appsmith + port: 80 + host: ${main_domain} + + env: [] + + mounts: [] \ No newline at end of file diff --git a/blueprints/appwrite/index.ts b/blueprints/appwrite/index.ts deleted file mode 100644 index 4e67132..0000000 --- a/blueprints/appwrite/index.ts +++ /dev/null @@ -1,153 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - - const domains: DomainSchema[] = [ - { host: mainDomain, port: 80, serviceName: "appwrite", path: "/" }, - { - host: mainDomain, - port: 80, - serviceName: "appwrite-console", - path: "/console", - }, - { - host: mainDomain, - port: 80, - serviceName: "appwrite-realtime", - path: "/v1/realtime", - }, - ]; - - const envs = [ - "_APP_ENV=production", - "_APP_LOCALE=en", - "_APP_OPTIONS_ABUSE=enabled", - "_APP_OPTIONS_FORCE_HTTPS=disabled", - "_APP_OPTIONS_FUNCTIONS_FORCE_HTTPS=disabled", - "_APP_OPTIONS_ROUTER_PROTECTION=disabled", - "_APP_OPENSSL_KEY_V1=your-secret-key", - `_APP_DOMAIN=${mainDomain}`, - `_APP_DOMAIN_FUNCTIONS=${mainDomain}`, - `_APP_DOMAIN_TARGET=${mainDomain}`, - "_APP_CONSOLE_WHITELIST_ROOT=enabled", - "_APP_CONSOLE_WHITELIST_EMAILS=", - "_APP_CONSOLE_WHITELIST_IPS=", - "_APP_CONSOLE_HOSTNAMES=", - "_APP_SYSTEM_EMAIL_NAME=Appwrite", - "_APP_SYSTEM_EMAIL_ADDRESS=noreply@appwrite.io", - "_APP_SYSTEM_TEAM_EMAIL=team@appwrite.io", - "_APP_SYSTEM_RESPONSE_FORMAT=", - "_APP_SYSTEM_SECURITY_EMAIL_ADDRESS=certs@appwrite.io", - "_APP_EMAIL_SECURITY=", - "_APP_EMAIL_CERTIFICATES=", - "_APP_USAGE_STATS=enabled", - "_APP_LOGGING_PROVIDER=", - "_APP_LOGGING_CONFIG=", - "_APP_USAGE_AGGREGATION_INTERVAL=30", - "_APP_USAGE_TIMESERIES_INTERVAL=30", - "_APP_USAGE_DATABASE_INTERVAL=900", - "_APP_WORKER_PER_CORE=6", - "_APP_CONSOLE_SESSION_ALERTS=disabled", - "_APP_REDIS_HOST=redis", - "_APP_REDIS_PORT=6379", - "_APP_REDIS_USER=", - "_APP_REDIS_PASS=", - "_APP_DB_HOST=mariadb", - "_APP_DB_PORT=3306", - "_APP_DB_SCHEMA=appwrite", - "_APP_DB_USER=user", - "_APP_DB_PASS=password", - "_APP_DB_ROOT_PASS=rootsecretpassword", - "_APP_INFLUXDB_HOST=influxdb", - "_APP_INFLUXDB_PORT=8086", - "_APP_STATSD_HOST=telegraf", - "_APP_STATSD_PORT=8125", - "_APP_SMTP_HOST=", - "_APP_SMTP_PORT=", - "_APP_SMTP_SECURE=", - "_APP_SMTP_USERNAME=", - "_APP_SMTP_PASSWORD=", - "_APP_SMS_PROVIDER=", - "_APP_SMS_FROM=", - "_APP_STORAGE_LIMIT=30000000", - "_APP_STORAGE_PREVIEW_LIMIT=20000000", - "_APP_STORAGE_ANTIVIRUS=disabled", - "_APP_STORAGE_ANTIVIRUS_HOST=clamav", - "_APP_STORAGE_ANTIVIRUS_PORT=3310", - "_APP_STORAGE_DEVICE=local", - "_APP_STORAGE_S3_ACCESS_KEY=", - "_APP_STORAGE_S3_SECRET=", - "_APP_STORAGE_S3_REGION=us-east-1", - "_APP_STORAGE_S3_BUCKET=", - "_APP_STORAGE_DO_SPACES_ACCESS_KEY=", - "_APP_STORAGE_DO_SPACES_SECRET=", - "_APP_STORAGE_DO_SPACES_REGION=us-east-1", - "_APP_STORAGE_DO_SPACES_BUCKET=", - "_APP_STORAGE_BACKBLAZE_ACCESS_KEY=", - "_APP_STORAGE_BACKBLAZE_SECRET=", - "_APP_STORAGE_BACKBLAZE_REGION=us-west-004", - "_APP_STORAGE_BACKBLAZE_BUCKET=", - "_APP_STORAGE_LINODE_ACCESS_KEY=", - "_APP_STORAGE_LINODE_SECRET=", - "_APP_STORAGE_LINODE_REGION=eu-central-1", - "_APP_STORAGE_LINODE_BUCKET=", - "_APP_STORAGE_WASABI_ACCESS_KEY=", - "_APP_STORAGE_WASABI_SECRET=", - "_APP_STORAGE_WASABI_REGION=eu-central-1", - "_APP_STORAGE_WASABI_BUCKET=", - "_APP_FUNCTIONS_SIZE_LIMIT=30000000", - "_APP_FUNCTIONS_BUILD_SIZE_LIMIT=2000000000", - "_APP_FUNCTIONS_TIMEOUT=900", - "_APP_FUNCTIONS_BUILD_TIMEOUT=900", - "_APP_FUNCTIONS_CONTAINERS=10", - "_APP_FUNCTIONS_CPUS=0", - "_APP_FUNCTIONS_MEMORY=0", - "_APP_FUNCTIONS_MEMORY_SWAP=0", - "_APP_FUNCTIONS_RUNTIMES=node-16.0,php-8.0,python-3.9,ruby-3.0", - "_APP_EXECUTOR_SECRET=your-secret-key", - "_APP_EXECUTOR_HOST=http://exc1/v1", - "_APP_EXECUTOR_RUNTIME_NETWORK=appwrite_runtimes", - "_APP_FUNCTIONS_ENVS=node-16.0,php-7.4,python-3.9,ruby-3.0", - "_APP_FUNCTIONS_INACTIVE_THRESHOLD=60", - "DOCKERHUB_PULL_USERNAME=", - "DOCKERHUB_PULL_PASSWORD=", - "DOCKERHUB_PULL_EMAIL=", - "OPEN_RUNTIMES_NETWORK=appwrite_runtimes", - "_APP_FUNCTIONS_RUNTIMES_NETWORK=runtimes", - "_APP_DOCKER_HUB_USERNAME=", - "_APP_DOCKER_HUB_PASSWORD=", - "_APP_FUNCTIONS_MAINTENANCE_INTERVAL=3600", - "_APP_VCS_GITHUB_APP_NAME=", - "_APP_VCS_GITHUB_PRIVATE_KEY=", - "_APP_VCS_GITHUB_APP_ID=", - "_APP_VCS_GITHUB_CLIENT_ID=", - "_APP_VCS_GITHUB_CLIENT_SECRET=", - "_APP_VCS_GITHUB_WEBHOOK_SECRET=", - "_APP_MAINTENANCE_INTERVAL=86400", - "_APP_MAINTENANCE_DELAY=0", - "_APP_MAINTENANCE_RETENTION_CACHE=2592000", - "_APP_MAINTENANCE_RETENTION_EXECUTION=1209600", - "_APP_MAINTENANCE_RETENTION_AUDIT=1209600", - "_APP_MAINTENANCE_RETENTION_ABUSE=86400", - "_APP_MAINTENANCE_RETENTION_USAGE_HOURLY=8640000", - "_APP_MAINTENANCE_RETENTION_SCHEDULES=86400", - "_APP_GRAPHQL_MAX_BATCH_SIZE=10", - "_APP_GRAPHQL_MAX_COMPLEXITY=250", - "_APP_GRAPHQL_MAX_DEPTH=3", - "_APP_MIGRATIONS_FIREBASE_CLIENT_ID=", - "_APP_MIGRATIONS_FIREBASE_CLIENT_SECRET=", - "_APP_ASSISTANT_OPENAI_API_KEY=", - ]; - - return { - domains, - envs, - mounts: [], - }; -} diff --git a/blueprints/appwrite/template.yml b/blueprints/appwrite/template.yml new file mode 100644 index 0000000..add9753 --- /dev/null +++ b/blueprints/appwrite/template.yml @@ -0,0 +1,139 @@ +variables: + main_domain: ${randomDomain} + +config: + domains: + - serviceName: appwrite + port: 80 + host: ${main_domain} + path: / + - serviceName: appwrite-console + port: 80 + host: ${main_domain} + path: /console + - serviceName: appwrite-realtime + port: 80 + host: ${main_domain} + path: /v1/realtime + + env: + - _APP_ENV=production + - _APP_LOCALE=en + - _APP_OPTIONS_ABUSE=enabled + - _APP_OPTIONS_FORCE_HTTPS=disabled + - _APP_OPTIONS_FUNCTIONS_FORCE_HTTPS=disabled + - _APP_OPTIONS_ROUTER_PROTECTION=disabled + - _APP_OPENSSL_KEY_V1=your-secret-key + - _APP_DOMAIN=${main_domain} + - _APP_DOMAIN_FUNCTIONS=${main_domain} + - _APP_DOMAIN_TARGET=${main_domain} + - _APP_CONSOLE_WHITELIST_ROOT=enabled + - _APP_CONSOLE_WHITELIST_EMAILS= + - _APP_CONSOLE_WHITELIST_IPS= + - _APP_CONSOLE_HOSTNAMES= + - _APP_SYSTEM_EMAIL_NAME=Appwrite + - _APP_SYSTEM_EMAIL_ADDRESS=noreply@appwrite.io + - _APP_SYSTEM_TEAM_EMAIL=team@appwrite.io + - _APP_SYSTEM_RESPONSE_FORMAT= + - _APP_SYSTEM_SECURITY_EMAIL_ADDRESS=certs@appwrite.io + - _APP_EMAIL_SECURITY= + - _APP_EMAIL_CERTIFICATES= + - _APP_USAGE_STATS=enabled + - _APP_LOGGING_PROVIDER= + - _APP_LOGGING_CONFIG= + - _APP_USAGE_AGGREGATION_INTERVAL=30 + - _APP_USAGE_TIMESERIES_INTERVAL=30 + - _APP_USAGE_DATABASE_INTERVAL=900 + - _APP_WORKER_PER_CORE=6 + - _APP_CONSOLE_SESSION_ALERTS=disabled + - _APP_REDIS_HOST=redis + - _APP_REDIS_PORT=6379 + - _APP_REDIS_USER= + - _APP_REDIS_PASS= + - _APP_DB_HOST=mariadb + - _APP_DB_PORT=3306 + - _APP_DB_SCHEMA=appwrite + - _APP_DB_USER=user + - _APP_DB_PASS=password + - _APP_DB_ROOT_PASS=rootsecretpassword + - _APP_INFLUXDB_HOST=influxdb + - _APP_INFLUXDB_PORT=8086 + - _APP_STATSD_HOST=telegraf + - _APP_STATSD_PORT=8125 + - _APP_SMTP_HOST= + - _APP_SMTP_PORT= + - _APP_SMTP_SECURE= + - _APP_SMTP_USERNAME= + - _APP_SMTP_PASSWORD= + - _APP_SMS_PROVIDER= + - _APP_SMS_FROM= + - _APP_STORAGE_LIMIT=30000000 + - _APP_STORAGE_PREVIEW_LIMIT=20000000 + - _APP_STORAGE_ANTIVIRUS=disabled + - _APP_STORAGE_ANTIVIRUS_HOST=clamav + - _APP_STORAGE_ANTIVIRUS_PORT=3310 + - _APP_STORAGE_DEVICE=local + - _APP_STORAGE_S3_ACCESS_KEY= + - _APP_STORAGE_S3_SECRET= + - _APP_STORAGE_S3_REGION=us-east-1 + - _APP_STORAGE_S3_BUCKET= + - _APP_STORAGE_DO_SPACES_ACCESS_KEY= + - _APP_STORAGE_DO_SPACES_SECRET= + - _APP_STORAGE_DO_SPACES_REGION=us-east-1 + - _APP_STORAGE_DO_SPACES_BUCKET= + - _APP_STORAGE_BACKBLAZE_ACCESS_KEY= + - _APP_STORAGE_BACKBLAZE_SECRET= + - _APP_STORAGE_BACKBLAZE_REGION=us-west-004 + - _APP_STORAGE_BACKBLAZE_BUCKET= + - _APP_STORAGE_LINODE_ACCESS_KEY= + - _APP_STORAGE_LINODE_SECRET= + - _APP_STORAGE_LINODE_REGION=eu-central-1 + - _APP_STORAGE_LINODE_BUCKET= + - _APP_STORAGE_WASABI_ACCESS_KEY= + - _APP_STORAGE_WASABI_SECRET= + - _APP_STORAGE_WASABI_REGION=eu-central-1 + - _APP_STORAGE_WASABI_BUCKET= + - _APP_FUNCTIONS_SIZE_LIMIT=30000000 + - _APP_FUNCTIONS_BUILD_SIZE_LIMIT=2000000000 + - _APP_FUNCTIONS_TIMEOUT=900 + - _APP_FUNCTIONS_BUILD_TIMEOUT=900 + - _APP_FUNCTIONS_CONTAINERS=10 + - _APP_FUNCTIONS_CPUS=0 + - _APP_FUNCTIONS_MEMORY=0 + - _APP_FUNCTIONS_MEMORY_SWAP=0 + - _APP_FUNCTIONS_RUNTIMES=node-16.0,php-8.0,python-3.9,ruby-3.0 + - _APP_EXECUTOR_SECRET=your-secret-key + - _APP_EXECUTOR_HOST=http://exc1/v1 + - _APP_EXECUTOR_RUNTIME_NETWORK=appwrite_runtimes + - _APP_FUNCTIONS_ENVS=node-16.0,php-7.4,python-3.9,ruby-3.0 + - _APP_FUNCTIONS_INACTIVE_THRESHOLD=60 + - DOCKERHUB_PULL_USERNAME= + - DOCKERHUB_PULL_PASSWORD= + - DOCKERHUB_PULL_EMAIL= + - OPEN_RUNTIMES_NETWORK=appwrite_runtimes + - _APP_FUNCTIONS_RUNTIMES_NETWORK=runtimes + - _APP_DOCKER_HUB_USERNAME= + - _APP_DOCKER_HUB_PASSWORD= + - _APP_FUNCTIONS_MAINTENANCE_INTERVAL=3600 + - _APP_VCS_GITHUB_APP_NAME= + - _APP_VCS_GITHUB_PRIVATE_KEY= + - _APP_VCS_GITHUB_APP_ID= + - _APP_VCS_GITHUB_CLIENT_ID= + - _APP_VCS_GITHUB_CLIENT_SECRET= + - _APP_VCS_GITHUB_WEBHOOK_SECRET= + - _APP_MAINTENANCE_INTERVAL=86400 + - _APP_MAINTENANCE_DELAY=0 + - _APP_MAINTENANCE_RETENTION_CACHE=2592000 + - _APP_MAINTENANCE_RETENTION_EXECUTION=1209600 + - _APP_MAINTENANCE_RETENTION_AUDIT=1209600 + - _APP_MAINTENANCE_RETENTION_ABUSE=86400 + - _APP_MAINTENANCE_RETENTION_USAGE_HOURLY=8640000 + - _APP_MAINTENANCE_RETENTION_SCHEDULES=86400 + - _APP_GRAPHQL_MAX_BATCH_SIZE=10 + - _APP_GRAPHQL_MAX_COMPLEXITY=250 + - _APP_GRAPHQL_MAX_DEPTH=3 + - _APP_MIGRATIONS_FIREBASE_CLIENT_ID= + - _APP_MIGRATIONS_FIREBASE_CLIENT_SECRET= + - _APP_ASSISTANT_OPENAI_API_KEY= + + mounts: [] \ No newline at end of file diff --git a/blueprints/aptabase/index.ts b/blueprints/aptabase/index.ts deleted file mode 100644 index 38b077a..0000000 --- a/blueprints/aptabase/index.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateBase64, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - const authSecret = generateBase64(32); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 8080, - serviceName: "aptabase", - }, - ]; - - const envs = [`APTABASE_HOST=${mainDomain}`, `AUTH_SECRET=${authSecret}`]; - - return { - envs, - domains, - }; -} diff --git a/blueprints/aptabase/template.yml b/blueprints/aptabase/template.yml new file mode 100644 index 0000000..e4d8804 --- /dev/null +++ b/blueprints/aptabase/template.yml @@ -0,0 +1,15 @@ +variables: + main_domain: ${randomDomain} + auth_secret: ${generateBase64(32)} + +config: + domains: + - serviceName: aptabase + port: 8080 + host: ${main_domain} + + env: + - APTABASE_HOST=${main_domain} + - AUTH_SECRET=${auth_secret} + + mounts: [] \ No newline at end of file diff --git a/blueprints/baserow/index.ts b/blueprints/baserow/index.ts deleted file mode 100644 index fa57417..0000000 --- a/blueprints/baserow/index.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainHost = generateRandomDomain(schema); - - const domains: DomainSchema[] = [ - { - host: mainHost, - port: 80, - serviceName: "baserow", - }, - ]; - const envs = [`BASEROW_HOST=${mainHost}`]; - - return { - envs, - domains, - }; -} diff --git a/blueprints/baserow/template.yml b/blueprints/baserow/template.yml new file mode 100644 index 0000000..3994b6d --- /dev/null +++ b/blueprints/baserow/template.yml @@ -0,0 +1,13 @@ +variables: + main_domain: ${randomDomain} + +config: + domains: + - serviceName: baserow + port: 80 + host: ${main_domain} + + env: + - BASEROW_HOST=${main_domain} + + mounts: [] \ No newline at end of file diff --git a/blueprints/blender/index.ts b/blueprints/blender/index.ts deleted file mode 100644 index 79508be..0000000 --- a/blueprints/blender/index.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateHash, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const _mainServiceHash = generateHash(schema.projectName); - const mainDomain = generateRandomDomain(schema); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 3000, - serviceName: "blender", - }, - ]; - - const envs = [ - "PUID=1000", - "PGID=1000", - "TZ=Etc/UTC", - "SUBFOLDER=/", - "NVIDIA_VISIBLE_DEVICES=all", - "NVIDIA_DRIVER_CAPABILITIES=all", - ]; - - return { - envs, - domains, - }; -} diff --git a/blueprints/blender/template.yml b/blueprints/blender/template.yml new file mode 100644 index 0000000..db64dd9 --- /dev/null +++ b/blueprints/blender/template.yml @@ -0,0 +1,18 @@ +variables: + main_domain: ${randomDomain} + +config: + domains: + - serviceName: blender + port: 3000 + host: ${main_domain} + + env: + - PUID=1000 + - PGID=1000 + - TZ=Etc/UTC + - SUBFOLDER=/ + - NVIDIA_VISIBLE_DEVICES=all + - NVIDIA_DRIVER_CAPABILITIES=all + + mounts: [] \ No newline at end of file diff --git a/blueprints/browserless/index.ts b/blueprints/browserless/index.ts deleted file mode 100644 index f922e86..0000000 --- a/blueprints/browserless/index.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generatePassword, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainHost = generateRandomDomain(schema); - - const domains: DomainSchema[] = [ - { - host: mainHost, - port: 3000, - serviceName: "browserless", - }, - ]; - const envs = [ - `BROWERLESS_HOST=${mainHost}`, - `BROWSERLESS_TOKEN=${generatePassword(16)}`, - ]; - - return { - envs, - domains, - }; -} diff --git a/blueprints/browserless/template.yml b/blueprints/browserless/template.yml new file mode 100644 index 0000000..3600118 --- /dev/null +++ b/blueprints/browserless/template.yml @@ -0,0 +1,15 @@ +variables: + main_domain: ${randomDomain} + browserless_token: ${generatePassword(16)} + +config: + domains: + - serviceName: browserless + port: 3000 + host: ${main_domain} + + env: + - BROWERLESS_HOST=${main_domain} + - BROWSERLESS_TOKEN=${browserless_token} + + mounts: [] \ No newline at end of file diff --git a/blueprints/budibase/index.ts b/blueprints/budibase/index.ts deleted file mode 100644 index 50bdfdb..0000000 --- a/blueprints/budibase/index.ts +++ /dev/null @@ -1,45 +0,0 @@ -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, - }; -} diff --git a/blueprints/budibase/template.yml b/blueprints/budibase/template.yml new file mode 100644 index 0000000..792c791 --- /dev/null +++ b/blueprints/budibase/template.yml @@ -0,0 +1,29 @@ +variables: + main_domain: ${randomDomain} + api_key: ${generatePassword(32)} + encryption_key: ${generatePassword(32)} + jwt_secret: ${generatePassword(32)} + couchdb_password: ${generatePassword(32)} + redis_password: ${generatePassword(32)} + minio_access_key: ${generatePassword(32)} + minio_secret_key: ${generatePassword(32)} + watchtower_password: ${generatePassword(32)} + +config: + domains: + - serviceName: proxy + port: 10000 + host: ${main_domain} + + env: + - BB_HOST=${main_domain} + - BB_INTERNAL_API_KEY=${api_key} + - BB_API_ENCRYPTION_KEY=${encryption_key} + - BB_JWT_SECRET=${jwt_secret} + - BB_COUCHDB_PASSWORD=${couchdb_password} + - BB_REDIS_PASSWORD=${redis_password} + - BB_WATCHTOWER_PASSWORD=${watchtower_password} + - BB_MINIO_ACCESS_KEY=${minio_access_key} + - BB_MINIO_SECRET_KEY=${minio_secret_key} + + mounts: [] \ No newline at end of file diff --git a/blueprints/calcom/index.ts b/blueprints/calcom/index.ts deleted file mode 100644 index d359e9c..0000000 --- a/blueprints/calcom/index.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateBase64, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - const calcomEncryptionKey = generateBase64(32); - const nextAuthSecret = generateBase64(32); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 3000, - serviceName: "calcom", - }, - ]; - - const envs = [ - `CALCOM_HOST=${mainDomain}`, - `NEXTAUTH_SECRET=${nextAuthSecret}`, - `CALENDSO_ENCRYPTION_KEY=${calcomEncryptionKey}`, - ]; - - return { - envs, - domains, - }; -} diff --git a/blueprints/calcom/template.yml b/blueprints/calcom/template.yml new file mode 100644 index 0000000..ac56ca0 --- /dev/null +++ b/blueprints/calcom/template.yml @@ -0,0 +1,17 @@ +variables: + main_domain: ${randomDomain} + calcom_encryption_key: ${generateBase64(32)} + nextauth_secret: ${generateBase64(32)} + +config: + domains: + - serviceName: calcom + port: 3000 + host: ${main_domain} + + env: + - CALCOM_HOST=${main_domain} + - NEXTAUTH_SECRET=${nextauth_secret} + - CALENDSO_ENCRYPTION_KEY=${calcom_encryption_key} + + mounts: [] \ No newline at end of file diff --git a/blueprints/chatwoot/index.ts b/blueprints/chatwoot/index.ts deleted file mode 100644 index 9c5e44c..0000000 --- a/blueprints/chatwoot/index.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateBase64, - generatePassword, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - const secretKeyBase = generateBase64(64); - const postgresPassword = generatePassword(); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 3000, - serviceName: "chatwoot-rails", - }, - ]; - - const envs = [ - `FRONTEND_URL=http://${mainDomain}`, - `SECRET_KEY_BASE=${secretKeyBase}`, - "RAILS_ENV=production", - "NODE_ENV=production", - "INSTALLATION_ENV=docker", - "RAILS_LOG_TO_STDOUT=true", - "LOG_LEVEL=info", - "DEFAULT_LOCALE=en", - "POSTGRES_HOST=chatwoot-postgres", - "POSTGRES_PORT=5432", - "POSTGRES_DATABASE=chatwoot", - "POSTGRES_USERNAME=postgres", - `POSTGRES_PASSWORD=${postgresPassword}`, - "REDIS_URL=redis://chatwoot-redis:6379", - "ENABLE_ACCOUNT_SIGNUP=false", - "ACTIVE_STORAGE_SERVICE=local", - ]; - - return { - domains, - envs, - }; -} diff --git a/blueprints/chatwoot/template.yml b/blueprints/chatwoot/template.yml new file mode 100644 index 0000000..ba9523d --- /dev/null +++ b/blueprints/chatwoot/template.yml @@ -0,0 +1,30 @@ +variables: + main_domain: ${randomDomain} + secret_key_base: ${generateBase64(64)} + postgres_password: ${generatePassword} + +config: + domains: + - serviceName: chatwoot-rails + port: 3000 + host: ${main_domain} + + env: + - FRONTEND_URL=http://${main_domain} + - SECRET_KEY_BASE=${secret_key_base} + - RAILS_ENV=production + - NODE_ENV=production + - INSTALLATION_ENV=docker + - RAILS_LOG_TO_STDOUT=true + - LOG_LEVEL=info + - DEFAULT_LOCALE=en + - POSTGRES_HOST=chatwoot-postgres + - POSTGRES_PORT=5432 + - POSTGRES_DATABASE=chatwoot + - POSTGRES_USERNAME=postgres + - POSTGRES_PASSWORD=${postgres_password} + - REDIS_URL=redis://chatwoot-redis:6379 + - ENABLE_ACCOUNT_SIGNUP=false + - ACTIVE_STORAGE_SERVICE=local + + mounts: [] \ No newline at end of file diff --git a/blueprints/checkmate/index.ts b/blueprints/checkmate/index.ts deleted file mode 100644 index e52370a..0000000 --- a/blueprints/checkmate/index.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - - const envs = [`DOMAIN=${mainDomain}`]; - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 80, - serviceName: "client", - }, - ]; - - return { - domains, - envs, - }; -} diff --git a/blueprints/checkmate/template.yml b/blueprints/checkmate/template.yml new file mode 100644 index 0000000..caac4ab --- /dev/null +++ b/blueprints/checkmate/template.yml @@ -0,0 +1,13 @@ +variables: + main_domain: ${randomDomain} + +config: + domains: + - serviceName: client + port: 80 + host: ${main_domain} + + env: + - DOMAIN=${main_domain} + + mounts: [] \ No newline at end of file diff --git a/blueprints/cloudflared/index.ts b/blueprints/cloudflared/index.ts deleted file mode 100644 index 93ea091..0000000 --- a/blueprints/cloudflared/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { Schema, Template } from "../utils"; - -export function generate(_schema: Schema): Template { - const envs = [`CLOUDFLARE_TUNNEL_TOKEN=""`]; - - return { - envs, - }; -} diff --git a/blueprints/cloudflared/template.yml b/blueprints/cloudflared/template.yml new file mode 100644 index 0000000..277fe8d --- /dev/null +++ b/blueprints/cloudflared/template.yml @@ -0,0 +1,9 @@ +variables: {} + +config: + domains: [] + + env: + - CLOUDFLARE_TUNNEL_TOKEN="" + + mounts: [] \ No newline at end of file diff --git a/blueprints/coder/index.ts b/blueprints/coder/index.ts deleted file mode 100644 index c3f066d..0000000 --- a/blueprints/coder/index.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const domains: DomainSchema[] = [ - { - host: generateRandomDomain(schema), - port: 7080, - serviceName: "coder", - }, - ]; - - const envs = [ - "CODER_ACCESS_URL=", - "CODER_HTTP_ADDRESS=0.0.0.0:7080", - "", - "POSTGRES_DB=coder", - "POSTGRES_USER=coder", - "POSTGRES_PASSWORD=VERY_STRONG_PASSWORD", - ]; - - return { - domains, - envs, - }; -} diff --git a/blueprints/coder/template.yml b/blueprints/coder/template.yml new file mode 100644 index 0000000..5eb7b20 --- /dev/null +++ b/blueprints/coder/template.yml @@ -0,0 +1,18 @@ +variables: + main_domain: ${randomDomain} + postgres_password: ${generatePassword} + +config: + domains: + - serviceName: coder + port: 7080 + host: ${main_domain} + + env: + - CODER_ACCESS_URL= + - CODER_HTTP_ADDRESS=0.0.0.0:7080 + - POSTGRES_DB=coder + - POSTGRES_USER=coder + - POSTGRES_PASSWORD=${postgres_password} + + mounts: [] \ No newline at end of file diff --git a/blueprints/conduit/index.ts b/blueprints/conduit/index.ts deleted file mode 100644 index 2b9a81a..0000000 --- a/blueprints/conduit/index.ts +++ /dev/null @@ -1,28 +0,0 @@ -// EXAMPLE -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const matrixSubdomain = generateRandomDomain(schema); - - const domains: DomainSchema[] = [ - { - host: matrixSubdomain, - port: 6167, - serviceName: "homeserver", - }, - ]; - - const envs = [ - `MATRIX_SUBDOMAIN=${matrixSubdomain} # Replace by your server name`, - ]; - - return { - envs, - domains, - }; -} diff --git a/blueprints/conduit/template.yml b/blueprints/conduit/template.yml new file mode 100644 index 0000000..db3425e --- /dev/null +++ b/blueprints/conduit/template.yml @@ -0,0 +1,13 @@ +variables: + main_domain: ${randomDomain} + +config: + domains: + - serviceName: homeserver + port: 6167 + host: ${main_domain} + + env: + - MATRIX_SUBDOMAIN=${main_domain} + + mounts: [] \ No newline at end of file diff --git a/blueprints/conduwuit/index.ts b/blueprints/conduwuit/index.ts deleted file mode 100644 index 9d9e985..0000000 --- a/blueprints/conduwuit/index.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generatePassword, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const matrixSubdomain = generateRandomDomain(schema); - const registrationToken = generatePassword(20); - - const domains: DomainSchema[] = [ - { - host: matrixSubdomain, - port: 6167, - serviceName: "homeserver", - }, - ]; - - const envs = [ - `CONDUWUIT_SERVER_NAME=${matrixSubdomain}`, - `CONDUWUIT_REGISTRATION_TOKEN=${registrationToken}`, - ]; - - return { - envs, - domains, - }; -} diff --git a/blueprints/conduwuit/template.yml b/blueprints/conduwuit/template.yml new file mode 100644 index 0000000..616261b --- /dev/null +++ b/blueprints/conduwuit/template.yml @@ -0,0 +1,15 @@ +variables: + main_domain: ${randomDomain} + registration_token: ${generatePassword(20)} + +config: + domains: + - serviceName: homeserver + port: 6167 + host: ${main_domain} + + env: + - CONDUWUIT_SERVER_NAME=${main_domain} + - CONDUWUIT_REGISTRATION_TOKEN=${registration_token} + + mounts: [] \ No newline at end of file diff --git a/blueprints/convex/index.ts b/blueprints/convex/index.ts deleted file mode 100644 index badfe73..0000000 --- a/blueprints/convex/index.ts +++ /dev/null @@ -1,38 +0,0 @@ -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=http://${backendDomain}`, - `CONVEX_CLOUD_ORIGIN=http://${backendDomain}`, - `CONVEX_SITE_ORIGIN=http://${actionsDomain}`, - ]; - - return { envs, domains }; -} diff --git a/blueprints/convex/template.yml b/blueprints/convex/template.yml new file mode 100644 index 0000000..6cdf1ac --- /dev/null +++ b/blueprints/convex/template.yml @@ -0,0 +1,23 @@ +variables: + dashboard_domain: ${randomDomain} + backend_domain: ${randomDomain} + actions_domain: ${randomDomain} + +config: + domains: + - serviceName: dashboard + port: 6791 + host: ${dashboard_domain} + - serviceName: backend + port: 3210 + host: ${backend_domain} + - serviceName: backend + port: 3211 + host: ${actions_domain} + + env: + - NEXT_PUBLIC_DEPLOYMENT_URL=http://${backend_domain} + - CONVEX_CLOUD_ORIGIN=http://${backend_domain} + - CONVEX_SITE_ORIGIN=http://${actions_domain} + + mounts: [] \ No newline at end of file diff --git a/blueprints/couchdb/index.ts b/blueprints/couchdb/index.ts deleted file mode 100644 index 70d7166..0000000 --- a/blueprints/couchdb/index.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generatePassword, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - const username = generatePassword(16); - const password = generatePassword(32); - - const domains: DomainSchema[] = [ - { - serviceName: "couchdb", - host: mainDomain, - port: 5984, - }, - ]; - - const envs = [`COUCHDB_USER=${username}`, `COUCHDB_PASSWORD=${password}`]; - - return { - envs, - domains, - }; -} diff --git a/blueprints/couchdb/template.yml b/blueprints/couchdb/template.yml new file mode 100644 index 0000000..a096465 --- /dev/null +++ b/blueprints/couchdb/template.yml @@ -0,0 +1,16 @@ +variables: + main_domain: ${randomDomain} + username: ${generatePassword(16)} + password: ${generatePassword(32)} + +config: + domains: + - serviceName: couchdb + port: 5984 + host: ${main_domain} + + env: + - COUCHDB_USER=${username} + - COUCHDB_PASSWORD=${password} + + mounts: [] \ No newline at end of file diff --git a/blueprints/datalens/index.ts b/blueprints/datalens/index.ts deleted file mode 100644 index f2efb76..0000000 --- a/blueprints/datalens/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const domains: DomainSchema[] = [ - { - host: generateRandomDomain(schema), - port: 8080, - serviceName: "datalens", - }, - ]; - - const envs = ["HC=1"]; - - return { - envs, - domains, - }; -} diff --git a/blueprints/datalens/template.yml b/blueprints/datalens/template.yml new file mode 100644 index 0000000..cf54409 --- /dev/null +++ b/blueprints/datalens/template.yml @@ -0,0 +1,13 @@ +variables: + main_domain: ${randomDomain} + +config: + domains: + - serviceName: datalens + port: 8080 + host: ${main_domain} + + env: + - HC=1 + + mounts: [] \ No newline at end of file diff --git a/blueprints/directus/index.ts b/blueprints/directus/index.ts deleted file mode 100644 index 37d03e7..0000000 --- a/blueprints/directus/index.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateBase64, - generatePassword, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const directusSecret = generateBase64(64); - const databasePassword = generatePassword(); - - const domains: DomainSchema[] = [ - { - host: generateRandomDomain(schema), - port: 8055, - serviceName: "directus", - }, - ]; - - const envs = [ - `DATABASE_PASSWORD=${databasePassword}`, - `DIRECTUS_SECRET=${directusSecret}`, - ]; - - return { - domains, - envs, - }; -} diff --git a/blueprints/directus/template.yml b/blueprints/directus/template.yml new file mode 100644 index 0000000..04505a6 --- /dev/null +++ b/blueprints/directus/template.yml @@ -0,0 +1,16 @@ +variables: + main_domain: ${randomDomain} + directus_secret: ${generateBase64(64)} + database_password: ${generatePassword} + +config: + domains: + - serviceName: directus + port: 8055 + host: ${main_domain} + + env: + - DATABASE_PASSWORD=${database_password} + - DIRECTUS_SECRET=${directus_secret} + + mounts: [] \ No newline at end of file diff --git a/blueprints/discord-tickets/index.ts b/blueprints/discord-tickets/index.ts deleted file mode 100644 index e11b78e..0000000 --- a/blueprints/discord-tickets/index.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generatePassword, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - const mysqlPassword = generatePassword(); - const mysqlRootPassword = generatePassword(); - const mysqlUser = "tickets"; - const mysqlDatabase = "tickets"; - - const encryptionKey = Array.from({ length: 48 }, () => - Math.floor(Math.random() * 16).toString(16), - ).join(""); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 8169, - serviceName: "tickets-app", - }, - ]; - - const envs = [ - `TICKETS_HOST=${mainDomain}`, - `MYSQL_DATABASE=${mysqlDatabase}`, - `MYSQL_PASSWORD=${mysqlPassword}`, - `MYSQL_ROOT_PASSWORD=${mysqlRootPassword}`, - `MYSQL_USER=${mysqlUser}`, - `ENCRYPTION_KEY=${encryptionKey}`, - "# Follow the guide at: https://discordtickets.app/self-hosting/installation/docker/#creating-the-discord-application", - "DISCORD_SECRET=", - "DISCORD_TOKEN=", - "SUPER_USERS=YOUR_DISCORD_USER_ID", // Default super user - ]; - - return { - domains, - envs, - }; -} diff --git a/blueprints/discord-tickets/template.yml b/blueprints/discord-tickets/template.yml new file mode 100644 index 0000000..63ba87c --- /dev/null +++ b/blueprints/discord-tickets/template.yml @@ -0,0 +1,27 @@ +variables: + main_domain: ${randomDomain} + mysql_password: ${generatePassword} + mysql_root_password: ${generatePassword} + mysql_user: tickets + mysql_database: tickets + encryption_key: ${generatePassword(48)} + +config: + domains: + - serviceName: tickets-app + port: 8169 + host: ${main_domain} + + env: + - TICKETS_HOST=${main_domain} + - MYSQL_DATABASE=${mysql_database} + - MYSQL_PASSWORD=${mysql_password} + - MYSQL_ROOT_PASSWORD=${mysql_root_password} + - MYSQL_USER=${mysql_user} + - ENCRYPTION_KEY=${encryption_key} + - "# Follow the guide at: https://discordtickets.app/self-hosting/installation/docker/#creating-the-discord-application" + - DISCORD_SECRET= + - DISCORD_TOKEN= + - SUPER_USERS=YOUR_DISCORD_USER_ID + + mounts: [] \ No newline at end of file diff --git a/blueprints/discourse/index.ts b/blueprints/discourse/index.ts deleted file mode 100644 index bf99e8d..0000000 --- a/blueprints/discourse/index.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generatePassword, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - const postgresPassword = generatePassword(); - const redisPassword = generatePassword(); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 3000, - serviceName: "discourse-app", - }, - ]; - - const envs = [ - `DISCOURSE_HOST=${mainDomain}`, - `POSTGRES_PASSWORD=${postgresPassword}`, - `REDIS_PASSWORD=${redisPassword}`, - "# Optional: Configure SMTP for email delivery", - "# SMTP_HOST=smtp.example.com", - "# SMTP_PORT=587", - "# SMTP_USER=your_smtp_user", - "# SMTP_PASSWORD=your_smtp_password", - ]; - - return { - domains, - envs, - }; -} diff --git a/blueprints/discourse/template.yml b/blueprints/discourse/template.yml new file mode 100644 index 0000000..3043cb2 --- /dev/null +++ b/blueprints/discourse/template.yml @@ -0,0 +1,22 @@ +variables: + main_domain: ${randomDomain} + postgres_password: ${generatePassword} + redis_password: ${generatePassword} + +config: + domains: + - serviceName: discourse-app + port: 3000 + host: ${main_domain} + + env: + - DISCOURSE_HOST=${main_domain} + - POSTGRES_PASSWORD=${postgres_password} + - REDIS_PASSWORD=${redis_password} + - # Optional: Configure SMTP for email delivery + - # SMTP_HOST=smtp.example.com + - # SMTP_PORT=587 + - # SMTP_USER=your_smtp_user + - # SMTP_PASSWORD=your_smtp_password + + mounts: [] \ No newline at end of file diff --git a/blueprints/docmost/index.ts b/blueprints/docmost/index.ts deleted file mode 100644 index 16f7afa..0000000 --- a/blueprints/docmost/index.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const domains: DomainSchema[] = [ - { - host: generateRandomDomain(schema), - port: 3000, - serviceName: "docmost", - }, - ]; - - const envs = [ - "POSTGRES_DB=docmost", - "POSTGRES_USER=docmost", - "POSTGRES_PASSWORD=STRONG_DB_PASSWORD", - "APP_URL=http://localhost:3000", - "APP_SECRET=VERY_STRONG_SECRET", - ]; - - return { - domains, - envs, - }; -} diff --git a/blueprints/docmost/template.yml b/blueprints/docmost/template.yml new file mode 100644 index 0000000..db3b871 --- /dev/null +++ b/blueprints/docmost/template.yml @@ -0,0 +1,19 @@ +variables: + main_domain: ${randomDomain} + postgres_password: ${generatePassword} + app_secret: ${generatePassword} + +config: + domains: + - serviceName: docmost + port: 3000 + host: ${main_domain} + + env: + - POSTGRES_DB=docmost + - POSTGRES_USER=docmost + - POSTGRES_PASSWORD=${postgres_password} + - APP_URL=http://${main_domain}:3000 + - APP_SECRET=${app_secret} + + mounts: [] \ No newline at end of file diff --git a/blueprints/documenso/index.ts b/blueprints/documenso/index.ts deleted file mode 100644 index c70d1db..0000000 --- a/blueprints/documenso/index.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateBase64, - generatePassword, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - const nextAuthSecret = generateBase64(32); - const documensoEncryptionKey = generatePassword(32); - const documensoSecondaryEncryptionKey = generatePassword(64); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 3000, - serviceName: "documenso", - }, - ]; - - const envs = [ - `DOCUMENSO_HOST=${mainDomain}`, - "DOCUMENSO_PORT=3000", - `NEXTAUTH_SECRET=${nextAuthSecret}`, - `NEXT_PRIVATE_ENCRYPTION_KEY=${documensoEncryptionKey}`, - `NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY=${documensoSecondaryEncryptionKey}`, - ]; - - return { - envs, - domains, - }; -} diff --git a/blueprints/documenso/template.yml b/blueprints/documenso/template.yml new file mode 100644 index 0000000..49a51eb --- /dev/null +++ b/blueprints/documenso/template.yml @@ -0,0 +1,20 @@ +variables: + main_domain: ${randomDomain} + nextauth_secret: ${generateBase64(32)} + encryption_key: ${generatePassword(32)} + secondary_encryption_key: ${generatePassword(64)} + +config: + domains: + - serviceName: documenso + port: 3000 + host: ${main_domain} + + env: + - DOCUMENSO_HOST=${main_domain} + - DOCUMENSO_PORT=3000 + - NEXTAUTH_SECRET=${nextauth_secret} + - NEXT_PRIVATE_ENCRYPTION_KEY=${encryption_key} + - NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY=${secondary_encryption_key} + + mounts: [] \ No newline at end of file diff --git a/blueprints/doublezero/index.ts b/blueprints/doublezero/index.ts deleted file mode 100644 index fa774e9..0000000 --- a/blueprints/doublezero/index.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateBase64, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - const secretKeyBase = generateBase64(64); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 4000, - serviceName: "doublezero", - }, - ]; - - const envs = [ - `DOUBLEZERO_HOST=${mainDomain}`, - "DOUBLEZERO_PORT=4000", - `SECRET_KEY_BASE=${secretKeyBase}`, - "AWS_ACCESS_KEY_ID=your-aws-access-key", - "AWS_SECRET_ACCESS_KEY=your-aws-secret-key", - "AWS_REGION=your-aws-region", - "SQS_URL=your-aws-sqs-url", - "SYSTEM_EMAIL=", - ]; - - return { - envs, - domains, - }; -} diff --git a/blueprints/doublezero/template.yml b/blueprints/doublezero/template.yml new file mode 100644 index 0000000..f286402 --- /dev/null +++ b/blueprints/doublezero/template.yml @@ -0,0 +1,21 @@ +variables: + main_domain: ${randomDomain} + secret_key_base: ${generateBase64(64)} + +config: + domains: + - serviceName: doublezero + port: 4000 + host: ${main_domain} + + env: + - DOUBLEZERO_HOST=${main_domain} + - DOUBLEZERO_PORT=4000 + - SECRET_KEY_BASE=${secret_key_base} + - AWS_ACCESS_KEY_ID=your-aws-access-key + - AWS_SECRET_ACCESS_KEY=your-aws-secret-key + - AWS_REGION=your-aws-region + - SQS_URL=your-aws-sqs-url + - SYSTEM_EMAIL= + + mounts: [] \ No newline at end of file diff --git a/blueprints/drawio/index.ts b/blueprints/drawio/index.ts deleted file mode 100644 index 701283c..0000000 --- a/blueprints/drawio/index.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateBase64, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - const _secretKeyBase = generateBase64(64); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 8080, - serviceName: "drawio", - }, - ]; - - const envs = [ - `DRAWIO_HOST=${mainDomain}`, - `DRAWIO_BASE_URL=https://${mainDomain}`, - `DRAWIO_SERVER_URL=https://${mainDomain}/`, - ]; - - return { - envs, - domains, - }; -} diff --git a/blueprints/drawio/template.yml b/blueprints/drawio/template.yml new file mode 100644 index 0000000..d953275 --- /dev/null +++ b/blueprints/drawio/template.yml @@ -0,0 +1,15 @@ +variables: + main_domain: ${randomDomain} + +config: + domains: + - serviceName: drawio + port: 8080 + host: ${main_domain} + + env: + - DRAWIO_HOST=${main_domain} + - DRAWIO_BASE_URL=https://${main_domain} + - DRAWIO_SERVER_URL=https://${main_domain}/ + + mounts: [] \ No newline at end of file diff --git a/blueprints/elastic-search/index.ts b/blueprints/elastic-search/index.ts deleted file mode 100644 index 5a3a31e..0000000 --- a/blueprints/elastic-search/index.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - const apiDomain = generateRandomDomain(schema); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 5601, - serviceName: "kibana", - }, - { - host: apiDomain, - port: 9200, - serviceName: "elasticsearch", - }, - ]; - - return { - domains, - }; -} diff --git a/blueprints/elastic-search/template.yml b/blueprints/elastic-search/template.yml new file mode 100644 index 0000000..322f2b4 --- /dev/null +++ b/blueprints/elastic-search/template.yml @@ -0,0 +1,16 @@ +variables: + main_domain: ${randomDomain} + api_domain: ${randomDomain} + +config: + domains: + - serviceName: kibana + port: 5601 + host: ${main_domain} + - serviceName: elasticsearch + port: 9200 + host: ${api_domain} + + env: [] + + mounts: [] \ No newline at end of file diff --git a/blueprints/erpnext/index.ts b/blueprints/erpnext/index.ts deleted file mode 100644 index 5b7543b..0000000 --- a/blueprints/erpnext/index.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generatePassword, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const dbRootPassword = generatePassword(32); - const adminPassword = generatePassword(32); - const mainDomain = generateRandomDomain(schema); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 8080, - serviceName: "frontend", - }, - ]; - - const envs = [ - `SITE_NAME=${mainDomain}`, - `ADMIN_PASSWORD=${adminPassword}`, - `DB_ROOT_PASSWORD=${dbRootPassword}`, - "MIGRATE=1", - "ENABLE_DB=1", - "DB_HOST=db", - "CREATE_SITE=1", - "CONFIGURE=1", - "REGENERATE_APPS_TXT=1", - "INSTALL_APP_ARGS=--install-app erpnext", - "IMAGE_NAME=docker.io/frappe/erpnext", - "VERSION=version-15", - "FRAPPE_SITE_NAME_HEADER=", - ]; - - return { envs, domains }; -} diff --git a/blueprints/erpnext/template.yml b/blueprints/erpnext/template.yml new file mode 100644 index 0000000..1a77943 --- /dev/null +++ b/blueprints/erpnext/template.yml @@ -0,0 +1,27 @@ +variables: + main_domain: ${randomDomain} + db_root_password: ${generatePassword(32)} + admin_password: ${generatePassword(32)} + +config: + domains: + - serviceName: frontend + port: 8080 + host: ${main_domain} + + env: + - SITE_NAME=${main_domain} + - ADMIN_PASSWORD=${admin_password} + - DB_ROOT_PASSWORD=${db_root_password} + - MIGRATE=1 + - ENABLE_DB=1 + - DB_HOST=db + - CREATE_SITE=1 + - CONFIGURE=1 + - REGENERATE_APPS_TXT=1 + - INSTALL_APP_ARGS=--install-app erpnext + - IMAGE_NAME=docker.io/frappe/erpnext + - VERSION=version-15 + - FRAPPE_SITE_NAME_HEADER= + + mounts: [] \ No newline at end of file diff --git a/blueprints/evolutionapi/index.ts b/blueprints/evolutionapi/index.ts deleted file mode 100644 index 6ca7a3b..0000000 --- a/blueprints/evolutionapi/index.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateBase64, - generatePassword, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - const apiKey = generateBase64(64); - const postgresPassword = generatePassword(); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 8080, - serviceName: "evolution-api", - }, - ]; - - const envs = [ - `SERVER_URL=https://${mainDomain}`, - "AUTHENTICATION_TYPE=apikey", - `AUTHENTICATION_API_KEY=${apiKey}`, - "AUTHENTICATION_EXPOSE_IN_FETCH_INSTANCES=true", - - "LANGUAGE=en", - "CONFIG_SESSION_PHONE_CLIENT=Evolution API", - "CONFIG_SESSION_PHONE_NAME=Chrome", - "TELEMETRY=false", - "TELEMETRY_URL=", - - "POSTGRES_DATABASE=evolution", - "POSTGRES_USERNAME=postgresql", - `POSTGRES_PASSWORD=${postgresPassword}`, - "DATABASE_ENABLED=true", - "DATABASE_PROVIDER=postgresql", - `DATABASE_CONNECTION_URI=postgres://postgresql:${postgresPassword}@evolution-postgres:5432/evolution`, - "DATABASE_SAVE_DATA_INSTANCE=true", - "DATABASE_SAVE_DATA_NEW_MESSAGE=true", - "DATABASE_SAVE_MESSAGE_UPDATE=true", - "DATABASE_SAVE_DATA_CONTACTS=true", - "DATABASE_SAVE_DATA_CHATS=true", - "DATABASE_SAVE_DATA_LABELS=true", - "DATABASE_SAVE_DATA_HISTORIC=true", - - "CACHE_REDIS_ENABLED=true", - "CACHE_REDIS_URI=redis://evolution-redis:6379", - "CACHE_REDIS_PREFIX_KEY=evolution", - "CACHE_REDIS_SAVE_INSTANCES=true", - ]; - - return { - domains, - envs, - }; -} diff --git a/blueprints/evolutionapi/template.yml b/blueprints/evolutionapi/template.yml new file mode 100644 index 0000000..0230f7c --- /dev/null +++ b/blueprints/evolutionapi/template.yml @@ -0,0 +1,40 @@ +variables: + main_domain: ${randomDomain} + api_key: ${generateBase64(64)} + postgres_password: ${generatePassword} + +config: + domains: + - serviceName: evolution-api + port: 8080 + host: ${main_domain} + + env: + - SERVER_URL=https://${main_domain} + - AUTHENTICATION_TYPE=apikey + - AUTHENTICATION_API_KEY=${api_key} + - AUTHENTICATION_EXPOSE_IN_FETCH_INSTANCES=true + - LANGUAGE=en + - CONFIG_SESSION_PHONE_CLIENT=Evolution API + - CONFIG_SESSION_PHONE_NAME=Chrome + - TELEMETRY=false + - TELEMETRY_URL= + - POSTGRES_DATABASE=evolution + - POSTGRES_USERNAME=postgresql + - POSTGRES_PASSWORD=${postgres_password} + - DATABASE_ENABLED=true + - DATABASE_PROVIDER=postgresql + - DATABASE_CONNECTION_URI=postgres://postgresql:${postgres_password}@evolution-postgres:5432/evolution + - DATABASE_SAVE_DATA_INSTANCE=true + - DATABASE_SAVE_DATA_NEW_MESSAGE=true + - DATABASE_SAVE_MESSAGE_UPDATE=true + - DATABASE_SAVE_DATA_CONTACTS=true + - DATABASE_SAVE_DATA_CHATS=true + - DATABASE_SAVE_DATA_LABELS=true + - DATABASE_SAVE_DATA_HISTORIC=true + - CACHE_REDIS_ENABLED=true + - CACHE_REDIS_URI=redis://evolution-redis:6379 + - CACHE_REDIS_PREFIX_KEY=evolution + - CACHE_REDIS_SAVE_INSTANCES=true + + mounts: [] \ No newline at end of file diff --git a/blueprints/excalidraw/index.ts b/blueprints/excalidraw/index.ts deleted file mode 100644 index 7f73f39..0000000 --- a/blueprints/excalidraw/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 80, - serviceName: "excalidraw", - }, - ]; - - return { - domains, - }; -} diff --git a/blueprints/excalidraw/template.yml b/blueprints/excalidraw/template.yml new file mode 100644 index 0000000..4054cc2 --- /dev/null +++ b/blueprints/excalidraw/template.yml @@ -0,0 +1,12 @@ +variables: + main_domain: ${randomDomain} + +config: + domains: + - serviceName: excalidraw + port: 80 + host: ${main_domain} + + env: [] + + mounts: [] \ No newline at end of file diff --git a/blueprints/filebrowser/index.ts b/blueprints/filebrowser/index.ts deleted file mode 100644 index c30519f..0000000 --- a/blueprints/filebrowser/index.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 8080, - serviceName: "filebrowser", - }, - ]; - const envs = ["FB_BASEURL=/filebrowser"]; - - return { - envs, - domains, - }; -} diff --git a/blueprints/filebrowser/template.yml b/blueprints/filebrowser/template.yml new file mode 100644 index 0000000..0bbd9cf --- /dev/null +++ b/blueprints/filebrowser/template.yml @@ -0,0 +1,13 @@ +variables: + main_domain: ${randomDomain} + +config: + domains: + - serviceName: filebrowser + port: 8080 + host: ${main_domain} + + env: + - FB_BASEURL=/filebrowser + + mounts: [] \ No newline at end of file diff --git a/blueprints/formbricks/index.ts b/blueprints/formbricks/index.ts deleted file mode 100644 index fc179f4..0000000 --- a/blueprints/formbricks/index.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateBase64, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - const secretBase = generateBase64(64); - const encryptionKey = generateBase64(48); - const cronSecret = generateBase64(32); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 3000, - serviceName: "formbricks", - }, - ]; - - const envs = [ - `WEBAPP_URL=http://${mainDomain}`, - `NEXTAUTH_URL=http://${mainDomain}`, - `NEXTAUTH_SECRET=${secretBase}`, - `ENCRYPTION_KEY=${encryptionKey}`, - `CRON_SECRET=${cronSecret}`, - ]; - - const mounts: Template["mounts"] = []; - - return { - envs, - mounts, - domains, - }; -} diff --git a/blueprints/formbricks/template.yml b/blueprints/formbricks/template.yml new file mode 100644 index 0000000..b1d365f --- /dev/null +++ b/blueprints/formbricks/template.yml @@ -0,0 +1,20 @@ +variables: + main_domain: ${randomDomain} + secret_base: ${generateBase64(64)} + encryption_key: ${generateBase64(48)} + cron_secret: ${generateBase64(32)} + +config: + domains: + - serviceName: formbricks + port: 3000 + host: ${main_domain} + + env: + - WEBAPP_URL=http://${main_domain} + - NEXTAUTH_URL=http://${main_domain} + - NEXTAUTH_SECRET=${secret_base} + - ENCRYPTION_KEY=${encryption_key} + - CRON_SECRET=${cron_secret} + + mounts: [] \ No newline at end of file diff --git a/blueprints/frappe-hr/index.ts b/blueprints/frappe-hr/index.ts deleted file mode 100644 index 1e6b947..0000000 --- a/blueprints/frappe-hr/index.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generatePassword, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const dbRootPassword = generatePassword(32); - const adminPassword = generatePassword(32); - const mainDomain = generateRandomDomain(schema); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 8080, - serviceName: "frontend", - }, - ]; - - const envs = [ - `SITE_NAME=${mainDomain}`, - `ADMIN_PASSWORD=${adminPassword}`, - `DB_ROOT_PASSWORD=${dbRootPassword}`, - "MIGRATE=1", - "ENABLE_DB=1", - "DB_HOST=db", - "CREATE_SITE=1", - "CONFIGURE=1", - "REGENERATE_APPS_TXT=1", - "INSTALL_APP_ARGS=--install-app hrms", - "IMAGE_NAME=ghcr.io/frappe/hrms", - "VERSION=version-15", - "FRAPPE_SITE_NAME_HEADER=", - ]; - - return { envs, domains }; -} diff --git a/blueprints/frappe-hr/template.yml b/blueprints/frappe-hr/template.yml new file mode 100644 index 0000000..a0262d2 --- /dev/null +++ b/blueprints/frappe-hr/template.yml @@ -0,0 +1,27 @@ +variables: + main_domain: ${randomDomain} + db_root_password: ${generatePassword(32)} + admin_password: ${generatePassword(32)} + +config: + domains: + - serviceName: frontend + port: 8080 + host: ${main_domain} + + env: + - SITE_NAME=${main_domain} + - ADMIN_PASSWORD=${admin_password} + - DB_ROOT_PASSWORD=${db_root_password} + - MIGRATE=1 + - ENABLE_DB=1 + - DB_HOST=db + - CREATE_SITE=1 + - CONFIGURE=1 + - REGENERATE_APPS_TXT=1 + - INSTALL_APP_ARGS=--install-app hrms + - IMAGE_NAME=ghcr.io/frappe/hrms + - VERSION=version-15 + - FRAPPE_SITE_NAME_HEADER= + + mounts: [] \ No newline at end of file diff --git a/blueprints/ghost/index.ts b/blueprints/ghost/index.ts deleted file mode 100644 index 052b7c6..0000000 --- a/blueprints/ghost/index.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 2368, - serviceName: "ghost", - }, - ]; - const envs = [`GHOST_HOST=${mainDomain}`]; - - return { - envs, - domains, - }; -} diff --git a/blueprints/ghost/template.yml b/blueprints/ghost/template.yml new file mode 100644 index 0000000..1e7eee1 --- /dev/null +++ b/blueprints/ghost/template.yml @@ -0,0 +1,13 @@ +variables: + main_domain: ${randomDomain} + +config: + domains: + - serviceName: ghost + port: 2368 + host: ${main_domain} + + env: + - GHOST_HOST=${main_domain} + + mounts: [] \ No newline at end of file diff --git a/blueprints/gitea/index.ts b/blueprints/gitea/index.ts deleted file mode 100644 index 92a20df..0000000 --- a/blueprints/gitea/index.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 3000, - serviceName: "gitea", - }, - ]; - const envs = ["USER_UID=1000", "USER_GID=1000"]; - - return { - envs, - domains, - }; -} diff --git a/blueprints/gitea/template.yml b/blueprints/gitea/template.yml new file mode 100644 index 0000000..dd34509 --- /dev/null +++ b/blueprints/gitea/template.yml @@ -0,0 +1,14 @@ +variables: + main_domain: ${randomDomain} + +config: + domains: + - serviceName: gitea + port: 3000 + host: ${main_domain} + + env: + - USER_UID=1000 + - USER_GID=1000 + + mounts: [] \ No newline at end of file diff --git a/blueprints/glance/index.ts b/blueprints/glance/index.ts deleted file mode 100644 index a0ab1b6..0000000 --- a/blueprints/glance/index.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 8080, - serviceName: "glance", - }, - ]; - - const mounts: Template["mounts"] = [ - { - filePath: "/app/config/glance.yml", - content: ` -branding: - hide-footer: true - logo-text: P - -pages: - - name: Home - columns: - - size: small - widgets: - - type: calendar - - - type: releases - show-source-icon: true - repositories: - - Dokploy/dokploy - - n8n-io/n8n - - Budibase/budibase - - home-assistant/core - - tidbyt/pixlet - - - type: twitch-channels - channels: - - nmplol - - extraemily - - qtcinderella - - ludwig - - timthetatman - - mizkif - - - size: full - widgets: - - type: hacker-news - - - type: videos - style: grid-cards - channels: - - UC3GzdWYwUYI1ACxuP9Nm-eg - - UCGbg3DjQdcqWwqOLHpYHXIg - - UC24RSoLcjiNZbQcT54j5l7Q - limit: 3 - - - type: rss - limit: 10 - collapse-after: 3 - cache: 3h - feeds: - - url: https://daringfireball.net/feeds/main - title: Daring Fireball - - - size: small - widgets: - - type: weather - location: Gansevoort, New York, United States - show-area-name: false - units: imperial - hour-format: 12h - - - type: markets - markets: - - symbol: SPY - name: S&P 500 - - symbol: VOO - name: Vanguard - - symbol: BTC-USD - name: Bitcoin - - symbol: ETH-USD - name: Etherium - - symbol: NVDA - name: NVIDIA - - symbol: AAPL - name: Apple - - symbol: MSFT - name: Microsoft - - symbol: GOOGL - name: Google - - symbol: AMD - name: AMD - - symbol: TSLA - name: Tesla`, - }, - ]; - - return { - domains, - mounts, - }; -} diff --git a/blueprints/glance/template.yml b/blueprints/glance/template.yml new file mode 100644 index 0000000..de83acd --- /dev/null +++ b/blueprints/glance/template.yml @@ -0,0 +1,93 @@ +variables: + main_domain: ${randomDomain} + +config: + domains: + - serviceName: glance + port: 8080 + host: ${main_domain} + + env: [] + + mounts: + - filePath: /app/config/glance.yml + content: | + branding: + hide-footer: true + logo-text: P + + pages: + - name: Home + columns: + - size: small + widgets: + - type: calendar + + - type: releases + show-source-icon: true + repositories: + - Dokploy/dokploy + - n8n-io/n8n + - Budibase/budibase + - home-assistant/core + - tidbyt/pixlet + + - type: twitch-channels + channels: + - nmplol + - extraemily + - qtcinderella + - ludwig + - timthetatman + - mizkif + + - size: full + widgets: + - type: hacker-news + + - type: videos + style: grid-cards + channels: + - UC3GzdWYwUYI1ACxuP9Nm-eg + - UCGbg3DjQdcqWwqOLHpYHXIg + - UC24RSoLcjiNZbQcT54j5l7Q + limit: 3 + + - type: rss + limit: 10 + collapse-after: 3 + cache: 3h + feeds: + - url: https://daringfireball.net/feeds/main + title: Daring Fireball + + - size: small + widgets: + - type: weather + location: Gansevoort, New York, United States + show-area-name: false + units: imperial + hour-format: 12h + + - type: markets + markets: + - symbol: SPY + name: S&P 500 + - symbol: VOO + name: Vanguard + - symbol: BTC-USD + name: Bitcoin + - symbol: ETH-USD + name: Etherium + - symbol: NVDA + name: NVIDIA + - symbol: AAPL + name: Apple + - symbol: MSFT + name: Microsoft + - symbol: GOOGL + name: Google + - symbol: AMD + name: AMD + - symbol: TSLA + name: Tesla \ No newline at end of file diff --git a/blueprints/glitchtip/index.ts b/blueprints/glitchtip/index.ts deleted file mode 100644 index 093d752..0000000 --- a/blueprints/glitchtip/index.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateBase64, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - const secretKey = generateBase64(32); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 8000, - serviceName: "web", - }, - ]; - const envs = [ - `GLITCHTIP_HOST=${mainDomain}`, - "GLITCHTIP_PORT=8000", - `SECRET_KEY=${secretKey}`, - ]; - - return { - envs, - domains, - }; -} diff --git a/blueprints/glitchtip/template.yml b/blueprints/glitchtip/template.yml new file mode 100644 index 0000000..6cb5f86 --- /dev/null +++ b/blueprints/glitchtip/template.yml @@ -0,0 +1,16 @@ +variables: + main_domain: ${randomDomain} + secret_key: ${generateBase64(32)} + +config: + domains: + - serviceName: web + port: 8000 + host: ${main_domain} + + env: + - GLITCHTIP_HOST=${main_domain} + - GLITCHTIP_PORT=8000 + - SECRET_KEY=${secret_key} + + mounts: [] \ No newline at end of file diff --git a/blueprints/glpi/index.ts b/blueprints/glpi/index.ts deleted file mode 100644 index 48695fb..0000000 --- a/blueprints/glpi/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const randomDomain = generateRandomDomain(schema); - const domains: DomainSchema[] = [ - { - host: randomDomain, - port: 80, - serviceName: "glpi-web", - }, - ]; - return { - domains, - }; -} diff --git a/blueprints/glpi/template.yml b/blueprints/glpi/template.yml new file mode 100644 index 0000000..9015454 --- /dev/null +++ b/blueprints/glpi/template.yml @@ -0,0 +1,12 @@ +variables: + main_domain: ${randomDomain} + +config: + domains: + - serviceName: glpi-web + port: 80 + host: ${main_domain} + + env: [] + + mounts: [] \ No newline at end of file diff --git a/blueprints/gotenberg/index.ts b/blueprints/gotenberg/index.ts deleted file mode 100644 index ef48703..0000000 --- a/blueprints/gotenberg/index.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const username = "gotenberg"; - const password = "changethis"; - - const domains: DomainSchema[] = [ - { - host: generateRandomDomain(schema), - port: 3000, - serviceName: "gotenberg", - }, - ]; - - const envs = [ - `GOTENBERG_API_BASIC_AUTH_USERNAME=${username}`, - `GOTENBERG_API_BASIC_AUTH_PASSWORD=${password}`, - ]; - - return { - envs, - domains, - }; -} diff --git a/blueprints/gotenberg/template.yml b/blueprints/gotenberg/template.yml new file mode 100644 index 0000000..30ac86f --- /dev/null +++ b/blueprints/gotenberg/template.yml @@ -0,0 +1,16 @@ +variables: + main_domain: ${randomDomain} + username: gotenberg + password: changethis + +config: + domains: + - serviceName: gotenberg + port: 3000 + host: ${main_domain} + + env: + - GOTENBERG_API_BASIC_AUTH_USERNAME=${username} + - GOTENBERG_API_BASIC_AUTH_PASSWORD=${password} + + mounts: [] \ No newline at end of file diff --git a/blueprints/grafana/index.ts b/blueprints/grafana/index.ts deleted file mode 100644 index fb614ef..0000000 --- a/blueprints/grafana/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const domains: DomainSchema[] = [ - { - host: generateRandomDomain(schema), - port: 3000, - serviceName: "grafana", - }, - ]; - return { - domains, - }; -} diff --git a/blueprints/grafana/template.yml b/blueprints/grafana/template.yml new file mode 100644 index 0000000..4c53c27 --- /dev/null +++ b/blueprints/grafana/template.yml @@ -0,0 +1,12 @@ +variables: + main_domain: ${randomDomain} + +config: + domains: + - serviceName: grafana + port: 3000 + host: ${main_domain} + + env: [] + + mounts: [] \ No newline at end of file diff --git a/blueprints/heyform/index.ts b/blueprints/heyform/index.ts deleted file mode 100644 index 03ea4b9..0000000 --- a/blueprints/heyform/index.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateBase64, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - const sessionKey = generateBase64(64); - const formEncryptionKey = generateBase64(64); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 8000, - serviceName: "heyform", - }, - ]; - - const envs = [ - `APP_HOMEPAGE_URL=http://${mainDomain}`, - `SESSION_KEY=${sessionKey}`, - `FORM_ENCRYPTION_KEY=${formEncryptionKey}`, - ]; - - return { - envs, - domains, - }; -} diff --git a/blueprints/heyform/template.yml b/blueprints/heyform/template.yml new file mode 100644 index 0000000..f2f9632 --- /dev/null +++ b/blueprints/heyform/template.yml @@ -0,0 +1,17 @@ +variables: + main_domain: ${randomDomain} + session_key: ${generateBase64(64)} + form_encryption_key: ${generateBase64(64)} + +config: + domains: + - serviceName: heyform + port: 8000 + host: ${main_domain} + + env: + - APP_HOMEPAGE_URL=http://${main_domain} + - SESSION_KEY=${session_key} + - FORM_ENCRYPTION_KEY=${form_encryption_key} + + mounts: [] \ No newline at end of file diff --git a/blueprints/hi-events/index.ts b/blueprints/hi-events/index.ts deleted file mode 100644 index f799bb7..0000000 --- a/blueprints/hi-events/index.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const domains: DomainSchema[] = [ - { - host: generateRandomDomain(schema), - port: 80, - serviceName: "all-in-one", - }, - ]; - - const envs = [ - "# change domain here", - "DOMAIN=my-events.com", - "", - "POSTGRES_DB=hievents", - "POSTGRES_USER=hievents", - "POSTGRES_PASSWORD=VERY_STRONG_PASSWORD", - "", - "VITE_STRIPE_PUBLISHABLE_KEY=", - "", - "APP_KEY=my-app-key", - "JWT_SECRET=STRONG_JWT_SECRET", - "", - "MAIL_MAILER=", - "MAIL_HOST=", - "MAIL_PORT=", - "MAIL_FROM_ADDRESS=", - "MAIL_FROM_NAME=", - ]; - - return { - domains, - envs, - }; -} diff --git a/blueprints/hi-events/template.yml b/blueprints/hi-events/template.yml new file mode 100644 index 0000000..cde43d0 --- /dev/null +++ b/blueprints/hi-events/template.yml @@ -0,0 +1,27 @@ +variables: + main_domain: ${randomDomain} + postgres_password: ${generatePassword} + jwt_secret: ${generatePassword} + app_key: ${generatePassword} + +config: + domains: + - serviceName: all-in-one + port: 80 + host: ${main_domain} + + env: + - DOMAIN=${main_domain} + - POSTGRES_DB=hievents + - POSTGRES_USER=hievents + - POSTGRES_PASSWORD=${postgres_password} + - VITE_STRIPE_PUBLISHABLE_KEY= + - APP_KEY=${app_key} + - JWT_SECRET=${jwt_secret} + - MAIL_MAILER= + - MAIL_HOST= + - MAIL_PORT= + - MAIL_FROM_ADDRESS= + - MAIL_FROM_NAME= + + mounts: [] \ No newline at end of file diff --git a/blueprints/hoarder/index.ts b/blueprints/hoarder/index.ts deleted file mode 100644 index d1c656e..0000000 --- a/blueprints/hoarder/index.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateBase64, - generatePassword, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - const postgresPassword = generatePassword(); - const nextSecret = generateBase64(32); - const meiliMasterKey = generateBase64(32); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 3000, - serviceName: "web", - }, - ]; - - const envs = [ - `NEXTAUTH_SECRET=${nextSecret}`, - `MEILI_MASTER_KEY=${meiliMasterKey}`, - `NEXTAUTH_URL=http://${mainDomain}`, - ]; - - return { - domains, - envs, - }; -} diff --git a/blueprints/hoarder/template.yml b/blueprints/hoarder/template.yml new file mode 100644 index 0000000..59ae342 --- /dev/null +++ b/blueprints/hoarder/template.yml @@ -0,0 +1,18 @@ +variables: + main_domain: ${randomDomain} + postgres_password: ${generatePassword} + next_secret: ${generateBase64(32)} + meili_master_key: ${generateBase64(32)} + +config: + domains: + - serviceName: web + port: 3000 + host: ${main_domain} + + env: + - NEXTAUTH_SECRET=${next_secret} + - MEILI_MASTER_KEY=${meili_master_key} + - NEXTAUTH_URL=http://${main_domain} + + mounts: [] \ No newline at end of file diff --git a/blueprints/homarr/index.ts b/blueprints/homarr/index.ts deleted file mode 100644 index eb5a9f8..0000000 --- a/blueprints/homarr/index.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generatePassword, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - const secretKey = generatePassword(64); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 7575, - serviceName: "homarr", - }, - ]; - - const envs = [`SECRET_ENCRYPTION_KEY=${secretKey}`]; - - return { - domains, - envs, - }; -} diff --git a/blueprints/homarr/template.yml b/blueprints/homarr/template.yml new file mode 100644 index 0000000..cea4948 --- /dev/null +++ b/blueprints/homarr/template.yml @@ -0,0 +1,14 @@ +variables: + main_domain: ${randomDomain} + secret_key: ${generatePassword(64)} + +config: + domains: + - serviceName: homarr + port: 7575 + host: ${main_domain} + + env: + - SECRET_ENCRYPTION_KEY=${secret_key} + + mounts: [] \ No newline at end of file diff --git a/blueprints/huly/index.ts b/blueprints/huly/index.ts deleted file mode 100644 index 3157ed5..0000000 --- a/blueprints/huly/index.ts +++ /dev/null @@ -1,152 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateBase64, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - const hulySecret = generateBase64(64); - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 80, - serviceName: "nginx", - }, - ]; - - const envs = [ - "HULY_VERSION=v0.6.377", - "DOCKER_NAME=huly", - "", - "# The address of the host or server from which you will access your Huly instance.", - "# This can be a domain name (e.g., huly.example.com) or an IP address (e.g., 192.168.1.1).", - `HOST_ADDRESS=${mainDomain}`, - "", - "# Set this variable to 'true' to enable SSL (HTTPS/WSS). ", - "# Leave it empty to use non-SSL (HTTP/WS).", - "SECURE=", - "", - "# Specify the IP address to bind to; leave blank to bind to all interfaces (0.0.0.0).", - "# Do not use IP:PORT format in HTTP_BIND or HTTP_PORT.", - "HTTP_PORT=80", - "HTTP_BIND=", - "", - "# Huly specific variables", - "TITLE=Huly", - "DEFAULT_LANGUAGE=en", - "LAST_NAME_FIRST=true", - "", - "# The following configs are auto-generated by the setup script. ", - "# Please do not manually overwrite.", - "", - "# Run with --secret to regenerate.", - `SECRET=${hulySecret}`, - ]; - - const mounts: Template["mounts"] = [ - { - filePath: "/volumes/nginx/.huly.nginx", - content: `server { - listen 80; - server_name _; - location / { - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_pass http://front:8080; - } - - location /_accounts { - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - - rewrite ^/_accounts(/.*)$ $1 break; - proxy_pass http://account:3000/; - } - - #location /_love { - # proxy_set_header Host $host; - # proxy_set_header X-Real-IP $remote_addr; - # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - # proxy_set_header X-Forwarded-Proto $scheme; - - # proxy_http_version 1.1; - # proxy_set_header Upgrade $http_upgrade; - # proxy_set_header Connection "upgrade"; - # rewrite ^/_love(/.*)$ $1 break; - # proxy_pass http://love:8096/; - #} - - location /_collaborator { - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - rewrite ^/_collaborator(/.*)$ $1 break; - proxy_pass http://collaborator:3078/; - } - - location /_transactor { - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - rewrite ^/_transactor(/.*)$ $1 break; - proxy_pass http://transactor:3333/; - } - - location ~ ^/eyJ { - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_pass http://transactor:3333; - } - - location /_rekoni { - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - - rewrite ^/_rekoni(/.*)$ $1 break; - proxy_pass http://rekoni:4004/; - } - - location /_stats { - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - - rewrite ^/_stats(/.*)$ $1 break; - proxy_pass http://stats:4900/; - } -}`, - }, - ]; - - return { - domains, - envs, - mounts, - }; -} diff --git a/blueprints/huly/template.yml b/blueprints/huly/template.yml new file mode 100644 index 0000000..6002533 --- /dev/null +++ b/blueprints/huly/template.yml @@ -0,0 +1,104 @@ +variables: + main_domain: ${randomDomain} + huly_secret: ${generateBase64(64)} + +config: + domains: + - serviceName: nginx + port: 80 + host: ${main_domain} + + env: + - HULY_VERSION=v0.6.377 + - DOCKER_NAME=huly + - HOST_ADDRESS=${main_domain} + - SECURE= + - HTTP_PORT=80 + - HTTP_BIND= + - TITLE=Huly + - DEFAULT_LANGUAGE=en + - LAST_NAME_FIRST=true + - SECRET=${huly_secret} + + mounts: + - filePath: /volumes/nginx/.huly.nginx + content: | + server { + listen 80; + server_name _; + location / { + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_pass http://front:8080; + } + + location /_accounts { + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + + rewrite ^/_accounts(/.*)$ $1 break; + proxy_pass http://account:3000/; + } + + location /_collaborator { + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + rewrite ^/_collaborator(/.*)$ $1 break; + proxy_pass http://collaborator:3078/; + } + + location /_transactor { + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + rewrite ^/_transactor(/.*)$ $1 break; + proxy_pass http://transactor:3333/; + } + + location ~ ^/eyJ { + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_pass http://transactor:3333; + } + + location /_rekoni { + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + + rewrite ^/_rekoni(/.*)$ $1 break; + proxy_pass http://rekoni:4004/; + } + + location /_stats { + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + + rewrite ^/_stats(/.*)$ $1 break; + proxy_pass http://stats:4900/; + } + } \ No newline at end of file diff --git a/blueprints/immich/index.ts b/blueprints/immich/index.ts deleted file mode 100644 index 4beca87..0000000 --- a/blueprints/immich/index.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateBase64, - generatePassword, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - const dbPassword = generatePassword(); - const dbUser = "immich"; - const _appSecret = generateBase64(32); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 2283, - serviceName: "immich-server", - }, - ]; - - const envs = [ - `IMMICH_HOST=${mainDomain}`, - `SERVER_URL=https://${mainDomain}`, - `FRONT_BASE_URL=https://${mainDomain}`, - "# Database Configuration", - "DB_HOSTNAME=immich-database", - "DB_PORT=5432", - `DB_USERNAME=${dbUser}`, - `DB_PASSWORD=${dbPassword}`, - "DB_DATABASE_NAME=immich", - "# Redis Configuration", - "REDIS_HOSTNAME=immich-redis", - "REDIS_PORT=6379", - "REDIS_DBINDEX=0", - "# Server Configuration", - "TZ=UTC", - ]; - - return { - domains, - envs, - }; -} diff --git a/blueprints/immich/template.yml b/blueprints/immich/template.yml new file mode 100644 index 0000000..cff15a7 --- /dev/null +++ b/blueprints/immich/template.yml @@ -0,0 +1,26 @@ +variables: + main_domain: ${randomDomain} + db_password: ${generatePassword} + db_user: immich + +config: + domains: + - serviceName: immich-server + port: 2283 + host: ${main_domain} + + env: + - IMMICH_HOST=${main_domain} + - SERVER_URL=https://${main_domain} + - FRONT_BASE_URL=https://${main_domain} + - DB_HOSTNAME=immich-database + - DB_PORT=5432 + - DB_USERNAME=${db_user} + - DB_PASSWORD=${db_password} + - DB_DATABASE_NAME=immich + - REDIS_HOSTNAME=immich-redis + - REDIS_PORT=6379 + - REDIS_DBINDEX=0 + - TZ=UTC + + mounts: [] \ No newline at end of file diff --git a/blueprints/infisical/index.ts b/blueprints/infisical/index.ts deleted file mode 100644 index 6d21277..0000000 --- a/blueprints/infisical/index.ts +++ /dev/null @@ -1,93 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const domains: DomainSchema[] = [ - { - host: generateRandomDomain(schema), - port: 8080, - serviceName: "backend", - }, - ]; - - const envs = [ - "# THIS IS A SAMPLE ENCRYPTION KEY AND SHOULD NEVER BE USED FOR PRODUCTION", - "ENCRYPTION_KEY=6c1fe4e407b8911c104518103505b218", - "", - "# THIS IS A SAMPLE AUTH_SECRET KEY AND SHOULD NEVER BE USED FOR PRODUCTION", - "AUTH_SECRET=5lrMXKKWCVocS/uerPsl7V+TX/aaUaI7iDkgl3tSmLE=", - "# Postgres creds", - "POSTGRES_PASSWORD=infisical", - "POSTGRES_USER=infisical", - "POSTGRES_DB=infisical", - "", - "# Website URL", - "# Required", - "SITE_URL=http://localhost:8080", - "", - "# Mail/SMTP", - "SMTP_HOST=", - "SMTP_PORT=", - "SMTP_NAME=", - "SMTP_USERNAME=", - "SMTP_PASSWORD=", - "", - "# Integration", - "# Optional only if integration is used", - "CLIENT_ID_HEROKU=", - "CLIENT_ID_VERCEL=", - "CLIENT_ID_NETLIFY=", - "CLIENT_ID_GITHUB=", - "CLIENT_ID_GITHUB_APP=", - "CLIENT_SLUG_GITHUB_APP=", - "CLIENT_ID_GITLAB=", - "CLIENT_ID_BITBUCKET=", - "CLIENT_SECRET_HEROKU=", - "CLIENT_SECRET_VERCEL=", - "CLIENT_SECRET_NETLIFY=", - "CLIENT_SECRET_GITHUB=", - "CLIENT_SECRET_GITHUB_APP=", - "CLIENT_SECRET_GITLAB=", - "CLIENT_SECRET_BITBUCKET=", - "CLIENT_SLUG_VERCEL=", - "", - "CLIENT_PRIVATE_KEY_GITHUB_APP=", - "CLIENT_APP_ID_GITHUB_APP=", - "", - "# Sentry (optional) for monitoring errors", - "SENTRY_DSN=", - "", - "# Infisical Cloud-specific configs", - "# Ignore - Not applicable for self-hosted version", - "POSTHOG_HOST=", - "POSTHOG_PROJECT_API_KEY=", - "", - "# SSO-specific variables", - "CLIENT_ID_GOOGLE_LOGIN=", - "CLIENT_SECRET_GOOGLE_LOGIN=", - "", - "CLIENT_ID_GITHUB_LOGIN=", - "CLIENT_SECRET_GITHUB_LOGIN=", - "", - "CLIENT_ID_GITLAB_LOGIN=", - "CLIENT_SECRET_GITLAB_LOGIN=", - "", - "CAPTCHA_SECRET=", - "", - "NEXT_PUBLIC_CAPTCHA_SITE_KEY=", - "", - "PLAIN_API_KEY=", - "PLAIN_WISH_LABEL_IDS=", - "", - "SSL_CLIENT_CERTIFICATE_HEADER_KEY=", - ]; - - return { - domains, - envs, - }; -} diff --git a/blueprints/infisical/template.yml b/blueprints/infisical/template.yml new file mode 100644 index 0000000..b6ffda3 --- /dev/null +++ b/blueprints/infisical/template.yml @@ -0,0 +1,58 @@ +variables: + main_domain: ${randomDomain} + postgres_password: ${generatePassword} + postgres_user: infisical + postgres_db: infisical + +config: + domains: + - serviceName: backend + port: 8080 + host: ${main_domain} + + env: + - ENCRYPTION_KEY=6c1fe4e407b8911c104518103505b218 # Sample key, not for production + - AUTH_SECRET=5lrMXKKWCVocS/uerPsl7V+TX/aaUaI7iDkgl3tSmLE= # Sample key, not for production + - POSTGRES_PASSWORD=${postgres_password} + - POSTGRES_USER=${postgres_user} + - POSTGRES_DB=${postgres_db} + - SITE_URL=http://${main_domain}:8080 + - SMTP_HOST= + - SMTP_PORT= + - SMTP_NAME= + - SMTP_USERNAME= + - SMTP_PASSWORD= + - CLIENT_ID_HEROKU= + - CLIENT_ID_VERCEL= + - CLIENT_ID_NETLIFY= + - CLIENT_ID_GITHUB= + - CLIENT_ID_GITHUB_APP= + - CLIENT_SLUG_GITHUB_APP= + - CLIENT_ID_GITLAB= + - CLIENT_ID_BITBUCKET= + - CLIENT_SECRET_HEROKU= + - CLIENT_SECRET_VERCEL= + - CLIENT_SECRET_NETLIFY= + - CLIENT_SECRET_GITHUB= + - CLIENT_SECRET_GITHUB_APP= + - CLIENT_SECRET_GITLAB= + - CLIENT_SECRET_BITBUCKET= + - CLIENT_SLUG_VERCEL= + - CLIENT_PRIVATE_KEY_GITHUB_APP= + - CLIENT_APP_ID_GITHUB_APP= + - SENTRY_DSN= + - POSTHOG_HOST= + - POSTHOG_PROJECT_API_KEY= + - CLIENT_ID_GOOGLE_LOGIN= + - CLIENT_SECRET_GOOGLE_LOGIN= + - CLIENT_ID_GITHUB_LOGIN= + - CLIENT_SECRET_GITHUB_LOGIN= + - CLIENT_ID_GITLAB_LOGIN= + - CLIENT_SECRET_GITLAB_LOGIN= + - CAPTCHA_SECRET= + - NEXT_PUBLIC_CAPTCHA_SITE_KEY= + - PLAIN_API_KEY= + - PLAIN_WISH_LABEL_IDS= + - SSL_CLIENT_CERTIFICATE_HEADER_KEY= + + mounts: [] \ No newline at end of file diff --git a/blueprints/influxdb/index.ts b/blueprints/influxdb/index.ts deleted file mode 100644 index 550b680..0000000 --- a/blueprints/influxdb/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const domains: DomainSchema[] = [ - { - host: generateRandomDomain(schema), - port: 8086, - serviceName: "influxdb", - }, - ]; - return { - domains, - }; -} diff --git a/blueprints/influxdb/template.yml b/blueprints/influxdb/template.yml new file mode 100644 index 0000000..1ec6731 --- /dev/null +++ b/blueprints/influxdb/template.yml @@ -0,0 +1,12 @@ +variables: + main_domain: ${randomDomain} + +config: + domains: + - serviceName: influxdb + port: 8086 + host: ${main_domain} + + env: {} + + mounts: [] \ No newline at end of file diff --git a/blueprints/invoiceshelf/index.ts b/blueprints/invoiceshelf/index.ts deleted file mode 100644 index a83ebf0..0000000 --- a/blueprints/invoiceshelf/index.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generatePassword, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - const dbPassword = generatePassword(); - const dbUsername = "invoiceshelf"; - const dbDatabase = "invoiceshelf"; - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 80, - serviceName: "invoiceshelf-app", - }, - ]; - - const envs = [ - `INVOICESHELF_HOST=${mainDomain}`, - `DB_PASSWORD=${dbPassword}`, - `DB_USERNAME=${dbUsername}`, - `DB_DATABASE=${dbDatabase}`, - ]; - - return { - domains, - envs, - }; -} diff --git a/blueprints/invoiceshelf/template.yml b/blueprints/invoiceshelf/template.yml new file mode 100644 index 0000000..8cbd8a0 --- /dev/null +++ b/blueprints/invoiceshelf/template.yml @@ -0,0 +1,19 @@ +variables: + main_domain: ${randomDomain} + db_password: ${generatePassword()} + db_username: "invoiceshelf" + db_database: "invoiceshelf" + +config: + domains: + - serviceName: invoiceshelf-app + port: 80 + host: ${main_domain} + + env: + INVOICESHELF_HOST: ${main_domain} + DB_PASSWORD: ${db_password} + DB_USERNAME: ${db_username} + DB_DATABASE: ${db_database} + + mounts: [] \ No newline at end of file diff --git a/blueprints/it-tools/index.ts b/blueprints/it-tools/index.ts deleted file mode 100644 index 9912c4b..0000000 --- a/blueprints/it-tools/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const domains: DomainSchema[] = [ - { - host: generateRandomDomain(schema), - port: 80, - serviceName: "it-tools", - }, - ]; - - return { - domains, - }; -} diff --git a/blueprints/it-tools/template.yml b/blueprints/it-tools/template.yml new file mode 100644 index 0000000..5ec01dc --- /dev/null +++ b/blueprints/it-tools/template.yml @@ -0,0 +1,12 @@ +variables: + main_domain: ${randomDomain} + +config: + domains: + - serviceName: it-tools + port: 80 + host: ${main_domain} + + env: {} + + mounts: [] \ No newline at end of file diff --git a/blueprints/jellyfin/index.ts b/blueprints/jellyfin/index.ts deleted file mode 100644 index 61c9c9b..0000000 --- a/blueprints/jellyfin/index.ts +++ /dev/null @@ -1,25 +0,0 @@ -// EXAMPLE -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const domain = generateRandomDomain(schema); - const domains: DomainSchema[] = [ - { - host: domain, - port: 8096, - serviceName: "jellyfin", - }, - ]; - - const envs = [`JELLYFIN_HOST=${domain}`]; - - return { - envs, - domains, - }; -} diff --git a/blueprints/jellyfin/template.yml b/blueprints/jellyfin/template.yml new file mode 100644 index 0000000..06e3cb7 --- /dev/null +++ b/blueprints/jellyfin/template.yml @@ -0,0 +1,13 @@ +variables: + main_domain: ${randomDomain} + +config: + domains: + - serviceName: jellyfin + port: 8096 + host: ${main_domain} + + env: + JELLYFIN_HOST: ${main_domain} + + mounts: [] \ No newline at end of file diff --git a/blueprints/kimai/index.ts b/blueprints/kimai/index.ts deleted file mode 100644 index 5569905..0000000 --- a/blueprints/kimai/index.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generatePassword, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const domain = generateRandomDomain(schema); - const domains: DomainSchema[] = [ - { - host: domain, - port: 8001, - serviceName: "app", - }, - ]; - - const adminPassword = generatePassword(32); - const mysqlPassword = generatePassword(32); - const mysqlRootPassword = generatePassword(32); - const appSecret = generatePassword(32); - - const envs = [ - `KI_HOST=${domain}`, - "KI_ADMINMAIL=admin@kimai.local", - `KI_ADMINPASS=${adminPassword}`, - `KI_MYSQL_ROOT_PASSWORD=${mysqlRootPassword}`, - `KI_MYSQL_PASSWORD=${mysqlPassword}`, - `KI_APP_SECRET=${appSecret}`, - ]; - - return { - envs, - domains, - }; -} diff --git a/blueprints/kimai/template.yml b/blueprints/kimai/template.yml new file mode 100644 index 0000000..4e64dc7 --- /dev/null +++ b/blueprints/kimai/template.yml @@ -0,0 +1,22 @@ +variables: + main_domain: ${randomDomain} + admin_password: ${generatePassword(32)} + mysql_password: ${generatePassword(32)} + mysql_root_password: ${generatePassword(32)} + app_secret: ${generatePassword(32)} + +config: + domains: + - serviceName: app + port: 8001 + host: ${main_domain} + + env: + KI_HOST: ${main_domain} + KI_ADMINMAIL: "admin@kimai.local" + KI_ADMINPASS: ${admin_password} + KI_MYSQL_ROOT_PASSWORD: ${mysql_root_password} + KI_MYSQL_PASSWORD: ${mysql_password} + KI_APP_SECRET: ${app_secret} + + mounts: [] \ No newline at end of file diff --git a/blueprints/langflow/index.ts b/blueprints/langflow/index.ts deleted file mode 100644 index 75f6db5..0000000 --- a/blueprints/langflow/index.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generatePassword, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - const dbPassword = generatePassword(); - const dbUsername = "langflow"; - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 7860, - serviceName: "langflow", - }, - ]; - - const envs = [`DB_PASSWORD=${dbPassword}`, `DB_USERNAME=${dbUsername}`]; - - return { - domains, - envs, - }; -} diff --git a/blueprints/langflow/template.yml b/blueprints/langflow/template.yml new file mode 100644 index 0000000..556e1a2 --- /dev/null +++ b/blueprints/langflow/template.yml @@ -0,0 +1,16 @@ +variables: + main_domain: ${randomDomain} + db_password: ${generatePassword()} + db_username: "langflow" + +config: + domains: + - serviceName: langflow + port: 7860 + host: ${main_domain} + + env: + DB_PASSWORD: ${db_password} + DB_USERNAME: ${db_username} + + mounts: [] \ No newline at end of file diff --git a/blueprints/linkwarden/index.ts b/blueprints/linkwarden/index.ts deleted file mode 100644 index 8602503..0000000 --- a/blueprints/linkwarden/index.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateBase64, - generatePassword, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - const postgresPassword = generatePassword(); - const nextSecret = generateBase64(32); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 3000, - serviceName: "linkwarden", - }, - ]; - - const envs = [ - `POSTGRES_PASSWORD=${postgresPassword}`, - `NEXTAUTH_SECRET=${nextSecret}`, - `NEXTAUTH_URL=http://${mainDomain}/api/v1/auth`, - ]; - - return { - domains, - envs, - }; -} diff --git a/blueprints/linkwarden/template.yml b/blueprints/linkwarden/template.yml new file mode 100644 index 0000000..6ca3d60 --- /dev/null +++ b/blueprints/linkwarden/template.yml @@ -0,0 +1,17 @@ +variables: + main_domain: ${randomDomain} + postgres_password: ${generatePassword()} + next_secret: ${generateBase64(32)} + +config: + domains: + - serviceName: linkwarden + port: 3000 + host: ${main_domain} + + env: + POSTGRES_PASSWORD: ${postgres_password} + NEXTAUTH_SECRET: ${next_secret} + NEXTAUTH_URL: http://${main_domain}/api/v1/auth + + mounts: [] \ No newline at end of file diff --git a/blueprints/listmonk/index.ts b/blueprints/listmonk/index.ts deleted file mode 100644 index 2a25efc..0000000 --- a/blueprints/listmonk/index.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const randomDomain = generateRandomDomain(schema); - - const domains: DomainSchema[] = [ - { - host: randomDomain, - port: 9000, - serviceName: "app", - }, - ]; - - const envs = [ - "# visit the page to setup your super admin user", - "# check config.toml in Advanced / Volumes for more options", - ]; - - const mounts: Template["mounts"] = [ - { - filePath: "config.toml", - content: `[app] -address = "0.0.0.0:9000" - -[db] -host = "db" -port = 5432 -user = "listmonk" -password = "listmonk" -database = "listmonk" - -ssl_mode = "disable" -max_open = 25 -max_idle = 25 -max_lifetime = "300s" - -params = "" -`, - }, - ]; - - return { - envs, - mounts, - domains, - }; -} diff --git a/blueprints/listmonk/template.yml b/blueprints/listmonk/template.yml new file mode 100644 index 0000000..9cbed47 --- /dev/null +++ b/blueprints/listmonk/template.yml @@ -0,0 +1,32 @@ +variables: + main_domain: ${randomDomain} + +config: + domains: + - serviceName: app + port: 9000 + host: ${main_domain} + + env: + # visit the page to setup your super admin user + # check config.toml in Advanced / Volumes for more options + + mounts: + - filePath: config.toml + content: | + [app] + address = "0.0.0.0:9000" + + [db] + host = "db" + port = 5432 + user = "listmonk" + password = "listmonk" + database = "listmonk" + + ssl_mode = "disable" + max_open = 25 + max_idle = 25 + max_lifetime = "300s" + + params = "" \ No newline at end of file diff --git a/blueprints/lobe-chat/index.ts b/blueprints/lobe-chat/index.ts deleted file mode 100644 index a07a4e0..0000000 --- a/blueprints/lobe-chat/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 3210, - serviceName: "lobe-chat", - }, - ]; - - return { - domains, - }; -} diff --git a/blueprints/lobe-chat/template.yml b/blueprints/lobe-chat/template.yml new file mode 100644 index 0000000..76eb7d3 --- /dev/null +++ b/blueprints/lobe-chat/template.yml @@ -0,0 +1,12 @@ +variables: + main_domain: ${randomDomain} + +config: + domains: + - serviceName: lobe-chat + port: 3210 + host: ${main_domain} + + env: {} + + mounts: [] \ No newline at end of file diff --git a/blueprints/logto/index.ts b/blueprints/logto/index.ts deleted file mode 100644 index 09b099d..0000000 --- a/blueprints/logto/index.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generatePassword, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - const adminDomain = generateRandomDomain(schema); - const postgresPassword = generatePassword(); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 3001, - serviceName: "app", - }, - { - host: adminDomain, - port: 3002, - serviceName: "app", - }, - ]; - - const envs = [ - `LOGTO_ENDPOINT=http://${adminDomain}`, - `LOGTO_ADMIN_ENDPOINT=http://${adminDomain}`, - `LOGTO_POSTGRES_PASSWORD=${postgresPassword}`, - ]; - - return { - domains, - envs, - }; -} diff --git a/blueprints/logto/template.yml b/blueprints/logto/template.yml new file mode 100644 index 0000000..9effed0 --- /dev/null +++ b/blueprints/logto/template.yml @@ -0,0 +1,20 @@ +variables: + main_domain: ${randomDomain} + admin_domain: ${randomDomain} + postgres_password: ${generatePassword()} + +config: + domains: + - serviceName: app + port: 3001 + host: ${main_domain} + - serviceName: app + port: 3002 + host: ${admin_domain} + + env: + LOGTO_ENDPOINT: http://${admin_domain} + LOGTO_ADMIN_ENDPOINT: http://${admin_domain} + LOGTO_POSTGRES_PASSWORD: ${postgres_password} + + mounts: [] \ No newline at end of file diff --git a/blueprints/macos/index.ts b/blueprints/macos/index.ts deleted file mode 100644 index ebda410..0000000 --- a/blueprints/macos/index.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const domains: DomainSchema[] = [ - { - host: generateRandomDomain(schema), - port: 8006, - serviceName: "macos", - }, - ]; - - const envs = [ - "# https://github.com/dockur/macos?tab=readme-ov-file#how-do-i-select-the-macos-version", - "VERSION=15", - "", - "# Uncomment this if your PC/VM or etc does not support virtualization technology", - "# KVM=N", - "", - "DISK_SIZE=64G", - "RAM_SIZE=4G", - "CPU_CORES=2", - ]; - - return { - domains, - envs, - }; -} diff --git a/blueprints/macos/template.yml b/blueprints/macos/template.yml new file mode 100644 index 0000000..e26a90b --- /dev/null +++ b/blueprints/macos/template.yml @@ -0,0 +1,21 @@ +variables: + main_domain: ${randomDomain} + +config: + domains: + - serviceName: macos + port: 8006 + host: ${main_domain} + + env: + # https://github.com/dockur/macos?tab=readme-ov-file#how-do-i-select-the-macos-version + VERSION: "15" + + # Uncomment this if your PC/VM or etc does not support virtualization technology + # KVM: "N" + + DISK_SIZE: "64G" + RAM_SIZE: "4G" + CPU_CORES: "2" + + mounts: [] \ No newline at end of file diff --git a/blueprints/mailpit/index.ts b/blueprints/mailpit/index.ts deleted file mode 100644 index 25f18f7..0000000 --- a/blueprints/mailpit/index.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateBase64, - generatePassword, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const domains: DomainSchema[] = [ - { - host: generateRandomDomain(schema), - port: 8025, - serviceName: "mailpit", - }, - ]; - - const defaultPassword = generatePassword(); - - const envs = [ - "# Uncomment below if you want basic auth on UI and SMTP", - `#MP_UI_AUTH=mailpit:${defaultPassword}`, - `#MP_SMTP_AUTH=mailpit:${defaultPassword}`, - ]; - - return { - domains, - envs, - }; -} diff --git a/blueprints/mailpit/template.yml b/blueprints/mailpit/template.yml new file mode 100644 index 0000000..de39fd9 --- /dev/null +++ b/blueprints/mailpit/template.yml @@ -0,0 +1,16 @@ +variables: + main_domain: ${randomDomain} + default_password: ${generatePassword()} + +config: + domains: + - serviceName: mailpit + port: 8025 + host: ${main_domain} + + env: + # Uncomment below if you want basic auth on UI and SMTP + #MP_UI_AUTH: mailpit:${default_password} + #MP_SMTP_AUTH: mailpit:${default_password} + + mounts: [] \ No newline at end of file diff --git a/blueprints/maybe/index.ts b/blueprints/maybe/index.ts deleted file mode 100644 index 5eaf7a8..0000000 --- a/blueprints/maybe/index.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateBase64, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - const secretKeyBase = generateBase64(64); - const synthApiKey = generateBase64(32); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 3000, - serviceName: "app", - }, - ]; - - const envs = [ - `SECRET_KEY_BASE=${secretKeyBase}`, - "SELF_HOSTED=true", - `SYNTH_API_KEY=${synthApiKey}`, - "RAILS_FORCE_SSL=false", - "RAILS_ASSUME_SSL=false", - "GOOD_JOB_EXECUTION_MODE=async", - ]; - - const mounts: Template["mounts"] = [ - { - filePath: "./uploads", - content: "This is where user uploads will be stored", - }, - ]; - - return { - envs, - mounts, - domains, - }; -} diff --git a/blueprints/maybe/template.yml b/blueprints/maybe/template.yml new file mode 100644 index 0000000..95dc5da --- /dev/null +++ b/blueprints/maybe/template.yml @@ -0,0 +1,22 @@ +variables: + main_domain: ${randomDomain} + secret_key_base: ${generateBase64(64)} + synth_api_key: ${generateBase64(32)} + +config: + domains: + - serviceName: app + port: 3000 + host: ${main_domain} + + env: + SECRET_KEY_BASE: ${secret_key_base} + SELF_HOSTED: "true" + SYNTH_API_KEY: ${synth_api_key} + RAILS_FORCE_SSL: "false" + RAILS_ASSUME_SSL: "false" + GOOD_JOB_EXECUTION_MODE: "async" + + mounts: + - filePath: ./uploads + content: "This is where user uploads will be stored" \ No newline at end of file diff --git a/blueprints/meilisearch/index.ts b/blueprints/meilisearch/index.ts deleted file mode 100644 index cfb8a9a..0000000 --- a/blueprints/meilisearch/index.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateBase64, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - const masterKey = generateBase64(32); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 7700, - serviceName: "meilisearch", - }, - ]; - const envs = ["MEILI_ENV=development", `MEILI_MASTER_KEY=${masterKey}`]; - - return { - envs, - domains, - }; -} diff --git a/blueprints/meilisearch/template.yml b/blueprints/meilisearch/template.yml new file mode 100644 index 0000000..ba15710 --- /dev/null +++ b/blueprints/meilisearch/template.yml @@ -0,0 +1,15 @@ +variables: + main_domain: ${randomDomain} + master_key: ${generateBase64(32)} + +config: + domains: + - serviceName: meilisearch + port: 7700 + host: ${main_domain} + + env: + MEILI_ENV: "development" + MEILI_MASTER_KEY: ${master_key} + + mounts: [] \ No newline at end of file diff --git a/blueprints/metabase/index.ts b/blueprints/metabase/index.ts deleted file mode 100644 index 0a08916..0000000 --- a/blueprints/metabase/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const randomDomain = generateRandomDomain(schema); - - const domains: DomainSchema[] = [ - { - host: randomDomain, - port: 3000, - serviceName: "metabase", - }, - ]; - - return { - domains, - }; -} diff --git a/blueprints/metabase/template.yml b/blueprints/metabase/template.yml new file mode 100644 index 0000000..4621dbe --- /dev/null +++ b/blueprints/metabase/template.yml @@ -0,0 +1,12 @@ +variables: + main_domain: ${randomDomain} + +config: + domains: + - serviceName: metabase + port: 3000 + host: ${main_domain} + + env: {} + + mounts: [] \ No newline at end of file diff --git a/blueprints/minio/index.ts b/blueprints/minio/index.ts deleted file mode 100644 index 1345aaf..0000000 --- a/blueprints/minio/index.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - const apiDomain = generateRandomDomain(schema); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 9001, - serviceName: "minio", - }, - { - host: apiDomain, - port: 9000, - serviceName: "minio", - }, - ]; - - return { - domains, - }; -} diff --git a/blueprints/minio/template.yml b/blueprints/minio/template.yml new file mode 100644 index 0000000..e38f344 --- /dev/null +++ b/blueprints/minio/template.yml @@ -0,0 +1,16 @@ +variables: + main_domain: ${randomDomain} + api_domain: ${randomDomain} + +config: + domains: + - serviceName: minio + port: 9001 + host: ${main_domain} + - serviceName: minio + port: 9000 + host: ${api_domain} + + env: {} + + mounts: [] \ No newline at end of file diff --git a/blueprints/n8n/index.ts b/blueprints/n8n/index.ts deleted file mode 100644 index da93c02..0000000 --- a/blueprints/n8n/index.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 5678, - serviceName: "n8n", - }, - ]; - const envs = [ - `N8N_HOST=${mainDomain}`, - "N8N_PORT=5678", - "GENERIC_TIMEZONE=Europe/Berlin", - ]; - - return { - envs, - domains, - }; -} diff --git a/blueprints/n8n/template.yml b/blueprints/n8n/template.yml new file mode 100644 index 0000000..c55c159 --- /dev/null +++ b/blueprints/n8n/template.yml @@ -0,0 +1,15 @@ +variables: + main_domain: ${randomDomain} + +config: + domains: + - serviceName: n8n + port: 5678 + host: ${main_domain} + + env: + N8N_HOST: ${main_domain} + N8N_PORT: "5678" + GENERIC_TIMEZONE: "Europe/Berlin" + + mounts: [] \ No newline at end of file diff --git a/blueprints/nextcloud-aio/index.ts b/blueprints/nextcloud-aio/index.ts deleted file mode 100644 index f6bfc89..0000000 --- a/blueprints/nextcloud-aio/index.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generatePassword, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const randomDomain = generateRandomDomain(schema); - const databasePassword = generatePassword(); - const databaseRootPassword = generatePassword(); - const envs = [ - `NEXTCLOUD_DOMAIN=${randomDomain}`, - `MYSQL_SECRET_PASSWORD=${databasePassword}`, - `MYSQL_SECRET_PASSWORD_ROOT=${databaseRootPassword}`, - ]; - - const domains: DomainSchema[] = [ - { - host: randomDomain, - port: 80, - serviceName: "nextcloud", - }, - ]; - - return { envs, domains }; -} diff --git a/blueprints/nextcloud-aio/template.yml b/blueprints/nextcloud-aio/template.yml new file mode 100644 index 0000000..8c2d672 --- /dev/null +++ b/blueprints/nextcloud-aio/template.yml @@ -0,0 +1,17 @@ +variables: + main_domain: ${randomDomain} + db_password: ${generatePassword()} + db_root_password: ${generatePassword()} + +config: + domains: + - serviceName: nextcloud + port: 80 + host: ${main_domain} + + env: + NEXTCLOUD_DOMAIN: ${main_domain} + MYSQL_SECRET_PASSWORD: ${db_password} + MYSQL_SECRET_PASSWORD_ROOT: ${db_root_password} + + mounts: [] \ No newline at end of file diff --git a/blueprints/nocodb/index.ts b/blueprints/nocodb/index.ts deleted file mode 100644 index 60620db..0000000 --- a/blueprints/nocodb/index.ts +++ /dev/null @@ -1,28 +0,0 @@ -// EXAMPLE -import { - type DomainSchema, - type Schema, - type Template, - generateBase64, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const randomDomain = generateRandomDomain(schema); - const secretBase = generateBase64(64); - - const domains: DomainSchema[] = [ - { - host: randomDomain, - port: 8000, - serviceName: "nocodb", - }, - ]; - - const envs = ["NOCODB_PORT=8000", `NC_AUTH_JWT_SECRET=${secretBase}`]; - - return { - envs, - domains, - }; -} diff --git a/blueprints/nocodb/template.yml b/blueprints/nocodb/template.yml new file mode 100644 index 0000000..db70787 --- /dev/null +++ b/blueprints/nocodb/template.yml @@ -0,0 +1,15 @@ +variables: + main_domain: ${randomDomain} + jwt_secret: ${generateBase64(64)} + +config: + domains: + - serviceName: nocodb + port: 8000 + host: ${main_domain} + + env: + NOCODB_PORT: "8000" + NC_AUTH_JWT_SECRET: ${jwt_secret} + + mounts: [] \ No newline at end of file diff --git a/blueprints/odoo/index.ts b/blueprints/odoo/index.ts deleted file mode 100644 index 904293c..0000000 --- a/blueprints/odoo/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const randomDomain = generateRandomDomain(schema); - - const domains: DomainSchema[] = [ - { - host: randomDomain, - port: 8069, - serviceName: "web", - }, - ]; - - return { - domains, - }; -} diff --git a/blueprints/odoo/template.yml b/blueprints/odoo/template.yml new file mode 100644 index 0000000..5b91b37 --- /dev/null +++ b/blueprints/odoo/template.yml @@ -0,0 +1,12 @@ +variables: + main_domain: ${randomDomain} + +config: + domains: + - serviceName: web + port: 8069 + host: ${main_domain} + + env: {} + + mounts: [] \ No newline at end of file diff --git a/blueprints/onedev/index.ts b/blueprints/onedev/index.ts deleted file mode 100644 index 8017c35..0000000 --- a/blueprints/onedev/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const randomDomain = generateRandomDomain(schema); - - const domains: DomainSchema[] = [ - { - host: randomDomain, - port: 6610, - serviceName: "onedev", - }, - ]; - - return { - domains, - }; -} diff --git a/blueprints/onedev/template.yml b/blueprints/onedev/template.yml new file mode 100644 index 0000000..12ef526 --- /dev/null +++ b/blueprints/onedev/template.yml @@ -0,0 +1,12 @@ +variables: + main_domain: ${randomDomain} + +config: + domains: + - serviceName: onedev + port: 6610 + host: ${main_domain} + + env: {} + + mounts: [] \ No newline at end of file diff --git a/blueprints/ontime/index.ts b/blueprints/ontime/index.ts deleted file mode 100644 index 17cac25..0000000 --- a/blueprints/ontime/index.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 4001, - serviceName: "ontime", - }, - ]; - - const envs = ["TZ=UTC"]; - - return { - domains, - envs, - }; -} diff --git a/blueprints/ontime/template.yml b/blueprints/ontime/template.yml new file mode 100644 index 0000000..7f31e83 --- /dev/null +++ b/blueprints/ontime/template.yml @@ -0,0 +1,13 @@ +variables: + main_domain: ${randomDomain} + +config: + domains: + - serviceName: ontime + port: 4001 + host: ${main_domain} + + env: + TZ: "UTC" + + mounts: [] \ No newline at end of file diff --git a/blueprints/open-webui/index.ts b/blueprints/open-webui/index.ts deleted file mode 100644 index 0431c2a..0000000 --- a/blueprints/open-webui/index.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const randomDomain = generateRandomDomain(schema); - - const domains: DomainSchema[] = [ - { - host: randomDomain, - port: 8080, - serviceName: "open-webui", - }, - ]; - const envs = ["OLLAMA_DOCKER_TAG=0.1.47", "WEBUI_DOCKER_TAG=0.3.7"]; - - return { - envs, - domains, - }; -} diff --git a/blueprints/open-webui/template.yml b/blueprints/open-webui/template.yml new file mode 100644 index 0000000..b513881 --- /dev/null +++ b/blueprints/open-webui/template.yml @@ -0,0 +1,14 @@ +variables: + main_domain: ${randomDomain} + +config: + domains: + - serviceName: open-webui + port: 8080 + host: ${main_domain} + + env: + OLLAMA_DOCKER_TAG: "0.1.47" + WEBUI_DOCKER_TAG: "0.3.7" + + mounts: [] \ No newline at end of file diff --git a/blueprints/outline/index.ts b/blueprints/outline/index.ts deleted file mode 100644 index 8431e56..0000000 --- a/blueprints/outline/index.ts +++ /dev/null @@ -1,90 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateBase64, - generatePassword, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - const dexDomain = generateRandomDomain(schema); - const SECRET_KEY = generateBase64(32); - const UTILS_SECRET = generateBase64(32); - const CLIENT_SECRET = generateBase64(32); - const POSTGRES_PASSWORD = generatePassword(); - - const mainURL = `http://${mainDomain}`; - const dexURL = `http://${dexDomain}`; - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 3000, - serviceName: "outline", - }, - { - host: dexDomain, - port: 5556, - serviceName: "dex", - }, - ]; - - const mounts: Template["mounts"] = [ - { - filePath: "/etc/dex/config.yaml", - content: `issuer: ${dexURL} - -web: - http: 0.0.0.0:5556 - -storage: - type: memory - -enablePasswordDB: true - -frontend: - issuer: Outline - -logger: - level: debug - -staticPasswords: - - email: "admin@example.com" - # bcrypt hash of the string "password": $(echo password | htpasswd -BinC 10 admin | cut -d: -f2) - hash: "$2y$10$jsRWHw54uxTUIfhjgUrB9u8HSzPk7TUuQri9sXZrKzRXcScvwYor." - username: "admin" - userID: "1" - - -oauth2: - skipApprovalScreen: true - alwaysShowLoginScreen: false - passwordConnector: local - -staticClients: - - id: "outline" - redirectURIs: - - ${mainURL}/auth/oidc.callback - name: "Outline" - secret: "${CLIENT_SECRET}"`, - }, - ]; - - const envs = [ - `URL=${mainURL}`, - `DEX_URL=${dexURL}`, - `DOMAIN_NAME=${mainDomain}`, - `POSTGRES_PASSWORD=${POSTGRES_PASSWORD}`, - `SECRET_KEY=${SECRET_KEY}`, - `UTILS_SECRET=${UTILS_SECRET}`, - `CLIENT_SECRET=${CLIENT_SECRET}`, - ]; - - return { - domains, - envs, - mounts, - }; -} diff --git a/blueprints/outline/template.yml b/blueprints/outline/template.yml new file mode 100644 index 0000000..74aa022 --- /dev/null +++ b/blueprints/outline/template.yml @@ -0,0 +1,64 @@ +variables: + main_domain: ${randomDomain} + dex_domain: ${randomDomain} + secret_key: ${generateBase64(32)} + utils_secret: ${generateBase64(32)} + client_secret: ${generateBase64(32)} + postgres_password: ${generatePassword()} + +config: + domains: + - serviceName: outline + port: 3000 + host: ${main_domain} + - serviceName: dex + port: 5556 + host: ${dex_domain} + + env: + URL: http://${main_domain} + DEX_URL: http://${dex_domain} + DOMAIN_NAME: ${main_domain} + POSTGRES_PASSWORD: ${postgres_password} + SECRET_KEY: ${secret_key} + UTILS_SECRET: ${utils_secret} + CLIENT_SECRET: ${client_secret} + + mounts: + - filePath: /etc/dex/config.yaml + content: | + issuer: http://${dex_domain} + + web: + http: 0.0.0.0:5556 + + storage: + type: memory + + enablePasswordDB: true + + frontend: + issuer: Outline + + logger: + level: debug + + staticPasswords: + - email: "admin@example.com" + # bcrypt hash of the string "password": $(echo password | htpasswd -BinC 10 admin | cut -d: -f2) + hash: "$2y$10$jsRWHw54uxTUIfhjgUrB9u8HSzPk7TUuQri9sXZrKzRXcScvwYor." + username: "admin" + userID: "1" + + + oauth2: + skipApprovalScreen: true + alwaysShowLoginScreen: false + passwordConnector: local + + staticClients: + - id: "outline" + redirectURIs: + - http://${main_domain}/auth/oidc.callback + name: "Outline" + secret: "${client_secret}" \ No newline at end of file diff --git a/blueprints/penpot/index.ts b/blueprints/penpot/index.ts deleted file mode 100644 index a3e90e8..0000000 --- a/blueprints/penpot/index.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 80, - serviceName: "penpot-frontend", - }, - ]; - - const envs = [`DOMAIN_NAME=${mainDomain}`]; - - return { - domains, - envs, - }; -} diff --git a/blueprints/penpot/template.yml b/blueprints/penpot/template.yml new file mode 100644 index 0000000..b00daab --- /dev/null +++ b/blueprints/penpot/template.yml @@ -0,0 +1,13 @@ +variables: + main_domain: ${randomDomain} + +config: + domains: + - serviceName: penpot-frontend + port: 80 + host: ${main_domain} + + env: + DOMAIN_NAME: ${main_domain} + + mounts: [] \ No newline at end of file diff --git a/blueprints/peppermint/index.ts b/blueprints/peppermint/index.ts deleted file mode 100644 index de63f84..0000000 --- a/blueprints/peppermint/index.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateBase64, - generatePassword, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - const apiDomain = generateRandomDomain(schema); - const postgresPassword = generatePassword(); - const secret = generateBase64(32); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 3000, - serviceName: "peppermint-app", - }, - { - host: apiDomain, - port: 5003, - serviceName: "peppermint-app", - }, - ]; - - const envs = [ - `MAIN_DOMAIN=${mainDomain}`, - `API_DOMAIN=${apiDomain}`, - `POSTGRES_PASSWORD=${postgresPassword}`, - `SECRET=${secret}`, - ]; - - return { - domains, - envs, - }; -} diff --git a/blueprints/peppermint/template.yml b/blueprints/peppermint/template.yml new file mode 100644 index 0000000..2727577 --- /dev/null +++ b/blueprints/peppermint/template.yml @@ -0,0 +1,22 @@ +variables: + main_domain: ${randomDomain} + api_domain: ${randomDomain} + postgres_password: ${generatePassword()} + secret: ${generateBase64(32)} + +config: + domains: + - serviceName: peppermint-app + port: 3000 + host: ${main_domain} + - serviceName: peppermint-app + port: 5003 + host: ${api_domain} + + env: + MAIN_DOMAIN: ${main_domain} + API_DOMAIN: ${api_domain} + POSTGRES_PASSWORD: ${postgres_password} + SECRET: ${secret} + + mounts: [] \ No newline at end of file diff --git a/blueprints/photoprism/index.ts b/blueprints/photoprism/index.ts deleted file mode 100644 index 4a103a6..0000000 --- a/blueprints/photoprism/index.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generatePassword, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const randomDomain = generateRandomDomain(schema); - const randomPassword = generatePassword(); - - const domains: DomainSchema[] = [ - { - host: randomDomain, - port: 2342, - serviceName: "photoprism", - }, - ]; - - const envs = [ - `BASE_URL=http://${randomDomain}`, - `ADMIN_PASSWORD=${randomPassword}`, - ]; - - return { - envs, - domains, - }; -} diff --git a/blueprints/photoprism/template.yml b/blueprints/photoprism/template.yml new file mode 100644 index 0000000..e37d4c7 --- /dev/null +++ b/blueprints/photoprism/template.yml @@ -0,0 +1,15 @@ +variables: + main_domain: ${randomDomain} + admin_password: ${generatePassword()} + +config: + domains: + - serviceName: photoprism + port: 2342 + host: ${main_domain} + + env: + BASE_URL: http://${main_domain} + ADMIN_PASSWORD: ${admin_password} + + mounts: [] \ No newline at end of file diff --git a/blueprints/phpmyadmin/index.ts b/blueprints/phpmyadmin/index.ts deleted file mode 100644 index e1c976b..0000000 --- a/blueprints/phpmyadmin/index.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generatePassword, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - const rootPassword = generatePassword(32); - const password = generatePassword(32); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 80, - serviceName: "phpmyadmin", - }, - ]; - const envs = [ - `MYSQL_ROOT_PASSWORD=${rootPassword}`, - "MYSQL_DATABASE=mysql", - "MYSQL_USER=phpmyadmin", - `MYSQL_PASSWORD=${password}`, - ]; - - return { - envs, - domains, - }; -} diff --git a/blueprints/phpmyadmin/template.yml b/blueprints/phpmyadmin/template.yml new file mode 100644 index 0000000..82780b9 --- /dev/null +++ b/blueprints/phpmyadmin/template.yml @@ -0,0 +1,18 @@ +variables: + main_domain: ${randomDomain} + root_password: ${generatePassword(32)} + user_password: ${generatePassword(32)} + +config: + domains: + - serviceName: phpmyadmin + port: 80 + host: ${main_domain} + + env: + MYSQL_ROOT_PASSWORD: ${root_password} + MYSQL_DATABASE: "mysql" + MYSQL_USER: "phpmyadmin" + MYSQL_PASSWORD: ${user_password} + + mounts: [] \ No newline at end of file diff --git a/blueprints/pocket-id/index.ts b/blueprints/pocket-id/index.ts deleted file mode 100644 index 9a9faa2..0000000 --- a/blueprints/pocket-id/index.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 80, - serviceName: "pocket-id", - }, - ]; - - const envs = [ - "PUBLIC_UI_CONFIG_DISABLED=false", - `PUBLIC_APP_URL=http://${mainDomain}`, - "TRUST_PROXY=true", - ]; - - return { - domains, - envs, - }; -} diff --git a/blueprints/pocket-id/template.yml b/blueprints/pocket-id/template.yml new file mode 100644 index 0000000..8bee5c6 --- /dev/null +++ b/blueprints/pocket-id/template.yml @@ -0,0 +1,15 @@ +variables: + main_domain: ${randomDomain} + +config: + domains: + - serviceName: pocket-id + port: 80 + host: ${main_domain} + + env: + PUBLIC_UI_CONFIG_DISABLED: "false" + PUBLIC_APP_URL: http://${main_domain} + TRUST_PROXY: "true" + + mounts: [] \ No newline at end of file diff --git a/blueprints/portainer/index.ts b/blueprints/portainer/index.ts deleted file mode 100644 index 7775a0e..0000000 --- a/blueprints/portainer/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const domains: DomainSchema[] = [ - { - host: generateRandomDomain(schema), - port: 9000, - serviceName: "portainer", - }, - ]; - return { - domains, - }; -} diff --git a/blueprints/portainer/template.yml b/blueprints/portainer/template.yml new file mode 100644 index 0000000..309a66d --- /dev/null +++ b/blueprints/portainer/template.yml @@ -0,0 +1,12 @@ +variables: + main_domain: ${randomDomain} + +config: + domains: + - serviceName: portainer + port: 9000 + host: ${main_domain} + + env: {} + + mounts: [] \ No newline at end of file diff --git a/blueprints/postiz/index.ts b/blueprints/postiz/index.ts deleted file mode 100644 index a05d2d9..0000000 --- a/blueprints/postiz/index.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateBase64, - generatePassword, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - const dbPassword = generatePassword(); - const dbUser = "postiz"; - const dbName = "postiz"; - const jwtSecret = generateBase64(32); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 5000, - serviceName: "postiz-app", - }, - ]; - - const envs = [ - `POSTIZ_HOST=${mainDomain}`, - `DB_PASSWORD=${dbPassword}`, - `DB_USER=${dbUser}`, - `DB_NAME=${dbName}`, - `JWT_SECRET=${jwtSecret}`, - ]; - - return { - domains, - envs, - }; -} diff --git a/blueprints/postiz/template.yml b/blueprints/postiz/template.yml new file mode 100644 index 0000000..41ddfd9 --- /dev/null +++ b/blueprints/postiz/template.yml @@ -0,0 +1,21 @@ +variables: + main_domain: ${randomDomain} + db_password: ${generatePassword()} + db_user: "postiz" + db_name: "postiz" + jwt_secret: ${generateBase64(32)} + +config: + domains: + - serviceName: postiz-app + port: 5000 + host: ${main_domain} + + env: + POSTIZ_HOST: ${main_domain} + DB_PASSWORD: ${db_password} + DB_USER: ${db_user} + DB_NAME: ${db_name} + JWT_SECRET: ${jwt_secret} + + mounts: [] \ No newline at end of file diff --git a/blueprints/registry/index.ts b/blueprints/registry/index.ts deleted file mode 100644 index 81965e6..0000000 --- a/blueprints/registry/index.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generatePassword, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const domains: DomainSchema[] = [ - { - host: generateRandomDomain(schema), - port: 5000, - serviceName: "registry", - }, - ]; - - const registryHttpSecret = generatePassword(30); - - const envs = [`REGISTRY_HTTP_SECRET=${registryHttpSecret}`]; - - const mounts: Template["mounts"] = [ - { - filePath: "/auth/registry.password", - content: - "# from: docker run --rm --entrypoint htpasswd httpd:2 -Bbn docker password\ndocker:$2y$10$qWZoWev/u5PV7WneFoRAMuoGpRcAQOgUuIIdLnU7pJXogrBSY23/2\n", - }, - ]; - - return { - domains, - envs, - mounts, - }; -} diff --git a/blueprints/registry/template.yml b/blueprints/registry/template.yml new file mode 100644 index 0000000..f611a20 --- /dev/null +++ b/blueprints/registry/template.yml @@ -0,0 +1,18 @@ +variables: + main_domain: ${randomDomain} + registry_http_secret: ${generatePassword(30)} + +config: + domains: + - serviceName: registry + port: 5000 + host: ${main_domain} + + env: + REGISTRY_HTTP_SECRET: ${registry_http_secret} + + mounts: + - filePath: /auth/registry.password + content: | + # from: docker run --rm --entrypoint htpasswd httpd:2 -Bbn docker password + docker:$2y$10$qWZoWev/u5PV7WneFoRAMuoGpRcAQOgUuIIdLnU7pJXogrBSY23/2 \ No newline at end of file diff --git a/blueprints/rocketchat/index.ts b/blueprints/rocketchat/index.ts deleted file mode 100644 index 0c10307..0000000 --- a/blueprints/rocketchat/index.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 3000, - serviceName: "rocketchat", - }, - ]; - - const envs = [`ROCKETCHAT_HOST=${mainDomain}`, "ROCKETCHAT_PORT=3000"]; - - return { - envs, - domains, - }; -} diff --git a/blueprints/rocketchat/template.yml b/blueprints/rocketchat/template.yml new file mode 100644 index 0000000..73692d2 --- /dev/null +++ b/blueprints/rocketchat/template.yml @@ -0,0 +1,14 @@ +variables: + main_domain: ${randomDomain} + +config: + domains: + - serviceName: rocketchat + port: 3000 + host: ${main_domain} + + env: + ROCKETCHAT_HOST: ${main_domain} + ROCKETCHAT_PORT: "3000" + + mounts: [] \ No newline at end of file diff --git a/blueprints/roundcube/index.ts b/blueprints/roundcube/index.ts deleted file mode 100644 index 8df8c74..0000000 --- a/blueprints/roundcube/index.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const randomDomain = generateRandomDomain(schema); - const envs = [ - "DEFAULT_HOST=tls://mail.example.com", - "SMTP_SERVER=tls://mail.example.com", - ]; - - const domains: DomainSchema[] = [ - { - host: randomDomain, - port: 80, - serviceName: "roundcubemail", - }, - ]; - - return { envs, domains }; -} diff --git a/blueprints/roundcube/template.yml b/blueprints/roundcube/template.yml new file mode 100644 index 0000000..621dcbd --- /dev/null +++ b/blueprints/roundcube/template.yml @@ -0,0 +1,14 @@ +variables: + main_domain: ${randomDomain} + +config: + domains: + - serviceName: roundcubemail + port: 80 + host: ${main_domain} + + env: + DEFAULT_HOST: "tls://mail.example.com" + SMTP_SERVER: "tls://mail.example.com" + + mounts: [] \ No newline at end of file diff --git a/blueprints/ryot/index.ts b/blueprints/ryot/index.ts deleted file mode 100644 index 1d8d5ce..0000000 --- a/blueprints/ryot/index.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateBase64, - generatePassword, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - const postgresPassword = generatePassword(); - const adminAccessToken = generateBase64(32); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 8000, - serviceName: "ryot-app", - }, - ]; - - const envs = [ - `POSTGRES_PASSWORD=${postgresPassword}`, - `ADMIN_ACCESS_TOKEN=${adminAccessToken}`, - "# Optional: Uncomment and set your pro key if you have one", - "# SERVER_PRO_KEY=your_pro_key_here", - ]; - - return { - domains, - envs, - }; -} diff --git a/blueprints/ryot/template.yml b/blueprints/ryot/template.yml new file mode 100644 index 0000000..d2388d2 --- /dev/null +++ b/blueprints/ryot/template.yml @@ -0,0 +1,18 @@ +variables: + main_domain: ${randomDomain} + postgres_password: ${generatePassword()} + admin_access_token: ${generateBase64(32)} + +config: + domains: + - serviceName: ryot-app + port: 8000 + host: ${main_domain} + + env: + POSTGRES_PASSWORD: ${postgres_password} + ADMIN_ACCESS_TOKEN: ${admin_access_token} + # Optional: Uncomment and set your pro key if you have one + # SERVER_PRO_KEY: "your_pro_key_here" + + mounts: [] \ No newline at end of file diff --git a/blueprints/shlink/index.ts b/blueprints/shlink/index.ts deleted file mode 100644 index 1e456e1..0000000 --- a/blueprints/shlink/index.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generatePassword, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const defaultDomain = generateRandomDomain(schema); - const initialApiKey = generatePassword(30); - - const domains: DomainSchema[] = [ - { - host: `web-${defaultDomain}`, - port: 8080, - serviceName: "shlink-web", - }, - { - host: defaultDomain, - port: 8080, - serviceName: "shlink", - }, - ]; - - const envs = [ - `INITIAL_API_KEY=${initialApiKey}`, - `DEFAULT_DOMAIN=${defaultDomain}`, - ]; - - return { - envs, - domains, - }; -} diff --git a/blueprints/shlink/template.yml b/blueprints/shlink/template.yml new file mode 100644 index 0000000..47f1ba8 --- /dev/null +++ b/blueprints/shlink/template.yml @@ -0,0 +1,18 @@ +variables: + main_domain: ${randomDomain} + initial_api_key: ${generatePassword(30)} + +config: + domains: + - serviceName: shlink-web + port: 8080 + host: web-${main_domain} + - serviceName: shlink + port: 8080 + host: ${main_domain} + + env: + INITIAL_API_KEY: ${initial_api_key} + DEFAULT_DOMAIN: ${main_domain} + + mounts: [] \ No newline at end of file diff --git a/blueprints/slash/index.ts b/blueprints/slash/index.ts deleted file mode 100644 index ba614fd..0000000 --- a/blueprints/slash/index.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generatePassword, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - const dbPassword = generatePassword(); - const dbUser = "slash"; - const dbName = "slash"; - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 5231, - serviceName: "slash-app", - }, - ]; - - const envs = [ - `DB_USER=${dbUser}`, - `DB_PASSWORD=${dbPassword}`, - `DB_NAME=${dbName}`, - ]; - - return { - domains, - envs, - }; -} diff --git a/blueprints/slash/template.yml b/blueprints/slash/template.yml new file mode 100644 index 0000000..a0a3382 --- /dev/null +++ b/blueprints/slash/template.yml @@ -0,0 +1,18 @@ +variables: + main_domain: ${randomDomain} + db_password: ${generatePassword()} + db_user: "slash" + db_name: "slash" + +config: + domains: + - serviceName: slash-app + port: 5231 + host: ${main_domain} + + env: + DB_USER: ${db_user} + DB_PASSWORD: ${db_password} + DB_NAME: ${db_name} + + mounts: [] \ No newline at end of file diff --git a/blueprints/soketi/index.ts b/blueprints/soketi/index.ts deleted file mode 100644 index 47aa461..0000000 --- a/blueprints/soketi/index.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - const metricsDomain = generateRandomDomain(schema); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 6001, - serviceName: "soketi", - }, - { - host: metricsDomain, - port: 9601, - serviceName: "soketi", - }, - ]; - - return { - domains, - }; -} diff --git a/blueprints/soketi/template.yml b/blueprints/soketi/template.yml new file mode 100644 index 0000000..2eaf708 --- /dev/null +++ b/blueprints/soketi/template.yml @@ -0,0 +1,16 @@ +variables: + main_domain: ${randomDomain} + metrics_domain: ${randomDomain} + +config: + domains: + - serviceName: soketi + port: 6001 + host: ${main_domain} + - serviceName: soketi + port: 9601 + host: ${metrics_domain} + + env: {} + + mounts: [] \ No newline at end of file diff --git a/blueprints/spacedrive/index.ts b/blueprints/spacedrive/index.ts deleted file mode 100644 index 15db4b1..0000000 --- a/blueprints/spacedrive/index.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generatePassword, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const randomDomain = generateRandomDomain(schema); - const secretKey = generatePassword(); - const randomUsername = "admin"; // Default username - - const domains: DomainSchema[] = [ - { - host: randomDomain, - port: 8080, - serviceName: "server", - }, - ]; - - const envs = [`SD_USERNAME=${randomUsername}`, `SD_PASSWORD=${secretKey}`]; - - return { - envs, - domains, - }; -} diff --git a/blueprints/spacedrive/template.yml b/blueprints/spacedrive/template.yml new file mode 100644 index 0000000..be8c6d9 --- /dev/null +++ b/blueprints/spacedrive/template.yml @@ -0,0 +1,15 @@ +variables: + main_domain: ${randomDomain} + secret_key: ${generatePassword()} + +config: + domains: + - serviceName: server + port: 8080 + host: ${main_domain} + + env: + SD_USERNAME: "admin" + SD_PASSWORD: ${secret_key} + + mounts: [] \ No newline at end of file diff --git a/blueprints/stirling/index.ts b/blueprints/stirling/index.ts deleted file mode 100644 index a8df5e3..0000000 --- a/blueprints/stirling/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { - type DomainSchema, - type Schema, - type Template, - generateRandomDomain, -} from "../utils"; - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - - const domains: DomainSchema[] = [ - { - host: mainDomain, - port: 8080, - serviceName: "stirling-pdf", - }, - ]; - - return { - domains, - }; -} diff --git a/blueprints/stirling/template.yml b/blueprints/stirling/template.yml new file mode 100644 index 0000000..607e08f --- /dev/null +++ b/blueprints/stirling/template.yml @@ -0,0 +1,12 @@ +variables: + main_domain: ${randomDomain} + +config: + domains: + - serviceName: stirling-pdf + port: 8080 + host: ${main_domain} + + env: {} + + mounts: [] \ No newline at end of file diff --git a/blueprints/supabase/index.ts b/blueprints/supabase/index.ts deleted file mode 100644 index 6922c77..0000000 --- a/blueprints/supabase/index.ts +++ /dev/null @@ -1,995 +0,0 @@ -import { createHmac } from "node:crypto"; -import { - type DomainSchema, - type Schema, - type Template, - generateBase64, - generatePassword, - generateRandomDomain, -} from "../utils"; - -interface JWTPayload { - role: "anon" | "service_role"; - iss: string; - iat: number; - exp: number; -} - -function base64UrlEncode(str: string): string { - return Buffer.from(str) - .toString("base64") - .replace(/\+/g, "-") - .replace(/\//g, "_") - .replace(/=/g, ""); -} - -function generateJWT(payload: JWTPayload, secret: string): string { - const header = { alg: "HS256", typ: "JWT" }; - - const encodedHeader = base64UrlEncode(JSON.stringify(header)); - const encodedPayload = base64UrlEncode(JSON.stringify(payload)); - - const signature = createHmac("sha256", secret) - .update(`${encodedHeader}.${encodedPayload}`) - .digest("base64url"); - - return `${encodedHeader}.${encodedPayload}.${signature}`; -} - -export function generateSupabaseAnonJWT(secret: string): string { - const now = Math.floor(Date.now() / 1000); - const payload: JWTPayload = { - role: "anon", - iss: "supabase", - iat: now, - exp: now + 100 * 365 * 24 * 60 * 60, // 100 years - }; - - return generateJWT(payload, secret); -} - -export function generateSupabaseServiceJWT(secret: string): string { - const now = Math.floor(Date.now() / 1000); - const payload: JWTPayload = { - role: "service_role", - iss: "supabase", - iat: now, - exp: now + 100 * 365 * 24 * 60 * 60, // 100 years - }; - - return generateJWT(payload, secret); -} - -export function generate(schema: Schema): Template { - const mainDomain = generateRandomDomain(schema); - - const postgresPassword = generatePassword(32); - const jwtSecret = generateBase64(32); - const dashboardPassword = generatePassword(32); - const logflareApiKey = generatePassword(32); - - const annonKey = generateSupabaseAnonJWT(jwtSecret); - const serviceRoleKey = generateSupabaseServiceJWT(jwtSecret); - const domains: DomainSchema[] = [ - { - serviceName: "kong", - host: mainDomain, - port: 8000, - }, - ]; - - const envs = [ - `SUPABASE_HOST=${mainDomain}`, - `POSTGRES_PASSWORD=${postgresPassword}`, - `JWT_SECRET=${jwtSecret}`, - `ANON_KEY=${annonKey}`, - `SERVICE_ROLE_KEY=${serviceRoleKey}`, - "DASHBOARD_USERNAME=supabase", - `DASHBOARD_PASSWORD=${dashboardPassword}`, - "POSTGRES_HOSTNAME=db", - "POSTGRES_DB=postgres", - "POSTGRES_PORT=5432", - "KONG_HTTP_PORT=8000", - "KONG_HTTPS_PORT=8443", - "PGRST_DB_SCHEMAS=public,storage,graphql_public", - "ADDITIONAL_REDIRECT_URLS=", - "JWT_EXPIRY=3600", - "DISABLE_SIGNUP=false", - `MAILER_URLPATHS_CONFIRMATION=\"/auth/v1/verify\"`, - `MAILER_URLPATHS_INVITE=\"/auth/v1/verify\"`, - `MAILER_URLPATHS_RECOVERY=\"/auth/v1/verify\"`, - `MAILER_URLPATHS_EMAIL_CHANGE=\"/auth/v1/verify\"`, - "ENABLE_EMAIL_SIGNUP=true", - "ENABLE_EMAIL_AUTOCONFIRM=false", - "SMTP_ADMIN_EMAIL=admin@example.com", - "SMTP_HOSTNAME=supabase-mail", - "SMTP_PORT=2500", - "SMTP_USER=fake_mail_user", - "SMTP_PASS=fake_mail_password", - "SMTP_SENDER_NAME=fake_sender", - "ENABLE_ANONYMOUS_USERS=false", - "ENABLE_PHONE_SIGNUP=true", - "ENABLE_PHONE_AUTOCONFIRM=true", - "STUDIO_DEFAULT_ORGANIZATION=Default Organization", - "STUDIO_DEFAULT_PROJECT=Default Project", - "STUDIO_PORT=3000", - "IMGPROXY_ENABLE_WEBP_DETECTION=true", - "FUNCTIONS_VERIFY_JWT=false", - `LOGFLARE_LOGGER_BACKEND_API_KEY=${logflareApiKey}`, - `LOGFLARE_API_KEY=${logflareApiKey}`, - "DOCKER_SOCKET_LOCATION=/var/run/docker.sock", - "GOOGLE_PROJECT_ID=GOOGLE_PROJECT_ID", - "GOOGLE_PROJECT_NUMBER=GOOGLE_PROJECT_NUMBER", - ]; - - const mounts: Template["mounts"] = [ - { - filePath: "/volumes/api/kong.yml", - content: ` -_format_version: '2.1' -_transform: true - -### -### Consumers / Users -### -consumers: - - username: DASHBOARD - - username: anon - keyauth_credentials: - - key: $SUPABASE_ANON_KEY - - username: service_role - keyauth_credentials: - - key: $SUPABASE_SERVICE_KEY - -### -### Access Control List -### -acls: - - consumer: anon - group: anon - - consumer: service_role - group: admin - -### -### Dashboard credentials -### -basicauth_credentials: - - consumer: DASHBOARD - username: $DASHBOARD_USERNAME - password: $DASHBOARD_PASSWORD - -### -### API Routes -### -services: - ## Open Auth routes - - name: auth-v1-open - url: http://auth:9999/verify - routes: - - name: auth-v1-open - strip_path: true - paths: - - /auth/v1/verify - plugins: - - name: cors - - name: auth-v1-open-callback - url: http://auth:9999/callback - routes: - - name: auth-v1-open-callback - strip_path: true - paths: - - /auth/v1/callback - plugins: - - name: cors - - name: auth-v1-open-authorize - url: http://auth:9999/authorize - routes: - - name: auth-v1-open-authorize - strip_path: true - paths: - - /auth/v1/authorize - plugins: - - name: cors - - ## Secure Auth routes - - name: auth-v1 - _comment: 'GoTrue: /auth/v1/* -> http://auth:9999/*' - url: http://auth:9999/ - routes: - - name: auth-v1-all - strip_path: true - paths: - - /auth/v1/ - plugins: - - name: cors - - name: key-auth - config: - hide_credentials: false - - name: acl - config: - hide_groups_header: true - allow: - - admin - - anon - - ## Secure REST routes - - name: rest-v1 - _comment: 'PostgREST: /rest/v1/* -> http://rest:3000/*' - url: http://rest:3000/ - routes: - - name: rest-v1-all - strip_path: true - paths: - - /rest/v1/ - plugins: - - name: cors - - name: key-auth - config: - hide_credentials: true - - name: acl - config: - hide_groups_header: true - allow: - - admin - - anon - - ## Secure GraphQL routes - - name: graphql-v1 - _comment: 'PostgREST: /graphql/v1/* -> http://rest:3000/rpc/graphql' - url: http://rest:3000/rpc/graphql - routes: - - name: graphql-v1-all - strip_path: true - paths: - - /graphql/v1 - plugins: - - name: cors - - name: key-auth - config: - hide_credentials: true - - name: request-transformer - config: - add: - headers: - - Content-Profile:graphql_public - - name: acl - config: - hide_groups_header: true - allow: - - admin - - anon - - ## Secure Realtime routes - - name: realtime-v1-ws - _comment: 'Realtime: /realtime/v1/* -> ws://realtime:4000/socket/*' - url: http://realtime-dev.supabase-realtime:4000/socket - protocol: ws - routes: - - name: realtime-v1-ws - strip_path: true - paths: - - /realtime/v1/ - plugins: - - name: cors - - name: key-auth - config: - hide_credentials: false - - name: acl - config: - hide_groups_header: true - allow: - - admin - - anon - - name: realtime-v1-rest - _comment: 'Realtime: /realtime/v1/* -> ws://realtime:4000/socket/*' - url: http://realtime-dev.supabase-realtime:4000/api - protocol: http - routes: - - name: realtime-v1-rest - strip_path: true - paths: - - /realtime/v1/api - plugins: - - name: cors - - name: key-auth - config: - hide_credentials: false - - name: acl - config: - hide_groups_header: true - allow: - - admin - - anon - ## Storage routes: the storage server manages its own auth - - name: storage-v1 - _comment: 'Storage: /storage/v1/* -> http://storage:5000/*' - url: http://storage:5000/ - routes: - - name: storage-v1-all - strip_path: true - paths: - - /storage/v1/ - plugins: - - name: cors - - ## Edge Functions routes - - name: functions-v1 - _comment: 'Edge Functions: /functions/v1/* -> http://functions:9000/*' - url: http://functions:9000/ - routes: - - name: functions-v1-all - strip_path: true - paths: - - /functions/v1/ - plugins: - - name: cors - - ## Analytics routes - - name: analytics-v1 - _comment: 'Analytics: /analytics/v1/* -> http://logflare:4000/*' - url: http://analytics:4000/ - routes: - - name: analytics-v1-all - strip_path: true - paths: - - /analytics/v1/ - - ## Secure Database routes - - name: meta - _comment: 'pg-meta: /pg/* -> http://pg-meta:8080/*' - url: http://meta:8080/ - routes: - - name: meta-all - strip_path: true - paths: - - /pg/ - plugins: - - name: key-auth - config: - hide_credentials: false - - name: acl - config: - hide_groups_header: true - allow: - - admin - - ## Protected Dashboard - catch all remaining routes - - name: dashboard - _comment: 'Studio: /* -> http://studio:3000/*' - url: http://studio:3000/ - routes: - - name: dashboard-all - strip_path: true - paths: - - / - plugins: - - name: cors - - name: basic-auth - config: - hide_credentials: true - `, - }, - { - filePath: "/volumes/db/init/data.sql", - content: ` - `, - }, - { - filePath: "/volumes/db/jwt.sql", - content: ` -\\set jwt_secret \`echo "$JWT_SECRET"\` -\\set jwt_exp \`echo "$JWT_EXP"\` - -ALTER DATABASE postgres SET "app.settings.jwt_secret" TO :'jwt_secret'; -ALTER DATABASE postgres SET "app.settings.jwt_exp" TO :'jwt_exp'; - `, - }, - { - filePath: "/volumes/db/logs.sql", - content: ` -\\set pguser \`echo "$POSTGRES_USER"\` - -create schema if not exists _analytics; -alter schema _analytics owner to :pguser; - `, - }, - { - filePath: "/volumes/db/realtime.sql", - content: ` -\\set pguser \`echo "$POSTGRES_USER"\` - -create schema if not exists _realtime; -alter schema _realtime owner to :pguser; - `, - }, - { - filePath: "/volumes/db/roles.sql", - content: ` --- NOTE: change to your own passwords for production environments -\\set pgpass \`echo "$POSTGRES_PASSWORD"\` - -ALTER USER authenticator WITH PASSWORD :'pgpass'; -ALTER USER pgbouncer WITH PASSWORD :'pgpass'; -ALTER USER supabase_auth_admin WITH PASSWORD :'pgpass'; -ALTER USER supabase_functions_admin WITH PASSWORD :'pgpass'; -ALTER USER supabase_storage_admin WITH PASSWORD :'pgpass'; - `, - }, - { - filePath: "/volumes/db/webhooks.sql", - content: ` -BEGIN; - -- Create pg_net extension - CREATE EXTENSION IF NOT EXISTS pg_net SCHEMA extensions; - -- Create supabase_functions schema - CREATE SCHEMA supabase_functions AUTHORIZATION supabase_admin; - GRANT USAGE ON SCHEMA supabase_functions TO postgres, anon, authenticated, service_role; - ALTER DEFAULT PRIVILEGES IN SCHEMA supabase_functions GRANT ALL ON TABLES TO postgres, anon, authenticated, service_role; - ALTER DEFAULT PRIVILEGES IN SCHEMA supabase_functions GRANT ALL ON FUNCTIONS TO postgres, anon, authenticated, service_role; - ALTER DEFAULT PRIVILEGES IN SCHEMA supabase_functions GRANT ALL ON SEQUENCES TO postgres, anon, authenticated, service_role; - -- supabase_functions.migrations definition - CREATE TABLE supabase_functions.migrations ( - version text PRIMARY KEY, - inserted_at timestamptz NOT NULL DEFAULT NOW() - ); - -- Initial supabase_functions migration - INSERT INTO supabase_functions.migrations (version) VALUES ('initial'); - -- supabase_functions.hooks definition - CREATE TABLE supabase_functions.hooks ( - id bigserial PRIMARY KEY, - hook_table_id integer NOT NULL, - hook_name text NOT NULL, - created_at timestamptz NOT NULL DEFAULT NOW(), - request_id bigint - ); - CREATE INDEX supabase_functions_hooks_request_id_idx ON supabase_functions.hooks USING btree (request_id); - CREATE INDEX supabase_functions_hooks_h_table_id_h_name_idx ON supabase_functions.hooks USING btree (hook_table_id, hook_name); - COMMENT ON TABLE supabase_functions.hooks IS 'Supabase Functions Hooks: Audit trail for triggered hooks.'; - CREATE FUNCTION supabase_functions.http_request() - RETURNS trigger - LANGUAGE plpgsql - AS $function$ - DECLARE - request_id bigint; - payload jsonb; - url text := TG_ARGV[0]::text; - method text := TG_ARGV[1]::text; - headers jsonb DEFAULT '{}'::jsonb; - params jsonb DEFAULT '{}'::jsonb; - timeout_ms integer DEFAULT 1000; - BEGIN - IF url IS NULL OR url = 'null' THEN - RAISE EXCEPTION 'url argument is missing'; - END IF; - - IF method IS NULL OR method = 'null' THEN - RAISE EXCEPTION 'method argument is missing'; - END IF; - - IF TG_ARGV[2] IS NULL OR TG_ARGV[2] = 'null' THEN - headers = '{"Content-Type": "application/json"}'::jsonb; - ELSE - headers = TG_ARGV[2]::jsonb; - END IF; - - IF TG_ARGV[3] IS NULL OR TG_ARGV[3] = 'null' THEN - params = '{}'::jsonb; - ELSE - params = TG_ARGV[3]::jsonb; - END IF; - - IF TG_ARGV[4] IS NULL OR TG_ARGV[4] = 'null' THEN - timeout_ms = 1000; - ELSE - timeout_ms = TG_ARGV[4]::integer; - END IF; - - CASE - WHEN method = 'GET' THEN - SELECT http_get INTO request_id FROM net.http_get( - url, - params, - headers, - timeout_ms - ); - WHEN method = 'POST' THEN - payload = jsonb_build_object( - 'old_record', OLD, - 'record', NEW, - 'type', TG_OP, - 'table', TG_TABLE_NAME, - 'schema', TG_TABLE_SCHEMA - ); - - SELECT http_post INTO request_id FROM net.http_post( - url, - payload, - params, - headers, - timeout_ms - ); - ELSE - RAISE EXCEPTION 'method argument % is invalid', method; - END CASE; - - INSERT INTO supabase_functions.hooks - (hook_table_id, hook_name, request_id) - VALUES - (TG_RELID, TG_NAME, request_id); - - RETURN NEW; - END - $function$; - -- Supabase super admin - DO - $$ - BEGIN - IF NOT EXISTS ( - SELECT 1 - FROM pg_roles - WHERE rolname = 'supabase_functions_admin' - ) - THEN - CREATE USER supabase_functions_admin NOINHERIT CREATEROLE LOGIN NOREPLICATION; - END IF; - END - $$; - GRANT ALL PRIVILEGES ON SCHEMA supabase_functions TO supabase_functions_admin; - GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA supabase_functions TO supabase_functions_admin; - GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA supabase_functions TO supabase_functions_admin; - ALTER USER supabase_functions_admin SET search_path = "supabase_functions"; - ALTER table "supabase_functions".migrations OWNER TO supabase_functions_admin; - ALTER table "supabase_functions".hooks OWNER TO supabase_functions_admin; - ALTER function "supabase_functions".http_request() OWNER TO supabase_functions_admin; - GRANT supabase_functions_admin TO postgres; - -- Remove unused supabase_pg_net_admin role - DO - $$ - BEGIN - IF EXISTS ( - SELECT 1 - FROM pg_roles - WHERE rolname = 'supabase_pg_net_admin' - ) - THEN - REASSIGN OWNED BY supabase_pg_net_admin TO supabase_admin; - DROP OWNED BY supabase_pg_net_admin; - DROP ROLE supabase_pg_net_admin; - END IF; - END - $$; - -- pg_net grants when extension is already enabled - DO - $$ - BEGIN - IF EXISTS ( - SELECT 1 - FROM pg_extension - WHERE extname = 'pg_net' - ) - THEN - GRANT USAGE ON SCHEMA net TO supabase_functions_admin, postgres, anon, authenticated, service_role; - ALTER function net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) SECURITY DEFINER; - ALTER function net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) SECURITY DEFINER; - ALTER function net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) SET search_path = net; - ALTER function net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) SET search_path = net; - REVOKE ALL ON FUNCTION net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) FROM PUBLIC; - REVOKE ALL ON FUNCTION net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) FROM PUBLIC; - GRANT EXECUTE ON FUNCTION net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) TO supabase_functions_admin, postgres, anon, authenticated, service_role; - GRANT EXECUTE ON FUNCTION net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) TO supabase_functions_admin, postgres, anon, authenticated, service_role; - END IF; - END - $$; - -- Event trigger for pg_net - CREATE OR REPLACE FUNCTION extensions.grant_pg_net_access() - RETURNS event_trigger - LANGUAGE plpgsql - AS $$ - BEGIN - IF EXISTS ( - SELECT 1 - FROM pg_event_trigger_ddl_commands() AS ev - JOIN pg_extension AS ext - ON ev.objid = ext.oid - WHERE ext.extname = 'pg_net' - ) - THEN - GRANT USAGE ON SCHEMA net TO supabase_functions_admin, postgres, anon, authenticated, service_role; - ALTER function net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) SECURITY DEFINER; - ALTER function net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) SECURITY DEFINER; - ALTER function net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) SET search_path = net; - ALTER function net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) SET search_path = net; - REVOKE ALL ON FUNCTION net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) FROM PUBLIC; - REVOKE ALL ON FUNCTION net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) FROM PUBLIC; - GRANT EXECUTE ON FUNCTION net.http_get(url text, params jsonb, headers jsonb, timeout_milliseconds integer) TO supabase_functions_admin, postgres, anon, authenticated, service_role; - GRANT EXECUTE ON FUNCTION net.http_post(url text, body jsonb, params jsonb, headers jsonb, timeout_milliseconds integer) TO supabase_functions_admin, postgres, anon, authenticated, service_role; - END IF; - END; - $$; - COMMENT ON FUNCTION extensions.grant_pg_net_access IS 'Grants access to pg_net'; - DO - $$ - BEGIN - IF NOT EXISTS ( - SELECT 1 - FROM pg_event_trigger - WHERE evtname = 'issue_pg_net_access' - ) THEN - CREATE EVENT TRIGGER issue_pg_net_access ON ddl_command_end WHEN TAG IN ('CREATE EXTENSION') - EXECUTE PROCEDURE extensions.grant_pg_net_access(); - END IF; - END - $$; - INSERT INTO supabase_functions.migrations (version) VALUES ('20210809183423_update_grants'); - ALTER function supabase_functions.http_request() SECURITY DEFINER; - ALTER function supabase_functions.http_request() SET search_path = supabase_functions; - REVOKE ALL ON FUNCTION supabase_functions.http_request() FROM PUBLIC; - GRANT EXECUTE ON FUNCTION supabase_functions.http_request() TO postgres, anon, authenticated, service_role; -COMMIT; - `, - }, - { - filePath: "/volumes/functions/hello/index.ts", - content: ` -// Follow this setup guide to integrate the Deno language server with your editor: -// https://deno.land/manual/getting_started/setup_your_environment -// This enables autocomplete, go to definition, etc. - -import { serve } from "https://deno.land/std@0.177.1/http/server.ts" - -serve(async () => { - return new Response( - \`"Hello from Edge Functions!"\`, - { headers: { "Content-Type": "application/json" } }, - ) -}) - -// To invoke: -// curl 'http://localhost:/functions/v1/hello' \\ -// --header 'Authorization: Bearer ' - `, - }, - { - filePath: "/volumes/functions/main/index.ts", - content: ` -import { serve } from 'https://deno.land/std@0.131.0/http/server.ts' -import * as jose from 'https://deno.land/x/jose@v4.14.4/index.ts' - -console.log('main function started') - -const JWT_SECRET = Deno.env.get('JWT_SECRET') -const VERIFY_JWT = Deno.env.get('VERIFY_JWT') === 'true' - -function getAuthToken(req: Request) { - const authHeader = req.headers.get('authorization') - if (!authHeader) { - throw new Error('Missing authorization header') - } - const [bearer, token] = authHeader.split(' ') - if (bearer !== 'Bearer') { - throw new Error(\`Auth header is not 'Bearer {token}'\`) - } - return token -} - -async function verifyJWT(jwt: string): Promise { - const encoder = new TextEncoder() - const secretKey = encoder.encode(JWT_SECRET) - try { - await jose.jwtVerify(jwt, secretKey) - } catch (err) { - console.error(err) - return false - } - return true -} - -serve(async (req: Request) => { - if (req.method !== 'OPTIONS' && VERIFY_JWT) { - try { - const token = getAuthToken(req) - const isValidJWT = await verifyJWT(token) - - if (!isValidJWT) { - return new Response(JSON.stringify({ msg: 'Invalid JWT' }), { - status: 401, - headers: { 'Content-Type': 'application/json' }, - }) - } - } catch (e) { - console.error(e) - return new Response(JSON.stringify({ msg: e.toString() }), { - status: 401, - headers: { 'Content-Type': 'application/json' }, - }) - } - } - - const url = new URL(req.url) - const { pathname } = url - const path_parts = pathname.split('/') - const service_name = path_parts[1] - - if (!service_name || service_name === '') { - const error = { msg: 'missing function name in request' } - return new Response(JSON.stringify(error), { - status: 400, - headers: { 'Content-Type': 'application/json' }, - }) - } - - const servicePath = \`/home/deno/functions/\${service_name}\` - console.error(\`serving the request with \${servicePath}\`) - - const memoryLimitMb = 150 - const workerTimeoutMs = 1 * 60 * 1000 - const noModuleCache = false - const importMapPath = null - const envVarsObj = Deno.env.toObject() - const envVars = Object.keys(envVarsObj).map((k) => [k, envVarsObj[k]]) - - try { - const worker = await EdgeRuntime.userWorkers.create({ - servicePath, - memoryLimitMb, - workerTimeoutMs, - noModuleCache, - importMapPath, - envVars, - }) - return await worker.fetch(req) - } catch (e) { - const error = { msg: e.toString() } - return new Response(JSON.stringify(error), { - status: 500, - headers: { 'Content-Type': 'application/json' }, - }) - } -}) - `, - }, - { - filePath: "/volumes/logs/vector.yml", - content: ` -api: - enabled: true - address: 0.0.0.0:9001 - -sources: - docker_host: - type: docker_logs - exclude_containers: - - supabase-vector - -transforms: - project_logs: - type: remap - inputs: - - docker_host - source: |- - .project = "default" - .event_message = del(.message) - .appname = del(.container_name) - del(.container_created_at) - del(.container_id) - del(.source_type) - del(.stream) - del(.label) - del(.image) - del(.host) - del(.stream) - router: - type: route - inputs: - - project_logs - route: - kong: '.appname == "supabase-kong"' - auth: '.appname == "supabase-auth"' - rest: '.appname == "supabase-rest"' - realtime: '.appname == "supabase-realtime"' - storage: '.appname == "supabase-storage"' - functions: '.appname == "supabase-functions"' - db: '.appname == "supabase-db"' - # Ignores non nginx errors since they are related with kong booting up - kong_logs: - type: remap - inputs: - - router.kong - source: |- - req, err = parse_nginx_log(.event_message, "combined") - if err == null { - .timestamp = req.timestamp - .metadata.request.headers.referer = req.referer - .metadata.request.headers.user_agent = req.agent - .metadata.request.headers.cf_connecting_ip = req.client - .metadata.request.method = req.method - .metadata.request.path = req.path - .metadata.request.protocol = req.protocol - .metadata.response.status_code = req.status - } - if err != null { - abort - } - # Ignores non nginx errors since they are related with kong booting up - kong_err: - type: remap - inputs: - - router.kong - source: |- - .metadata.request.method = "GET" - .metadata.response.status_code = 200 - parsed, err = parse_nginx_log(.event_message, "error") - if err == null { - .timestamp = parsed.timestamp - .severity = parsed.severity - .metadata.request.host = parsed.host - .metadata.request.headers.cf_connecting_ip = parsed.client - url, err = split(parsed.request, " ") - if err == null { - .metadata.request.method = url[0] - .metadata.request.path = url[1] - .metadata.request.protocol = url[2] - } - } - if err != null { - abort - } - # Gotrue logs are structured json strings which frontend parses directly. But we keep metadata for consistency. - auth_logs: - type: remap - inputs: - - router.auth - source: |- - parsed, err = parse_json(.event_message) - if err == null { - .metadata.timestamp = parsed.time - .metadata = merge!(.metadata, parsed) - } - # PostgREST logs are structured so we separate timestamp from message using regex - rest_logs: - type: remap - inputs: - - router.rest - source: |- - parsed, err = parse_regex(.event_message, r'^(?P