feat: remove enterprise, doesn't compy with AGPL3
This commit is contained in:
parent
45f0957e17
commit
7ecc5e3362
|
|
@ -1,106 +0,0 @@
|
|||
---
|
||||
name: "Build Containers Enterprise"
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build-containers-common:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
containerver: ${{ steps.getcontainerver.outputs.containerver }}
|
||||
steps:
|
||||
- name: Get Container Version
|
||||
id: getcontainerver
|
||||
run: |
|
||||
echo "containerver=${{ github.ref_name }}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
build-containers:
|
||||
needs: build-containers-common
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- runnertags: ubuntu-latest
|
||||
arch: amd64
|
||||
- runnertags: ubuntu-latest
|
||||
arch: arm64
|
||||
|
||||
runs-on: ${{ matrix.runnertags }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: 'true'
|
||||
token: ${{ secrets.PAT_TOKEN }}
|
||||
|
||||
- name: Set up QEMU (For ARM64 Builds)
|
||||
if: matrix.arch == 'arm64'
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to ghcr
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ github.token }}
|
||||
|
||||
- name: Build and Push Image
|
||||
env:
|
||||
CONTAINERVER: ${{ needs.build-containers-common.outputs.containerver }}
|
||||
run: |
|
||||
docker buildx build --platform linux/${{ matrix.arch }} \
|
||||
-f Dockerfile.dev \
|
||||
-t ghcr.io/gitroomhq/postiz-app-enterprise:${{ env.CONTAINERVER }}-${{ matrix.arch }} \
|
||||
--provenance=false --sbom=false \
|
||||
--output "type=registry,name=ghcr.io/gitroomhq/postiz-app-enterprise:${{ env.CONTAINERVER }}-${{ matrix.arch }}" .
|
||||
|
||||
build-container-manifest:
|
||||
needs: [build-containers, build-containers-common]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Login to ghcr
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ github.token }}
|
||||
|
||||
- name: Create Docker Manifest
|
||||
env:
|
||||
CONTAINERVER: ${{ needs.build-containers-common.outputs.containerver }}
|
||||
run: |
|
||||
# Verify the architecture images
|
||||
echo "Verifying AMD64 image:"
|
||||
docker buildx imagetools inspect ghcr.io/gitroomhq/postiz-app-enterprise:${{ env.CONTAINERVER }}-amd64
|
||||
|
||||
echo "Verifying ARM64 image:"
|
||||
docker buildx imagetools inspect ghcr.io/gitroomhq/postiz-app-enterprise:${{ env.CONTAINERVER }}-arm64
|
||||
|
||||
# Try to remove any existing manifests first
|
||||
docker manifest rm ghcr.io/gitroomhq/postiz-app-enterprise:${{ env.CONTAINERVER }} || true
|
||||
docker manifest rm ghcr.io/gitroomhq/postiz-app-enterprise:latest || true
|
||||
|
||||
# Create and push the version-specific manifest
|
||||
docker manifest create ghcr.io/gitroomhq/postiz-app-enterprise:${{ env.CONTAINERVER }} \
|
||||
--amend ghcr.io/gitroomhq/postiz-app-enterprise:${{ env.CONTAINERVER }}-amd64 \
|
||||
--amend ghcr.io/gitroomhq/postiz-app-enterprise:${{ env.CONTAINERVER }}-arm64
|
||||
|
||||
docker manifest push ghcr.io/gitroomhq/postiz-app-enterprise:${{ env.CONTAINERVER }}
|
||||
|
||||
# Create and push the latest manifest
|
||||
docker manifest create ghcr.io/gitroomhq/postiz-app-enterprise:latest \
|
||||
--amend ghcr.io/gitroomhq/postiz-app-enterprise:${{ env.CONTAINERVER }}-amd64 \
|
||||
--amend ghcr.io/gitroomhq/postiz-app-enterprise:${{ env.CONTAINERVER }}-arm64
|
||||
|
||||
docker manifest push ghcr.io/gitroomhq/postiz-app-enterprise:latest
|
||||
|
||||
- name: Verify Manifest
|
||||
run: |
|
||||
docker manifest inspect ghcr.io/gitroomhq/postiz-app-enterprise:latest
|
||||
|
|
@ -1,11 +1,9 @@
|
|||
import { Global, Module } from '@nestjs/common';
|
||||
|
||||
import { DatabaseModule } from '@gitroom/nestjs-libraries/database/prisma/database.module';
|
||||
import { ApiModule } from '@gitroom/backend/api/api.module';
|
||||
import { APP_GUARD } from '@nestjs/core';
|
||||
import { PoliciesGuard } from '@gitroom/backend/services/auth/permissions/permissions.guard';
|
||||
import { BullMqModule } from '@gitroom/nestjs-libraries/bull-mq-transport-new/bull.mq.module';
|
||||
import { PluginModule } from '@gitroom/plugins/plugin.module';
|
||||
import { PublicApiModule } from '@gitroom/backend/public-api/public.api.module';
|
||||
import { ThrottlerBehindProxyGuard } from '@gitroom/nestjs-libraries/throttler/throttler.provider';
|
||||
import { ThrottlerModule } from '@nestjs/throttler';
|
||||
|
|
@ -20,7 +18,6 @@ import { VideoModule } from '@gitroom/nestjs-libraries/videos/video.module';
|
|||
BullMqModule,
|
||||
DatabaseModule,
|
||||
ApiModule,
|
||||
PluginModule,
|
||||
PublicApiModule,
|
||||
AgentModule,
|
||||
McpModule,
|
||||
|
|
@ -48,7 +45,6 @@ import { VideoModule } from '@gitroom/nestjs-libraries/videos/video.module';
|
|||
BullMqModule,
|
||||
DatabaseModule,
|
||||
ApiModule,
|
||||
PluginModule,
|
||||
PublicApiModule,
|
||||
AgentModule,
|
||||
McpModule,
|
||||
|
|
|
|||
|
|
@ -1,81 +0,0 @@
|
|||
const { readdirSync, statSync, writeFileSync, existsSync } = require('fs');
|
||||
const { join } = require('path');
|
||||
|
||||
function isNonEmptyFolder(folderPath) {
|
||||
const items = readdirSync(folderPath);
|
||||
// Check if there are any items in the folder
|
||||
return items.some((item) => {
|
||||
const fullPath = join(folderPath, item);
|
||||
// Check if the item is a file or a non-empty directory
|
||||
const stats = statSync(fullPath);
|
||||
if (stats.isDirectory()) {
|
||||
return isNonEmptyFolder(fullPath); // Recursively check subfolders
|
||||
}
|
||||
return true; // It's a file
|
||||
});
|
||||
}
|
||||
|
||||
// Function to get all non-empty folders
|
||||
function getNonEmptyFolders(rootFolder) {
|
||||
const result = [];
|
||||
if (!existsSync(rootFolder)) {
|
||||
return result;
|
||||
}
|
||||
|
||||
const items = readdirSync(rootFolder);
|
||||
|
||||
items.forEach((item) => {
|
||||
const fullPath = join(rootFolder, item);
|
||||
const stats = statSync(fullPath);
|
||||
if (stats.isDirectory() && isNonEmptyFolder(fullPath)) {
|
||||
result.push(item);
|
||||
}
|
||||
});
|
||||
|
||||
return result;
|
||||
}
|
||||
const abc = [
|
||||
'a',
|
||||
'b',
|
||||
'c',
|
||||
'd',
|
||||
'e',
|
||||
'f',
|
||||
'g',
|
||||
'h',
|
||||
'i',
|
||||
'j',
|
||||
'k',
|
||||
'l',
|
||||
'm',
|
||||
'n',
|
||||
'o',
|
||||
'p',
|
||||
'q',
|
||||
'r',
|
||||
's',
|
||||
't',
|
||||
'u',
|
||||
'v',
|
||||
'w',
|
||||
'x',
|
||||
'y',
|
||||
'z',
|
||||
];
|
||||
const list = getNonEmptyFolders('./libraries/plugins/src/list');
|
||||
const fileContent = `${list
|
||||
.map((p, index) => {
|
||||
return `import Module${abc[
|
||||
index
|
||||
].toUpperCase()} from '@gitroom/plugins/list/${p}/backend/module';`;
|
||||
})
|
||||
.join('\n')}
|
||||
|
||||
export default [${list
|
||||
.map((p, index) => {
|
||||
return `Module${abc[index].toUpperCase()}`;
|
||||
})
|
||||
.join(', ')}];
|
||||
`;
|
||||
|
||||
writeFileSync('./libraries/plugins/src/plugins.ts', fileContent);
|
||||
|
|
@ -2,8 +2,6 @@ import 'reflect-metadata';
|
|||
|
||||
import {
|
||||
Injectable,
|
||||
OnModuleInit,
|
||||
OnModuleDestroy,
|
||||
} from '@nestjs/common';
|
||||
import { XProvider } from '@gitroom/nestjs-libraries/integrations/social/x.provider';
|
||||
import { SocialProvider } from '@gitroom/nestjs-libraries/integrations/social/social.integrations.interface';
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
"extends": ["../../.eslintrc.json"],
|
||||
"ignorePatterns": ["!**/*"],
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": ["*.ts", "*.tsx"],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": ["*.js", "*.jsx"],
|
||||
"rules": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
# plugins
|
||||
|
||||
This library was generated with [Nx](https://nx.dev).
|
||||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit ebdb67cc66976b00b74d6717d6c012d94a7644c3
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
import { Global, Module } from '@nestjs/common';
|
||||
import module from './plugins';
|
||||
|
||||
@Global()
|
||||
@Module({
|
||||
imports: [...module],
|
||||
controllers: [],
|
||||
providers: [],
|
||||
get exports() {
|
||||
return [...this.imports];
|
||||
},
|
||||
})
|
||||
export class PluginModule {}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strict": true,
|
||||
"noImplicitOverride": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true
|
||||
},
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.lib.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist/out-tsc",
|
||||
"declaration": true,
|
||||
"types": ["node"]
|
||||
},
|
||||
"include": ["src/**/*.ts"],
|
||||
"exclude": ["src/**/*.spec.ts", "src/**/*.test.ts"]
|
||||
}
|
||||
|
|
@ -31,7 +31,6 @@
|
|||
"start:prod:frontend": "pnpm --filter ./apps/frontend run start",
|
||||
"start:prod:workers": "pnpm --filter ./apps/workers run start",
|
||||
"start:prod:cron": "pnpm --filter ./apps/cron run start",
|
||||
"update-plugins": "node build.plugins.js",
|
||||
"dev:docker": "docker compose -f ./docker-compose.dev.yaml up -d",
|
||||
"commands:build:development": "pnpm --filter ./apps/commands run build",
|
||||
"workers": "rm -rf dist/workers && pnpm --filter ./apps/workers run dev",
|
||||
|
|
@ -41,7 +40,7 @@
|
|||
"prisma-reset": "cd ./libraries/nestjs-libraries/src/database/prisma && pnpm dlx prisma db push --force-reset && npx prisma db push",
|
||||
"docker-build": "./var/docker/docker-build.sh",
|
||||
"docker-create": "./var/docker/docker-create.sh",
|
||||
"postinstall": "pnpm run update-plugins && pnpm run prisma-generate",
|
||||
"postinstall": "pnpm run prisma-generate",
|
||||
"test": "jest --coverage --detectOpenHandles --reporters=default --reporters=jest-junit"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
|||
Loading…
Reference in New Issue