Update SSL certificate, NGINX configuration, and pgAdmin setup
- Updated the SSL certificate for yuri.phx-erp.de with a new signed certificate. - Added a new NGINX configuration file for pgAdmin reverse proxy under the subpath /pgadmin4. - Enhanced the main NGINX configuration with improved logging, security headers, and real IP handling. - Implemented health check endpoints for both system and worker services with IP whitelisting. - Created a new entrypoint script for pgAdmin to manage .pgpass and servers.json configuration. - Removed the redis.conf file and commented out Redis session caching in the configuration.
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
/* tslint:disable:no-console */
|
||||
import path from 'path';
|
||||
import { ConnectionOptions } from 'typeorm';
|
||||
// import { DataSourceOptions } from 'typeorm';
|
||||
import { WinstonLogger, RedisSessionCachePlugin, LogLevel, TypeOrmLogger, SystemConfig, DefaultJobQueuePlugin } from '@phoenix/core';
|
||||
import { DataSourceOptions } from 'typeorm';
|
||||
import { WinstonLogger, LogLevel, TypeOrmLogger, SystemConfig, DefaultJobQueuePlugin } from '@phoenix/core';
|
||||
import { AssetServerPlugin } from '@phoenix/asset-server-plugin';
|
||||
import { ADMIN_API_PATH, API_PORT, SHOP_API_PATH, SUPER_ADMIN_USER_IDENTIFIER } from '@phoenix/common';
|
||||
import { EmailPlugin, FileBasedTemplateLoader, defaultEmailHandlers } from '@phoenix/email-plugin';
|
||||
@@ -10,6 +9,8 @@ import { BillBeePlugin } from "@phoenix/bill-bee-plugin";
|
||||
import { ChannelPilotProPlugin } from "@phoenix/channel-pilot-pro-plugin";
|
||||
import { ShopifyPlugin } from '@phoenix/shopify-plugin';
|
||||
|
||||
// RedisSessionCachePlugin
|
||||
|
||||
/**
|
||||
* Config settings used during development
|
||||
*/
|
||||
@@ -72,15 +73,15 @@ export const customConfig: SystemConfig = {
|
||||
defaultTakeNumber: 100,
|
||||
},
|
||||
plugins: [
|
||||
RedisSessionCachePlugin.init({
|
||||
namespace: 'phx-session',
|
||||
redisOptions: {
|
||||
host: process.env.REDIS_HOST || 'redis',
|
||||
port: process.env.REDIS_PORT ? parseInt(process.env.REDIS_PORT) : 6379,
|
||||
db: process.env.REDIS_DB ? parseInt(process.env.REDIS_DB) : 0,
|
||||
password: process.env.REDIS_PASSWORD || 'admin'
|
||||
}
|
||||
}),
|
||||
// RedisSessionCachePlugin.init({
|
||||
// namespace: 'phx-session',
|
||||
// redisOptions: {
|
||||
// host: process.env.REDIS_HOST || 'redis',
|
||||
// port: process.env.REDIS_PORT ? parseInt(process.env.REDIS_PORT) : 6379,
|
||||
// db: process.env.REDIS_DB ? parseInt(process.env.REDIS_DB) : 0,
|
||||
// password: process.env.REDIS_PASSWORD || 'admin'
|
||||
// }
|
||||
// }),
|
||||
AssetServerPlugin.init({
|
||||
route: 'remote-assets',
|
||||
assetUploadDir: path.join(__dirname, 'assets'),
|
||||
@@ -104,28 +105,9 @@ export const customConfig: SystemConfig = {
|
||||
}),
|
||||
BillBeePlugin.init({
|
||||
active: process.env.BILL_BEE_ACTIVE === 'true',
|
||||
apiUrl: process.env.BILL_BEE_API_URL,
|
||||
apiKey: process.env.BILL_BEE_API_KEY,
|
||||
username: process.env.BILL_BEE_API_USERNAME,
|
||||
password: process.env.BILL_BEE_API_SECRET,
|
||||
header: {
|
||||
'X-Billbee-Api-Key': process.env.BILL_BEE_API_KEY,
|
||||
'Authorization': `Basic ${Buffer.from(`${process.env.BILL_BEE_API_USERNAME}:${process.env.BILL_BEE_API_SECRET}`).toString('base64')}`,
|
||||
}
|
||||
}),
|
||||
ChannelPilotProPlugin.init({
|
||||
active: process.env.CHANNEL_PILOT_PRO_ACTIVE === 'true',
|
||||
connectionInfo: {
|
||||
url: process.env.CHANNEL_PILOT_PRO_URL,
|
||||
apiMerchantId: process.env.CHANNEL_PILOT_PRO_API_MERCHANT_ID,
|
||||
apiToken: process.env.CHANNEL_PILOT_PRO_API_TOKEN,
|
||||
access_token: process.env.CHANNEL_PILOT_PRO_ACCESS_TOKEN,
|
||||
expiredAt: process.env.CHANNEL_PILOT_PRO_EXPIRED_AT,
|
||||
tokenType: 'Bearer'
|
||||
},
|
||||
header: {
|
||||
'Authorization': `Bearer ${process.env.CHANNEL_PILOT_PRO_ACCESS_TOKEN}`,
|
||||
}
|
||||
active: process.env.CHANNEL_PILOT_PRO_ACTIVE === 'true'
|
||||
}),
|
||||
ShopifyPlugin.init({
|
||||
active: process.env.SHOPIFY_ACTIVE === 'true'
|
||||
@@ -151,7 +133,7 @@ export const customConfig: SystemConfig = {
|
||||
// ApolloEngineApiKey: "service:Logic-Bits-2900:5w1aCP5YUtF-1ErRG0KNQw"
|
||||
};
|
||||
|
||||
function getDbConfig(): ConnectionOptions {
|
||||
function getDbConfig(): DataSourceOptions {
|
||||
const dbType = process.env.DB || 'postgres';
|
||||
const dbHost = process.env.DB_HOST || 'localhost';
|
||||
const dbPort = +process.env.DB_PORT || 5432;
|
||||
|
||||
Reference in New Issue
Block a user