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: Pupilfirst #447

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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Binary file added templates/pupilfirst/assets/logo.png
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/pupilfirst/assets/screenshot.png
Copy link
Collaborator

Choose a reason for hiding this comment

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

2 or more screenshots would be appreciated, not required!

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 53 additions & 0 deletions templates/pupilfirst/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import {
Output,
randomPassword,
randomString,
Services,
} from "~templates-utils";
import { Input } from "./meta";

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

services.push({
type: "app",
data: {
projectName: input.projectName,
serviceName: input.appServiceName,
env: [
`SECRET_KEY_BASE=${secretkey}`,
`RAILS_ENV=production`,
`RAILS_LOG_TO_STDOUT=true`,
`RAILS_SERVE_STATIC_FILES=true`,
`ASSET_HOST=$(PRIMARY_DOMAIN)`,
`DATABASE_URL=postgres://postgres:${databasePassword}@$(PROJECT_NAME)_${input.databaseServiceName}:5432/$(PROJECT_NAME)`,
`DEFAULT_SENDER_EMAIL_ADDRESS=${input.defaultSenderEmail}`,
`I18N_AVAILABLE_LOCALES=${input.avaliableLanguage}`,
`I18N_DEFAULT_LOCALE=${input.defaultLanguage}`,
].join("\n"),
source: {
type: "image",
image: input.appServiceImage,
},
domains: [
{
host: "$(EASYPANEL_DOMAIN)",
port: 3000,
},
],
},
});

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

return { services };
}
53 changes: 53 additions & 0 deletions templates/pupilfirst/meta.yaml
matbrgz marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Pupilfirst
description: Pupilfirst LMS is a learning management system (LMS) designed to facilitate online education and training. An LMS is a software application that enables the creation, delivery, management, and tracking of educational content and resources. Pupilfirst LMS is specifically tailored for educational institutions, organizations, and businesses looking to offer courses, training programs, or other learning experiences in a digital format.
instructions: null
changeLog:
- date: 2023-9-21
description: first release
links:
- label: Website
url: https://www.pupilfirst.org/
- label: Documentation
url: https://docs.pupilfirst.com/
- label: Github
url: https://github.com/pupilfirst/pupilfirst
contributors:
- name: matbrgz
url: https://github.com/matbrgz
schema:
type: object
required:
- projectName
- appServiceName
- appServiceImage
- databaseServiceName
properties:
projectName:
type: string
title: Project Name
appServiceName:
type: string
title: App Service Name
default: pupilfirst
appServiceImage:
type: string
title: App Service Image
default: pupilfirst/pupilfirst:2023.4
databaseServiceName:
type: string
title: Database Service Name
default: pupilfirst-db
defaultSenderEmail:
type: string
title: Default Sender Email
default: hello@pupilfirst.com
avaliableLanguage:
type: string
title: Avaliable Languages (e.g. en, pt-br)
default: en
defaultLanguage:
type: string
title: Default Language (e.g. en)
default: en
tags:
- Learning Management System