Skip to content

Commit

Permalink
Merge pull request #7676 from ever-co/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
evereq authored Mar 11, 2024
2 parents fd69a29 + ca46703 commit 6f7d109
Show file tree
Hide file tree
Showing 31 changed files with 873 additions and 1,318 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ node_modules/
# sqlite3 database
*.sqlite3
*.sqlite3-journal
*.sqlite3-shm
*.sqlite3-wal

# IDEs and editors
/.idea
Expand Down
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,25 @@ Notes:

### Production

#### General information

- See [Setup Gauzy for Client Server](https://github.com/ever-co/ever-gauzy/wiki/Setup-Gauzy-for-Client-Server) for more information about production setup on your servers.
- We recommend deploying to Kubernetes (k8s), either manually (see below) or with our [Ever Helm Charts](https://github.com/ever-co/ever-charts).

#### Kubernetes

- We recommend deploying to Kubernetes (k8s), either manually (see below) or with our [Terraform Modules](https://github.com/ever-co/ever-gauzy-terraform) or [Ever Helm Charts](https://github.com/ever-co/ever-charts).
- For more simple deployment scenarios with k8s, please see [Kubernetes configurations](https://github.com/ever-co/ever-gauzy/tree/develop/.deploy/k8s), which we are using to deploy Gauzy into [DigitalOcean k8s cluster](https://www.digitalocean.com/products/kubernetes).

#### DigitalOcean App Platform

- For the most simple deployment scenarios (e.g. for yourself or your small organization), check our [DigitalOcean App Platform configurations](https://github.com/ever-co/ever-gauzy/tree/develop/.do) and corresponding [GitHub Action](https://github.com/ever-co/ever-gauzy/blob/develop/.github/workflows/deploy-do-app-platform-stage.yml).
- Another variant to deploy Gauzy is to use DigitalOcean Droplets or any other virtual instance (with Ubuntu OS) and deploy using SCP/SSH, for example following [GitHub Action](https://github.com/ever-co/ever-gauzy/blob/develop/.github/workflows/deploy-do-droplet-demo.yml)
- For more complex deployment scenarios, please see [Kubernetes configurations](https://github.com/ever-co/ever-gauzy/tree/develop/.deploy/k8s), which we are using to deploy Gauzy into [DigitalOcean k8s cluster](https://www.digitalocean.com/products/kubernetes).

#### Virtual Instances / Droplets (via SSH)

- Another variant to deploy Gauzy is to use DigitalOcean Droplets or any other virtual instance (with Ubuntu OS) and deploy using SCP/SSH, for example, following [GitHub Action](https://github.com/ever-co/ever-gauzy/blob/develop/.github/workflows/deploy-do-droplet-demo.yml)

#### Pulumi

- In addition, check [Gauzy Pulumi](https://github.com/ever-co/ever-gauzy-pulumi) project (WIP), it makes complex Clouds deployments possible with a single command (`pulumi up`). Note: it currently supports AWS EKS (Kubernetes) for development and production with Application Load Balancers and AWS RDS Serverless PostgreSQL DB deployments. We also implemented deployments to ECS EC2 and Fargate Clusters in the same Pulumi project.

## 💌 Contact Us
Expand Down
36 changes: 12 additions & 24 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
},
"packageManager": "yarn",
"analytics": false,
"schematicCollections": [
"@nstudio/xplat"
]
"schematicCollections": ["@nstudio/xplat"]
},
"version": 1,
"newProjectRoot": "",
Expand Down Expand Up @@ -487,14 +485,9 @@
"tsConfig": "apps/desktop/tsconfig.app.json",
"aot": true,
"stylePreprocessorOptions": {
"includePaths": [
"apps/desktop-timer/src/assets/styles"
]
"includePaths": ["apps/desktop-timer/src/assets/styles"]
},
"assets": [
"apps/desktop/src/favicon.ico",
"apps/desktop/src/assets"
],
"assets": ["apps/desktop/src/favicon.ico", "apps/desktop/src/assets"],
"styles": [
"node_modules/@nebular/theme/styles/prebuilt/default.css",
"node_modules/bootstrap/dist/css/bootstrap.css",
Expand Down Expand Up @@ -584,19 +577,22 @@
"build": {
"builder": "@nrwl/node:webpack",
"options": {
"outputPath": "dist/apps/desktop/desktop-api",
"main": "packages/desktop-api/src/main.ts",
"showCircularDependencies": false,
"sourceMap": true,
"maxWorkers": 4,
"memoryLimit": 4000,
"webpackConfig": "tools/build/webpack.config.js",
"outputPath": "dist/apps/desktop/desktop-api",
"main": "packages/desktop-api/src/main.ts",
"tsConfig": "packages/desktop-api/tsconfig.app.json",
"assets": ["packages/desktop-api/src/assets"]
},
"configurations": {
"production": {
"optimization": true,
"extractLicenses": false,
"extractLicenses": true,
"inspect": false,
"sourceMap": false,
"fileReplacements": [
{
"replace": "packages/desktop-api/src/environments/environment.ts",
Expand Down Expand Up @@ -673,9 +669,7 @@
"tsConfig": "apps/desktop-timer/tsconfig.app.json",
"aot": true,
"stylePreprocessorOptions": {
"includePaths": [
"apps/desktop-timer/src/assets/styles"
]
"includePaths": ["apps/desktop-timer/src/assets/styles"]
},
"assets": [
"apps/desktop-timer/src/favicon.ico",
Expand Down Expand Up @@ -762,10 +756,7 @@
"lint": {
"builder": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": [
"apps/desktop-timer/src/**/*.ts",
"apps/desktop-timer/src/**/*.html"
]
"lintFilePatterns": ["apps/desktop-timer/src/**/*.ts", "apps/desktop-timer/src/**/*.html"]
}
},
"test": {
Expand Down Expand Up @@ -884,10 +875,7 @@
"lint": {
"builder": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": [
"apps/server/src/**/*.ts",
"apps/server/src/**/*.html"
]
"lintFilePatterns": ["apps/server/src/**/*.ts", "apps/server/src/**/*.html"]
}
},
"test": {
Expand Down
3 changes: 2 additions & 1 deletion apps/api/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
console.log('API Starting...');

import { bootstrap } from '@gauzy/core';
console.log('Bootstrap loaded');

Expand All @@ -10,6 +12,5 @@ bootstrap(pluginConfig)
})
.catch(async (error) => {
console.log(error);

process.exit(1);
});
18 changes: 5 additions & 13 deletions apps/api/src/pm2bootstrap.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as dotenv from 'dotenv'; // see https://github.com/motdotla/dotenv#how-do-i-use-dotenv-with-import
import * as dotenv from 'dotenv';
dotenv.config();

const pm2 = require('pm2');
Expand All @@ -25,9 +25,9 @@ pm2.connect(function () {
PM2_PUBLIC_KEY: PUBLIC_KEY,
PM2_SECRET_KEY: PRIVATE_KEY,
KEYMETRICS_PUBLIC: PUBLIC_KEY,
KEYMETRICS_SECRET: PRIVATE_KEY,
KEYMETRICS_SECRET: PRIVATE_KEY
},
post_update: ['yarn install'], // Commands to execute once we do a pull from Keymetrics
post_update: ['yarn install'] // Commands to execute once we do a pull from Keymetrics
},
function () {
pm2.dump(console.error);
Expand All @@ -36,19 +36,11 @@ pm2.connect(function () {
console.log('[PM2] Log streaming started');

bus.on('log:out', function (packet) {
console.log(
'[App:%s] %s',
packet.process.name,
packet.data
);
console.log('[App:%s] %s', packet.process.name, packet.data);
});

bus.on('log:err', function (packet) {
console.error(
'[App:%s][Err] %s',
packet.process.name,
packet.data
);
console.error('[App:%s][Err] %s', packet.process.name, packet.data);
});
});
}
Expand Down
Loading

0 comments on commit 6f7d109

Please sign in to comment.