From bbef99c3c258eb163157f39e96f4e6320404e90b Mon Sep 17 00:00:00 2001 From: sashagoncharov19 <0976053529@ukr.net> Date: Sun, 27 Oct 2024 20:49:29 +0000 Subject: [PATCH] feat: hi.events template --- apps/dokploy/public/templates/hi-events.svg | 39 ++++++++++++++++ .../templates/hi-events/docker-compose.yml | 45 +++++++++++++++++++ apps/dokploy/templates/hi-events/index.ts | 41 +++++++++++++++++ apps/dokploy/templates/templates.ts | 15 +++++++ 4 files changed, 140 insertions(+) create mode 100644 apps/dokploy/public/templates/hi-events.svg create mode 100644 apps/dokploy/templates/hi-events/docker-compose.yml create mode 100644 apps/dokploy/templates/hi-events/index.ts diff --git a/apps/dokploy/public/templates/hi-events.svg b/apps/dokploy/public/templates/hi-events.svg new file mode 100644 index 00000000..0e373509 --- /dev/null +++ b/apps/dokploy/public/templates/hi-events.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/apps/dokploy/templates/hi-events/docker-compose.yml b/apps/dokploy/templates/hi-events/docker-compose.yml new file mode 100644 index 00000000..0ce5b7e7 --- /dev/null +++ b/apps/dokploy/templates/hi-events/docker-compose.yml @@ -0,0 +1,45 @@ +services: + all-in-one: + image: daveearley/hi.events-all-in-one:v0.8.0-beta.1 + restart: always + environment: + - VITE_FRONTEND_URL=https://${DOMAIN} + - APP_FRONTEND_URL=https://${DOMAIN} + - VITE_API_URL_CLIENT=https://${DOMAIN}/api + - VITE_API_URL_SERVER=http://localhost:80/api + - VITE_STRIPE_PUBLISHABLE_KEY + - LOG_CHANNEL=stderr + - QUEUE_CONNECTION=sync + - MAIL_MAILER=array + - APP_KEY + - JWT_SECRET + - FILESYSTEM_PUBLIC_DISK=public + - FILESYSTEM_PRIVATE_DISK=local + - APP_CDN_URL=https://${DOMAIN}/storage + - DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB} + - MAIL_MAILER + - MAIL_HOST + - MAIL_PORT + - MAIL_FROM_ADDRESS + - MAIL_FROM_NAME + depends_on: + - postgres + + postgres: + image: elestio/postgres:16 + restart: always + networks: + - dokploy-network + environment: + - POSTGRES_DB + - POSTGRES_USER + - POSTGRES_PASSWORD + volumes: + - pg_hi-events_data:/var/lib/postgresql/data + +networks: + dokploy-network: + external: true + +volumes: + pg_hi-events_data: \ No newline at end of file diff --git a/apps/dokploy/templates/hi-events/index.ts b/apps/dokploy/templates/hi-events/index.ts new file mode 100644 index 00000000..f799bb73 --- /dev/null +++ b/apps/dokploy/templates/hi-events/index.ts @@ -0,0 +1,41 @@ +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/apps/dokploy/templates/templates.ts b/apps/dokploy/templates/templates.ts index c3a8d718..7f024d6b 100644 --- a/apps/dokploy/templates/templates.ts +++ b/apps/dokploy/templates/templates.ts @@ -616,4 +616,19 @@ export const templates: TemplateData[] = [ tags: ["open-source"], load: () => import("./vaultwarden/index").then((m) => m.generate), }, + { + id: "hi-events", + name: "Hi.events", + version: "0.8.0-beta.1", + description: + "Hi.Events is a self-hosted event management and ticket selling platform that allows you to create, manage and promote events easily.", + logo: "hi-events.svg", + links: { + github: "https://github.com/HiEventsDev/hi.events", + website: "https://hi.events/", + docs: "https://hi.events/docs", + }, + tags: ["self-hosted", "open-source", "manager"], + load: () => import("./hi-events/index").then((m) => m.generate), + }, ];