mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
Merge pull request #739 from DrMxrcy/template/discourse
feat(add): Discourse
This commit is contained in:
8
apps/dokploy/public/templates/discourse.svg
Normal file
8
apps/dokploy/public/templates/discourse.svg
Normal file
@@ -0,0 +1,8 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -1 104 106">
|
||||
<path fill="#231f20" d="M51.87 0C23.71 0 0 22.83 0 51v52.81l51.86-.05c28.16 0 51-23.71 51-51.87S80 0 51.87 0Z"/>
|
||||
<path fill="#fff9ae" d="M52.37 19.74a31.62 31.62 0 0 0-27.79 46.67l-5.72 18.4 20.54-4.64a31.61 31.61 0 1 0 13-60.43Z"/>
|
||||
<path fill="#00aeef" d="M77.45 32.12a31.6 31.6 0 0 1-38.05 48l-20.54 4.7 20.91-2.47a31.6 31.6 0 0 0 37.68-50.23Z"/>
|
||||
<path fill="#00a94f" d="M71.63 26.29A31.6 31.6 0 0 1 38.8 78l-19.94 6.82 20.54-4.65a31.6 31.6 0 0 0 32.23-53.88Z"/>
|
||||
<path fill="#f15d22" d="M26.47 67.11a31.61 31.61 0 0 1 51-35 31.61 31.61 0 0 0-52.89 34.3l-5.72 18.4Z"/>
|
||||
<path fill="#e31b23" d="M24.58 66.41a31.61 31.61 0 0 1 47.05-40.12 31.61 31.61 0 0 0-49 39.63l-3.76 18.9Z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 761 B |
94
apps/dokploy/templates/discourse/docker-compose.yml
Normal file
94
apps/dokploy/templates/discourse/docker-compose.yml
Normal file
@@ -0,0 +1,94 @@
|
||||
version: '3.7'
|
||||
|
||||
services:
|
||||
discourse-db:
|
||||
image: docker.io/bitnami/postgresql:17
|
||||
networks:
|
||||
- dokploy-network
|
||||
volumes:
|
||||
- discourse-postgresql-data:/bitnami/postgresql
|
||||
environment:
|
||||
POSTGRESQL_USERNAME: bn_discourse
|
||||
POSTGRESQL_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
POSTGRESQL_DATABASE: bitnami_discourse
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U bn_discourse -d bitnami_discourse"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
restart: unless-stopped
|
||||
|
||||
discourse-redis:
|
||||
image: docker.io/bitnami/redis:7.4
|
||||
networks:
|
||||
- dokploy-network
|
||||
volumes:
|
||||
- discourse-redis-data:/bitnami/redis
|
||||
environment:
|
||||
REDIS_PASSWORD: ${REDIS_PASSWORD}
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD}", "ping"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
restart: unless-stopped
|
||||
|
||||
discourse-app:
|
||||
image: docker.io/bitnami/discourse:3.3.2
|
||||
networks:
|
||||
- dokploy-network
|
||||
volumes:
|
||||
- discourse-data:/bitnami/discourse
|
||||
depends_on:
|
||||
discourse-db:
|
||||
condition: service_healthy
|
||||
discourse-redis:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
DISCOURSE_HOST: ${DISCOURSE_HOST}
|
||||
DISCOURSE_DATABASE_HOST: discourse-db
|
||||
DISCOURSE_DATABASE_PORT_NUMBER: 5432
|
||||
DISCOURSE_DATABASE_USER: bn_discourse
|
||||
DISCOURSE_DATABASE_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
DISCOURSE_DATABASE_NAME: bitnami_discourse
|
||||
DISCOURSE_REDIS_HOST: discourse-redis
|
||||
DISCOURSE_REDIS_PORT_NUMBER: 6379
|
||||
DISCOURSE_REDIS_PASSWORD: ${REDIS_PASSWORD}
|
||||
# Optional: Configure SMTP for email delivery
|
||||
# DISCOURSE_SMTP_HOST: ${SMTP_HOST}
|
||||
# DISCOURSE_SMTP_PORT: ${SMTP_PORT}
|
||||
# DISCOURSE_SMTP_USER: ${SMTP_USER}
|
||||
# DISCOURSE_SMTP_PASSWORD: ${SMTP_PASSWORD}
|
||||
restart: unless-stopped
|
||||
|
||||
discourse-sidekiq:
|
||||
image: docker.io/bitnami/discourse:3.3.2
|
||||
networks:
|
||||
- dokploy-network
|
||||
volumes:
|
||||
- discourse-sidekiq-data:/bitnami/discourse
|
||||
depends_on:
|
||||
- discourse-app
|
||||
command: /opt/bitnami/scripts/discourse-sidekiq/run.sh
|
||||
environment:
|
||||
DISCOURSE_HOST: ${DISCOURSE_HOST}
|
||||
DISCOURSE_DATABASE_HOST: discourse-db
|
||||
DISCOURSE_DATABASE_PORT_NUMBER: 5432
|
||||
DISCOURSE_DATABASE_USER: bn_discourse
|
||||
DISCOURSE_DATABASE_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
DISCOURSE_DATABASE_NAME: bitnami_discourse
|
||||
DISCOURSE_REDIS_HOST: discourse-redis
|
||||
DISCOURSE_REDIS_PORT_NUMBER: 6379
|
||||
DISCOURSE_REDIS_PASSWORD: ${REDIS_PASSWORD}
|
||||
# Optional: Configure SMTP for email delivery
|
||||
# DISCOURSE_SMTP_HOST: ${SMTP_HOST}
|
||||
# DISCOURSE_SMTP_PORT: ${SMTP_PORT}
|
||||
# DISCOURSE_SMTP_USER: ${SMTP_USER}
|
||||
# DISCOURSE_SMTP_PASSWORD: ${SMTP_PASSWORD}
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
discourse-postgresql-data:
|
||||
discourse-redis-data:
|
||||
discourse-data:
|
||||
discourse-sidekiq-data:
|
||||
37
apps/dokploy/templates/discourse/index.ts
Normal file
37
apps/dokploy/templates/discourse/index.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
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,
|
||||
};
|
||||
}
|
||||
@@ -868,6 +868,21 @@ export const templates: TemplateData[] = [
|
||||
load: () => import("./chatwoot/index").then((m) => m.generate),
|
||||
},
|
||||
{
|
||||
id: "discourse",
|
||||
name: "Discourse",
|
||||
version: "3.3.2",
|
||||
description:
|
||||
"Discourse is a modern forum software for your community. Use it as a mailing list, discussion forum, or long-form chat room.",
|
||||
logo: "discourse.svg",
|
||||
links: {
|
||||
github: "https://github.com/discourse/discourse",
|
||||
website: "https://www.discourse.org/",
|
||||
docs: "https://meta.discourse.org/",
|
||||
},
|
||||
tags: ["forum", "community", "discussion"],
|
||||
load: () => import("./discourse/index").then((m) => m.generate),
|
||||
},
|
||||
{
|
||||
id: "immich",
|
||||
name: "Immich",
|
||||
version: "v1.121.0",
|
||||
|
||||
Reference in New Issue
Block a user