Merge branch 'canary' into template/discourse

This commit is contained in:
Mauricio Siu
2024-11-22 00:46:01 -06:00
committed by GitHub
20 changed files with 595 additions and 14 deletions

View File

@@ -37,7 +37,7 @@ const appearanceFormSchema = z.object({
theme: z.enum(["light", "dark", "system"], {
required_error: "Please select a theme.",
}),
language: z.enum(["en", "pl", "ru", "zh-Hans"], {
language: z.enum(["en", "pl", "ru", "de", "zh-Hans"], {
required_error: "Please select a language.",
}),
});
@@ -176,6 +176,7 @@ export function AppearanceForm() {
{ label: "English", value: "en" },
{ label: "Polski", value: "pl" },
{ label: "Русский", value: "ru" },
{ label: "Deutsch", value: "de" },
{ label: "简体中文", value: "zh-Hans" },
].map((preset) => (
<SelectItem key={preset.label} value={preset.value}>

View File

@@ -2,7 +2,7 @@
module.exports = {
i18n: {
defaultLocale: "en",
locales: ["en", "pl", "ru", "zh-Hans"],
locales: ["en", "pl", "ru", "de", "zh-Hans"],
localeDetection: false,
},
fallbackLng: "en",

View File

@@ -71,7 +71,7 @@ export default api.withTRPC(
{
i18n: {
defaultLocale: "en",
locales: ["en", "pl", "ru", "zh-Hans"],
locales: ["en", "pl", "ru", "de", "zh-Hans"],
localeDetection: false,
},
fallbackLng: "en",

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1,44 @@
{
"settings.common.save": "Speichern",
"settings.server.domain.title": "Server-Domain",
"settings.server.domain.description": "Füg eine Domain zu deiner Server-Anwendung hinzu.",
"settings.server.domain.form.domain": "Domain",
"settings.server.domain.form.letsEncryptEmail": "Let's Encrypt E-Mail",
"settings.server.domain.form.certificate.label": "Zertifikat",
"settings.server.domain.form.certificate.placeholder": "Wähl ein Zertifikat aus",
"settings.server.domain.form.certificateOptions.none": "Keins",
"settings.server.domain.form.certificateOptions.letsencrypt": "Let's Encrypt (Standard)",
"settings.server.webServer.title": "Web-Server",
"settings.server.webServer.description": "Lade den Web-Server neu oder reinige ihn.",
"settings.server.webServer.actions": "Aktionen",
"settings.server.webServer.reload": "Neu laden",
"settings.server.webServer.watchLogs": "Logs anschauen",
"settings.server.webServer.updateServerIp": "Server-IP Aktualisieren",
"settings.server.webServer.server.label": "Server",
"settings.server.webServer.traefik.label": "Traefik",
"settings.server.webServer.traefik.modifyEnv": "Umgebungsvariablen ändern",
"settings.server.webServer.storage.label": "Speicherplatz",
"settings.server.webServer.storage.cleanUnusedImages": "Nicht genutzte Bilder löschen",
"settings.server.webServer.storage.cleanUnusedVolumes": "Nicht genutzte Volumes löschen",
"settings.server.webServer.storage.cleanStoppedContainers": "Gestoppte Container löschen",
"settings.server.webServer.storage.cleanDockerBuilder": "Docker Builder & System bereinigen",
"settings.server.webServer.storage.cleanMonitoring": "Monitoring bereinigen",
"settings.server.webServer.storage.cleanAll": "Alles bereinigen",
"settings.profile.title": "Konto",
"settings.profile.description": "Ändere die Details deines Profiles hier.",
"settings.profile.email": "E-Mail",
"settings.profile.password": "Passwort",
"settings.profile.avatar": "Avatar",
"settings.appearance.title": "Aussehen",
"settings.appearance.description": "Pass das Design deines Dashboards an.",
"settings.appearance.theme": "Theme",
"settings.appearance.themeDescription": "Wähl ein Theme für dein Dashboard aus",
"settings.appearance.themes.light": "Hell",
"settings.appearance.themes.dark": "Dunkel",
"settings.appearance.themes.system": "System",
"settings.appearance.language": "Sprache",
"settings.appearance.languageDescription": "Wähl eine Sprache für dein Dashboard aus"
}

View File

@@ -0,0 +1,9 @@
<svg width="96" height="96" viewBox="0 0 96 96" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="0.417391" y="0.417391" width="95.1652" height="95.1652" rx="47.5826" fill="white"/>
<rect x="0.417391" y="0.417391" width="95.1652" height="95.1652" rx="47.5826" stroke="#E9EAEC" stroke-width="0.834783"/>
<path d="M45.416 33.5745C50.1219 37.7635 53.9144 42.2526 56.3551 46.4832C60.5471 38.9452 63.3482 29.9879 63.3835 24.2829C63.3835 24.2425 63.3835 24.2057 63.3835 24.1715C63.3835 15.7297 55.0081 12.4443 47.7933 12.4443C40.5786 12.4443 32.2031 15.7297 32.2031 24.1715C32.2031 24.2866 32.2031 24.4409 32.2031 24.627C36.2246 26.4246 40.9914 29.6364 45.416 33.5745Z" fill="#FA2921"/>
<path d="M19.7443 56.5951C22.6855 53.3048 27.1978 49.739 32.2898 46.7243C37.707 43.5185 43.1254 41.2789 47.8812 40.254C42.0463 33.9159 34.4394 28.4693 29.0527 26.673C29.0149 26.6607 28.9796 26.6497 28.9479 26.6387C20.9622 24.0305 15.2661 31.0236 13.0374 37.9225C10.8087 44.8214 11.3275 53.846 19.3132 56.4542C19.4216 56.4897 19.5677 56.5375 19.7443 56.5951Z" fill="#ED79B5"/>
<path d="M82.6341 37.8063C80.4054 30.9074 74.7093 23.9143 66.7236 26.5225C66.614 26.558 66.4679 26.6057 66.2925 26.6633C65.8358 31.0629 64.2708 36.6149 61.9129 42.0627C59.4053 47.8571 56.3301 52.8715 53.082 56.5119C61.5074 58.1919 70.8462 58.1013 76.2536 56.3723C76.2914 56.3601 76.3267 56.3478 76.3583 56.338C84.344 53.7286 84.8629 44.704 82.6341 37.8063Z" fill="#FFB400"/>
<path d="M40.6729 63.3397C39.315 57.1694 38.8704 51.2954 39.3698 46.4316C31.5716 50.0525 24.0694 55.6436 20.7044 60.2392C20.6812 60.271 20.6593 60.3017 20.6398 60.3286C15.7049 67.1589 20.5595 74.7668 26.3968 79.0293C32.2329 83.293 40.9299 85.5853 45.866 78.755C45.9342 78.6619 46.0243 78.537 46.1327 78.3864C43.9295 74.5574 41.9493 69.1402 40.6729 63.3397Z" fill="#1E83F7"/>
<path d="M74.9007 59.8885C70.5979 60.8118 64.8628 61.031 58.9804 60.4591C52.7241 59.8518 47.0317 58.4607 42.584 56.4795C43.5985 65.0547 46.5701 73.9569 49.8767 78.5941C49.8998 78.626 49.9218 78.6566 49.9413 78.6835C54.8761 85.5138 63.5731 83.2215 69.4104 78.9578C75.2466 74.6941 80.1023 67.0862 75.1674 60.2571C75.0992 60.164 75.0091 60.0391 74.9007 59.8885Z" fill="#18C249"/>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 40 40">
<g id="ss11151339769_1">
<path d="M 0 40 L 0 0 L 40 0 L 40 40 Z" fill="transparent"></path>
<path d="M 34.95 0 L 5.05 0 C 2.262 0 0 2.262 0 5.05 L 0 34.95 C 0 37.738 2.262 40 5.05 40 L 34.95 40 C 37.738 40 40 37.738 40 34.95 L 40 5.05 C 40 2.262 37.738 0 34.95 0 Z M 8.021 14.894 C 8.021 12.709 9.794 10.935 11.979 10.935 L 19.6 10.935 C 19.712 10.935 19.815 11.003 19.862 11.106 C 19.909 11.209 19.888 11.329 19.812 11.415 L 18.141 13.229 C 17.85 13.544 17.441 13.726 17.012 13.726 L 12 13.726 C 11.344 13.726 10.812 14.259 10.812 14.915 L 10.812 17.909 C 10.812 18.294 10.5 18.606 10.115 18.606 L 8.721 18.606 C 8.335 18.606 8.024 18.294 8.024 17.909 L 8.024 14.894 Z M 31.729 25.106 C 31.729 27.291 29.956 29.065 27.771 29.065 L 24.532 29.065 C 22.347 29.065 20.574 27.291 20.574 25.106 L 20.574 19.438 C 20.574 19.053 20.718 18.682 20.979 18.397 L 22.868 16.347 C 22.947 16.262 23.071 16.232 23.182 16.274 C 23.291 16.318 23.365 16.421 23.365 16.538 L 23.365 25.088 C 23.365 25.744 23.897 26.276 24.553 26.276 L 27.753 26.276 C 28.409 26.276 28.941 25.744 28.941 25.088 L 28.941 14.915 C 28.941 14.259 28.409 13.726 27.753 13.726 L 24.032 13.726 C 23.606 13.726 23.2 13.906 22.909 14.218 L 11.812 26.276 L 18.479 26.276 C 18.865 26.276 19.176 26.588 19.176 26.974 L 19.176 28.368 C 19.176 28.753 18.865 29.065 18.479 29.065 L 9.494 29.065 C 8.679 29.065 8.018 28.403 8.018 27.588 L 8.018 26.85 C 8.018 26.479 8.156 26.124 8.409 25.85 L 20.85 12.335 C 21.674 11.441 22.829 10.935 24.044 10.935 L 27.768 10.935 C 29.953 10.935 31.726 12.709 31.726 14.894 L 31.726 25.106 Z" fill="rgb(0,0,0)"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -0,0 +1,111 @@
version: "3.9"
services:
immich-server:
image: ghcr.io/immich-app/immich-server:v1.121.0
networks:
- dokploy-network
volumes:
- immich-library:/usr/src/app/upload
- /etc/localtime:/etc/localtime:ro
depends_on:
immich-redis:
condition: service_healthy
immich-database:
condition: service_healthy
environment:
PORT: 2283
SERVER_URL: ${SERVER_URL}
FRONT_BASE_URL: ${FRONT_BASE_URL}
# Database Configuration
DB_HOSTNAME: ${DB_HOSTNAME}
DB_PORT: ${DB_PORT}
DB_USERNAME: ${DB_USERNAME}
DB_PASSWORD: ${DB_PASSWORD}
DB_DATABASE_NAME: ${DB_DATABASE_NAME}
# Redis Configuration
REDIS_HOSTNAME: ${REDIS_HOSTNAME}
REDIS_PORT: ${REDIS_PORT}
REDIS_DBINDEX: ${REDIS_DBINDEX}
# Server Configuration
TZ: ${TZ}
restart: always
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:2283/server-info/ping"]
interval: 30s
timeout: 10s
retries: 3
immich-machine-learning:
image: ghcr.io/immich-app/immich-machine-learning:v1.121.0
networks:
- dokploy-network
volumes:
- immich-model-cache:/cache
environment:
REDIS_HOSTNAME: ${REDIS_HOSTNAME}
REDIS_PORT: ${REDIS_PORT}
REDIS_DBINDEX: ${REDIS_DBINDEX}
restart: always
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3003/ping"]
interval: 30s
timeout: 10s
retries: 3
immich-redis:
image: redis:6.2-alpine
networks:
- dokploy-network
volumes:
- immich-redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
restart: always
immich-database:
image: tensorchord/pgvecto-rs:pg14-v0.2.0
networks:
- dokploy-network
volumes:
- immich-postgres:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_DB: immich
POSTGRES_INITDB_ARGS: '--data-checksums'
healthcheck:
test: pg_isready -U ${DB_USERNAME} -d immich || exit 1
interval: 10s
timeout: 5s
retries: 5
command:
[
'postgres',
'-c',
'shared_preload_libraries=vectors.so',
'-c',
'search_path="$$user", public, vectors',
'-c',
'logging_collector=on',
'-c',
'max_wal_size=2GB',
'-c',
'shared_buffers=512MB',
'-c',
'wal_compression=on',
]
restart: always
networks:
dokploy-network:
external: true
volumes:
immich-model-cache:
immich-postgres:
immich-library:
immich-redis-data:

View File

@@ -0,0 +1,46 @@
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,
};
}

View File

@@ -0,0 +1,39 @@
version: '3.7'
services:
ryot-app:
image: ignisda/ryot:v7.10
networks:
- dokploy-network
environment:
- DATABASE_URL=postgres://postgres:${POSTGRES_PASSWORD}@ryot-db:5432/postgres
- SERVER_ADMIN_ACCESS_TOKEN=${ADMIN_ACCESS_TOKEN}
- TZ=UTC
# Optional: Uncomment and set your pro key if you have one
# - SERVER_PRO_KEY=${SERVER_PRO_KEY}
depends_on:
ryot-db:
condition: service_healthy
restart: always
pull_policy: always
ryot-db:
image: postgres:16-alpine
networks:
- dokploy-network
volumes:
- ryot-postgres-data:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_USER=postgres
- POSTGRES_DB=postgres
- TZ=UTC
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
volumes:
ryot-postgres-data:

View File

@@ -0,0 +1,34 @@
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,
};
}

View File

@@ -1,12 +1,22 @@
version: "3"
services:
soketi:
image: quay.io/soketi/soketi:1.4-16-debian
container_name: soketi
stirling-pdf:
image: frooodle/s-pdf:latest
ports:
- 8080
volumes:
- stirling_pdf_trainingdata:/usr/share/tessdata
- stirling_pdf_extraconfigs:/configs
- stirling_pdf_customfiles:/customFiles/
- stirling_pdf_logs:/logs/
- stirling_pdf_pipeline:/pipeline/
environment:
SOKETI_DEBUG: "1"
SOKETI_HOST: "0.0.0.0"
SOKETI_PORT: "6001"
SOKETI_METRICS_SERVER_PORT: "9601"
restart: unless-stopped
- DOCKER_ENABLE_SECURITY=false
- INSTALL_BOOK_AND_ADVANCED_HTML_OPS=false
- LANGS=en_GB
volumes:
stirling_pdf_trainingdata:
stirling_pdf_extraconfigs:
stirling_pdf_customfiles:
stirling_pdf_logs:
stirling_pdf_pipeline:

View File

@@ -881,5 +881,65 @@ export const templates: TemplateData[] = [
},
tags: ["forum", "community", "discussion"],
load: () => import("./discourse/index").then((m) => m.generate),
},
{
id: "immich",
name: "Immich",
version: "v1.121.0",
description:
"High performance self-hosted photo and video backup solution directly from your mobile phone.",
logo: "immich.svg",
links: {
github: "https://github.com/immich-app/immich",
website: "https://immich.app/",
docs: "https://immich.app/docs/overview/introduction",
},
tags: ["photos", "videos", "backup", "media"],
load: () => import("./immich/index").then((m) => m.generate),
},
{
id: "twenty",
name: "Twenty CRM",
version: "latest",
description:
"Twenty is a modern CRM offering a powerful spreadsheet interface and open-source alternative to Salesforce.",
logo: "twenty.svg",
links: {
github: "https://github.com/twentyhq/twenty",
website: "https://twenty.com",
docs: "https://docs.twenty.com",
},
tags: ["crm", "sales", "business"],
load: () => import("./twenty/index").then((m) => m.generate),
},
{
id: "yourls",
name: "YOURLS",
version: "1.9.2",
description:
"YOURLS (Your Own URL Shortener) is a set of PHP scripts that will allow you to run your own URL shortening service (a la TinyURL or Bitly).",
logo: "yourls.svg",
links: {
github: "https://github.com/YOURLS/YOURLS",
website: "https://yourls.org/",
docs: "https://yourls.org/#documentation",
},
tags: ["url-shortener", "php"],
load: () => import("./yourls/index").then((m) => m.generate),
},
{
id: "ryot",
name: "Ryot",
version: "v7.10",
description:
"A self-hosted platform for tracking various media types including movies, TV shows, video games, books, audiobooks, and more.",
logo: "ryot.png",
links: {
github: "https://github.com/IgnisDa/ryot",
website: "https://ryot.dev/",
docs: "https://ryot.dev/docs/getting-started",
},
tags: ["media", "tracking", "self-hosted"],
load: () => import("./ryot/index").then((m) => m.generate),
},
];

View File

@@ -0,0 +1,104 @@
version: "3.9"
services:
twenty-change-vol-ownership:
image: ubuntu
user: root
networks:
- dokploy-network
volumes:
- twenty-server-local-data:/tmp/server-local-data
- twenty-docker-data:/tmp/docker-data
command: >
bash -c "
chown -R 1000:1000 /tmp/server-local-data
&& chown -R 1000:1000 /tmp/docker-data"
twenty-server:
image: twentycrm/twenty:latest
networks:
- dokploy-network
volumes:
- twenty-server-local-data:/app/packages/twenty-server/${STORAGE_LOCAL_PATH:-.local-storage}
- twenty-docker-data:/app/docker-data
environment:
PORT: 3000
PG_DATABASE_URL: postgres://${DB_USER}:${DB_PASSWORD}@twenty-postgres:5432/twenty
SERVER_URL: https://${TWENTY_HOST}
FRONT_BASE_URL: https://${TWENTY_HOST}
REDIS_URL: redis://twenty-redis:6379
ENABLE_DB_MIGRATIONS: "true"
SIGN_IN_PREFILLED: "true"
STORAGE_TYPE: local
APP_SECRET: ${APP_SECRET}
depends_on:
twenty-change-vol-ownership:
condition: service_completed_successfully
twenty-postgres:
condition: service_healthy
healthcheck:
test: curl --fail http://localhost:3000/healthz
interval: 5s
timeout: 5s
retries: 10
restart: always
twenty-worker:
image: twentycrm/twenty:latest
networks:
- dokploy-network
command: ["yarn", "worker:prod"]
environment:
PG_DATABASE_URL: postgres://${DB_USER}:${DB_PASSWORD}@twenty-postgres:5432/twenty
SERVER_URL: https://${TWENTY_HOST}
FRONT_BASE_URL: https://${TWENTY_HOST}
REDIS_URL: redis://twenty-redis:6379
ENABLE_DB_MIGRATIONS: "false"
STORAGE_TYPE: local
APP_SECRET: ${APP_SECRET}
depends_on:
twenty-postgres:
condition: service_healthy
twenty-server:
condition: service_healthy
restart: always
twenty-postgres:
image: postgres:16-alpine
networks:
- dokploy-network
volumes:
- twenty-postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: twenty
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d twenty"]
interval: 5s
timeout: 5s
retries: 10
restart: always
twenty-redis:
image: redis:latest
networks:
- dokploy-network
volumes:
- twenty-redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 10
restart: always
networks:
dokploy-network:
external: true
volumes:
twenty-docker-data:
twenty-postgres-data:
twenty-server-local-data:
twenty-redis-data:

View File

@@ -0,0 +1,37 @@
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 = "twenty";
const appSecret = generateBase64(32);
const domains: DomainSchema[] = [
{
host: mainDomain,
port: 3000,
serviceName: "twenty-server",
},
];
const envs = [
`TWENTY_HOST=${mainDomain}`,
`DB_USER=${dbUser}`,
`DB_PASSWORD=${dbPassword}`,
`APP_SECRET=${appSecret}`,
"# Optional: Configure storage path",
"# STORAGE_LOCAL_PATH=.local-storage",
];
return {
domains,
envs,
};
}

