Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: Plane *WIP* #453

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions templates/plane/assets/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added templates/plane/assets/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
255 changes: 255 additions & 0 deletions templates/plane/index.ts
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make the default username and password configurable.
Also, good luck! I spent a month trying to get this to work.

Original file line number Diff line number Diff line change
@@ -0,0 +1,255 @@
import {
Output,
randomPassword,
randomString,
Services,
} from "~templates-utils";
import { Input } from "./meta";

export function generate(input: Input): Output {
const services: Services = [];
const secretkey = randomString(32);
const randomPasswordRedis = randomPassword();
const databasePassword = randomPassword();
const minioPassword = randomPassword();

services.push({
type: "app",
data: {
projectName: input.projectName,
serviceName: input.appFrontendServiceName,
env: [
`NODE_ENV=production`,
`NEXT_PUBLIC_EXTRA_IMAGE_DOMAINS=`,
`NEXT_PUBLIC_GOOGLE_CLIENTID=""`,
`NEXT_PUBLIC_GITHUB_ID=""`,
`NEXT_PUBLIC_GITHUB_APP_NAME=""`,
`NEXT_PUBLIC_SENTRY_DSN=""`,
`NEXT_PUBLIC_ENABLE_OAUTH=0`,
`NEXT_PUBLIC_ENABLE_SENTRY=0`,
`NEXT_PUBLIC_ENABLE_SESSION_RECORDER=0`,
`NEXT_PUBLIC_TRACK_EVENTS=0`,
`NEXT_PUBLIC_SLACK_CLIENT_ID=""`,
`DEBUG=0`,
`SENTRY_DSN=""`,
`DATABASE_URL=postgres://postgres:${databasePassword}@$(PROJECT_NAME)_${input.databaseServiceName}:5432/$(PROJECT_NAME)`,
`REDIS_URL="redis://${input.databaseServiceName}:6379/"`,
`EMAIL_HOST=""`,
`EMAIL_HOST_USER=""`,
`EMAIL_HOST_PASSWORD=""`,
`EMAIL_PORT=587`,
`EMAIL_FROM="Team Plane <[email protected]>"`,
`EMAIL_USE_TLS="1"`,
`EMAIL_USE_SSL="0"`,
`AWS_S3_BUCKET_NAME="uploads"`,
`FILE_SIZE_LIMIT=5242880`,
`OPENAI_API_KEY=""`,
`GPT_ENGINE=""`,
`GITHUB_CLIENT_SECRET=`,
`DOCKERIZED=1`,
`USE_MINIO=1`,
`NGINX_PORT=80`,
`DEFAULT_EMAIL="[email protected]"`,
`DEFAULT_PASSWORD="password123"`,
`ENABLE_SIGNUP="1"`,
`NEXT_PUBLIC_API_BASE_URL=https://$(PRIMARY_DOMAIN)`,
`SECRET_KEY=${secretkey}`,
`WEB_URL=https://$(PRIMARY_DOMAIN)`,
].join("\n"),
source: {
type: "image",
image: input.appFrontendServiceName,
},
domains: [
{
host: "$(EASYPANEL_DOMAIN)",
port: 3000,
},
],
mounts: [
{
type: "volume",
name: "data",
mountPath: "/data/storage",
},
{
type: "volume",
name: "app",
mountPath: "/app/storage",
},
],
},
});

services.push({
type: "app",
data: {
projectName: input.projectName,
serviceName: input.appBackendServiceName,
env: [
`NODE_ENV=production`,
`NEXT_PUBLIC_EXTRA_IMAGE_DOMAINS=`,
`NEXT_PUBLIC_GOOGLE_CLIENTID=""`,
`NEXT_PUBLIC_GITHUB_ID=""`,
`NEXT_PUBLIC_GITHUB_APP_NAME=""`,
`NEXT_PUBLIC_SENTRY_DSN=""`,
`NEXT_PUBLIC_ENABLE_OAUTH=0`,
`NEXT_PUBLIC_ENABLE_SENTRY=0`,
`NEXT_PUBLIC_ENABLE_SESSION_RECORDER=0`,
`NEXT_PUBLIC_TRACK_EVENTS=0`,
`NEXT_PUBLIC_SLACK_CLIENT_ID=""`,
`DEBUG=0`,
`SENTRY_DSN=""`,
`DATABASE_URL=postgres://postgres:${databasePassword}@$(PROJECT_NAME)_${input.databaseServiceName}:5432/$(PROJECT_NAME)`,
`REDIS_URL="redis://${input.databaseServiceName}:6379/"`,
`EMAIL_HOST=""`,
`EMAIL_HOST_USER=""`,
`EMAIL_HOST_PASSWORD=""`,
`EMAIL_PORT=587`,
`EMAIL_FROM="Team Plane <[email protected]>"`,
`EMAIL_USE_TLS="1"`,
`EMAIL_USE_SSL="0"`,
`AWS_S3_BUCKET_NAME="uploads"`,
`FILE_SIZE_LIMIT=5242880`,
`OPENAI_API_KEY=""`,
`GPT_ENGINE=""`,
`GITHUB_CLIENT_SECRET=`,
`DOCKERIZED=1`,
`USE_MINIO=1`,
`NGINX_PORT=80`,
`DEFAULT_EMAIL="[email protected]"`,
`DEFAULT_PASSWORD="password123"`,
`ENABLE_SIGNUP="1"`,
`NEXT_PUBLIC_API_BASE_URL=https://$(PRIMARY_DOMAIN)`,
`SECRET_KEY=${secretkey}`,
`WEB_URL=https://$(PRIMARY_DOMAIN)`,
].join("\n"),
source: {
type: "image",
image: input.appBackendServiceName,
},
domains: [
{
host: "$(EASYPANEL_DOMAIN)",
port: 3000,
},
],
mounts: [
{
type: "volume",
name: "data",
mountPath: "/data/storage",
},
{
type: "volume",
name: "app",
mountPath: "/app/storage",
},
],
},
});

services.push({
type: "app",
data: {
projectName: input.projectName,
serviceName: input.appWorkerServiceName,
env: [
`NODE_ENV=production`,
`NEXT_PUBLIC_EXTRA_IMAGE_DOMAINS=`,
`NEXT_PUBLIC_GOOGLE_CLIENTID=""`,
`NEXT_PUBLIC_GITHUB_ID=""`,
`NEXT_PUBLIC_GITHUB_APP_NAME=""`,
`NEXT_PUBLIC_SENTRY_DSN=""`,
`NEXT_PUBLIC_ENABLE_OAUTH=0`,
`NEXT_PUBLIC_ENABLE_SENTRY=0`,
`NEXT_PUBLIC_ENABLE_SESSION_RECORDER=0`,
`NEXT_PUBLIC_TRACK_EVENTS=0`,
`NEXT_PUBLIC_SLACK_CLIENT_ID=""`,
`DEBUG=0`,
`SENTRY_DSN=""`,
`DATABASE_URL=postgres://postgres:${databasePassword}@$(PROJECT_NAME)_${input.databaseServiceName}:5432/$(PROJECT_NAME)`,
`REDIS_URL="redis://${input.databaseServiceName}:6379/"`,
`EMAIL_HOST=""`,
`EMAIL_HOST_USER=""`,
`EMAIL_HOST_PASSWORD=""`,
`EMAIL_PORT=587`,
`EMAIL_FROM="Team Plane <[email protected]>"`,
`EMAIL_USE_TLS="1"`,
`EMAIL_USE_SSL="0"`,
`AWS_S3_BUCKET_NAME="uploads"`,
`FILE_SIZE_LIMIT=5242880`,
`OPENAI_API_KEY=""`,
`GPT_ENGINE=""`,
`GITHUB_CLIENT_SECRET=`,
`DOCKERIZED=1`,
`USE_MINIO=1`,
`NGINX_PORT=80`,
`DEFAULT_EMAIL="[email protected]"`,
`DEFAULT_PASSWORD="password123"`,
`ENABLE_SIGNUP="1"`,
`NEXT_PUBLIC_API_BASE_URL=https://$(PRIMARY_DOMAIN)`,
`SECRET_KEY=${secretkey}`,
`WEB_URL=https://$(PRIMARY_DOMAIN)`,
].join("\n"),
source: {
type: "image",
image: input.appWorkerServiceImage,
},
domains: [
{
host: "$(EASYPANEL_DOMAIN)",
port: 3000,
},
],
mounts: [
{
type: "volume",
name: "data",
mountPath: "/data/storage",
},
{
type: "volume",
name: "app",
mountPath: "/app/storage",
},
],
},
});

services.push({
type: "redis",
data: {
projectName: input.projectName,
serviceName: input.redisServiceName,
image: "redis:6.2.7",
password: randomPasswordRedis,
},
});

services.push({
type: "postgres",
data: {
projectName: input.projectName,
serviceName: input.databaseServiceName,
image: "postgres:15.2",
password: randomPasswordPostgres,
},
});

services.push({
type: "app",
data: {
projectName: input.projectName,
serviceName: input.storageServiceName,
source: { type: "image", image: input.storageServiceImage },
domains: [{ host: "$(EASYPANEL_DOMAIN)", port: 9001 }],
mounts: [{ type: "volume", name: "data", mountPath: "/data" }],
env: [
`MINIO_ROOT_USER=minio`,
`MINIO_ROOT_PASSWORD=${minioPassword}`,
].join("\n"),
},
});
return { services };
}
51 changes: 51 additions & 0 deletions templates/plane/meta.yaml
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminder to change this - makeplane/plane on docker hub for the image (check tags, don't pin latest)

Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Plane
description: Plane is a modern collaborative platform designed to streamline project management and task organization for teams of all sizes. It offers a range of features tailored to enhance productivity, facilitate effective communication, and ensure seamless coordination within projects.
instructions: null
changeLog:
- date: 2023-9-21
description: first release
links:
- label: Website
url: https://plane.so/
- label: Documentation
url: https://docs.plane.so/
- label: Github
url: https://github.com/makeplane/plane
contributors:
- name: matbrgz
url: https://github.com/matbrgz
schema:
type: object
required:
- projectName
- defaultLocale
- appServiceName
- appServiceImage
- databaseServiceName
- redisServiceName
properties:
projectName:
type: string
title: Project Name
appServiceImage:
type: string
title: App Service Image
default: electerious/ackee:3.4.2
defaultLocale:
type: string
title: Default Locale
default: en
appServiceName:
type: string
title: App Service Name
default: plane
databaseServiceName:
type: string
title: Database Service Name
default: plane-db
redisServiceName:
type: string
title: Redis Service Name
default: plane-redis
tags:
- Project Management