mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
Merge pull request #1321 from drudge/templates/outline
feat(template): add outline
This commit is contained in:
57
apps/dokploy/templates/outline/docker-compose.yml
Normal file
57
apps/dokploy/templates/outline/docker-compose.yml
Normal file
@@ -0,0 +1,57 @@
|
||||
services:
|
||||
outline:
|
||||
image: outlinewiki/outline:0.81.0
|
||||
restart: always
|
||||
depends_on:
|
||||
- postgres
|
||||
- redis
|
||||
- dex
|
||||
ports:
|
||||
- 3000
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
URL: ${URL}
|
||||
FORCE_HTTPS: 'false'
|
||||
SECRET_KEY: ${SECRET_KEY}
|
||||
UTILS_SECRET: ${UTILS_SECRET}
|
||||
DATABASE_URL: postgres://outline:${POSTGRES_PASSWORD}@postgres:5432/outline
|
||||
PGSSLMODE: disable
|
||||
REDIS_URL: redis://redis:6379
|
||||
OIDC_CLIENT_ID: outline
|
||||
OIDC_CLIENT_SECRET: ${CLIENT_SECRET}
|
||||
OIDC_AUTH_URI: ${DEX_URL}/auth
|
||||
OIDC_TOKEN_URI: ${DEX_URL}/token
|
||||
OIDC_USERINFO_URI: ${DEX_URL}/userinfo
|
||||
|
||||
dex:
|
||||
image: ghcr.io/dexidp/dex:v2.37.0
|
||||
restart: always
|
||||
volumes:
|
||||
- ../files/etc/dex/config.yaml:/etc/dex/config.yaml
|
||||
command:
|
||||
- dex
|
||||
- serve
|
||||
- /etc/dex/config.yaml
|
||||
ports:
|
||||
- 5556
|
||||
|
||||
postgres:
|
||||
image: postgres:15
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_DB: outline
|
||||
POSTGRES_USER: outline
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
volumes:
|
||||
- postgres_data-test-outline-khufpx:/var/lib/postgresql/data
|
||||
|
||||
redis:
|
||||
image: redis:latest
|
||||
restart: always
|
||||
command: redis-server --appendonly yes
|
||||
volumes:
|
||||
- redis_data-test-outline-khufpx:/data
|
||||
|
||||
volumes:
|
||||
postgres_data-test-outline-khufpx:
|
||||
redis_data-test-outline-khufpx:
|
||||
90
apps/dokploy/templates/outline/index.ts
Normal file
90
apps/dokploy/templates/outline/index.ts
Normal file
@@ -0,0 +1,90 @@
|
||||
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,
|
||||
};
|
||||
}
|
||||
@@ -1,6 +1,21 @@
|
||||
import type { TemplateData } from "./types/templates-data.type";
|
||||
|
||||
export const templates: TemplateData[] = [
|
||||
{
|
||||
id: "outline",
|
||||
name: "Outline",
|
||||
version: "0.81.0",
|
||||
description:
|
||||
"Outline is a self-hosted knowledge base and documentation platform that allows you to build and manage your own knowledge base applications.",
|
||||
links: {
|
||||
github: "https://github.com/outline/outline",
|
||||
website: "https://outline.com/",
|
||||
docs: "https://docs.outline.com/",
|
||||
},
|
||||
logo: "outline.svg",
|
||||
load: () => import("./outline/index").then((m) => m.generate),
|
||||
tags: ["documentation", "knowledge-base", "self-hosted"],
|
||||
},
|
||||
{
|
||||
id: "supabase",
|
||||
name: "SupaBase",
|
||||
|
||||
Reference in New Issue
Block a user