View File

@@ -0,0 +1,43 @@
version: '3.7'
services:
yourls-app:
image: yourls:1.9.2
networks:
- dokploy-network
environment:
YOURLS_SITE: https://${YOURLS_HOST}
YOURLS_USER: ${YOURLS_ADMIN_USER}
YOURLS_PASS: ${YOURLS_ADMIN_PASSWORD}
YOURLS_DB_HOST: yourls-mysql
YOURLS_DB_USER: yourls
YOURLS_DB_PASS: ${MYSQL_PASSWORD}
YOURLS_DB_NAME: yourls
volumes:
- yourls-data:/var/www/html
depends_on:
yourls-mysql:
condition: service_healthy
restart: always
yourls-mysql:
image: mysql:5.7
networks:
- dokploy-network
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: yourls
MYSQL_USER: yourls
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
volumes:
- yourls-mysql-data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u$$MYSQL_USER", "-p$$MYSQL_PASSWORD"]
interval: 10s
timeout: 5s
retries: 5
restart: always
volumes:
yourls-data:
yourls-mysql-data:

View File

@@ -0,0 +1,35 @@
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 adminPassword = generatePassword();
const domains: DomainSchema[] = [
{
host: mainDomain,
port: 80,
serviceName: "yourls-app",
},
];
const envs = [
`YOURLS_HOST=${mainDomain}`,
"YOURLS_ADMIN_USER=admin",
`YOURLS_ADMIN_PASSWORD=${adminPassword}`,
`MYSQL_PASSWORD=${mysqlPassword}`,
`MYSQL_ROOT_PASSWORD=${mysqlRootPassword}`,
];
return {
domains,
envs,
};
}

View File

@@ -1,6 +1,6 @@
import Cookies from "js-cookie";
const SUPPORTED_LOCALES = ["en", "pl", "ru", "zh-Hans"] as const;
const SUPPORTED_LOCALES = ["en", "pl", "ru", "de", "zh-Hans"] as const;
type Locale = (typeof SUPPORTED_LOCALES)[number];