📦 NEW: Added All Data Files
BIN
server_custom/.DS_Store
vendored
Normal file
|
After Width: | Height: | Size: 180 KiB |
BIN
server_custom/assets/cache/preview/47/unknown__06__preview5a1f094e1d632219d28be43dad75e5cf.jpg
vendored
Normal file
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 40 KiB |
BIN
server_custom/assets/cache/preview/6e/image002__preview5a1f094e1d632219d28be43dad75e5cf.jpg
vendored
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
server_custom/assets/cache/preview/80/st8000dm004_560__preview5a1f094e1d632219d28be43dad75e5cf.jpg
vendored
Normal file
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 20 KiB |
BIN
server_custom/assets/cache/preview/9d/unknown__03__preview5a1f094e1d632219d28be43dad75e5cf.jpg
vendored
Normal file
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 14 KiB |
BIN
server_custom/assets/cache/preview/be/document-inv__preview.pdf5a1f094e1d632219d28be43dad75e5cf.png
vendored
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
server_custom/assets/cache/preview/cb/unknown__04__preview5a1f094e1d632219d28be43dad75e5cf.jpg
vendored
Normal file
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 9.7 KiB |
BIN
server_custom/assets/cache/preview/db/logo-benzinger__preview5a1f094e1d632219d28be43dad75e5cf.png
vendored
Normal file
|
After Width: | Height: | Size: 61 KiB |
|
After Width: | Height: | Size: 11 KiB |
BIN
server_custom/assets/cache/preview/eb/unknown__05__preview5a1f094e1d632219d28be43dad75e5cf.jpg
vendored
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
server_custom/assets/cache/preview/ec/unknown__preview5a1f094e1d632219d28be43dad75e5cf.jpg
vendored
Normal file
|
After Width: | Height: | Size: 59 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 34 KiB |
BIN
server_custom/assets/cache/preview/fe/ar103__preview.pdf5a1f094e1d632219d28be43dad75e5cf.png
vendored
Normal file
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 20 KiB |
BIN
server_custom/assets/preview/12/firefox_y80rwdbwnt__preview.png
Normal file
|
After Width: | Height: | Size: 187 KiB |
|
After Width: | Height: | Size: 183 KiB |
BIN
server_custom/assets/preview/47/unknown__06__preview.jpg
Normal file
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 54 KiB |
BIN
server_custom/assets/preview/67/reportalias-__preview.pdf.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
server_custom/assets/preview/6e/image002__preview.jpg
Normal file
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 20 KiB |
BIN
server_custom/assets/preview/80/st8000dm004_560__preview.jpg
Normal file
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 112 KiB |
|
After Width: | Height: | Size: 20 KiB |
BIN
server_custom/assets/preview/9d/unknown__03__preview.jpg
Normal file
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
BIN
server_custom/assets/preview/b5/.png__preview.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
server_custom/assets/preview/be/document-inv__preview.pdf.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
BIN
server_custom/assets/preview/cb/unknown__04__preview.jpg
Normal file
|
After Width: | Height: | Size: 51 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 120 KiB |
|
After Width: | Height: | Size: 20 KiB |
BIN
server_custom/assets/preview/db/logo-benzinger__preview.png
Normal file
|
After Width: | Height: | Size: 288 KiB |
BIN
server_custom/assets/preview/eb/unknown__05__preview.jpg
Normal file
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 29 KiB |
BIN
server_custom/assets/preview/ec/unknown__preview.jpg
Normal file
|
After Width: | Height: | Size: 65 KiB |
BIN
server_custom/assets/preview/ee/unknown__02__preview.jpg
Normal file
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 70 KiB |
|
After Width: | Height: | Size: 347 KiB |
BIN
server_custom/assets/preview/fe/ar103__preview.pdf.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
server_custom/assets/source/02/unknown__04.jpg
Normal file
|
After Width: | Height: | Size: 70 KiB |
BIN
server_custom/assets/source/05/reportalias-__08.pdf
Normal file
BIN
server_custom/assets/source/05/reportalias-__11.pdf
Normal file
BIN
server_custom/assets/source/0b/document-inv.pdf
Normal file
BIN
server_custom/assets/source/0c/unknown__03.jpg
Normal file
|
After Width: | Height: | Size: 49 KiB |
BIN
server_custom/assets/source/18/logo-benzinger.png
Normal file
|
After Width: | Height: | Size: 248 KiB |
|
After Width: | Height: | Size: 108 KiB |
|
After Width: | Height: | Size: 141 KiB |
BIN
server_custom/assets/source/22/reportalias-__03.pdf
Normal file
|
After Width: | Height: | Size: 110 KiB |
BIN
server_custom/assets/source/45/st8000dm004_560.jpg
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
server_custom/assets/source/4a/reportalias-__02.pdf
Normal file
BIN
server_custom/assets/source/56/reportalias-__04.pdf
Normal file
|
After Width: | Height: | Size: 2.5 MiB |
BIN
server_custom/assets/source/61/unknown.jpg
Normal file
|
After Width: | Height: | Size: 89 KiB |
BIN
server_custom/assets/source/64/.png
Normal file
|
After Width: | Height: | Size: 112 KiB |
BIN
server_custom/assets/source/78/reportalias-__07.pdf
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
server_custom/assets/source/85/firefox_y80rwdbwnt.png
Normal file
|
After Width: | Height: | Size: 196 KiB |
|
After Width: | Height: | Size: 130 KiB |
BIN
server_custom/assets/source/8e/reportalias-__05.pdf
Normal file
|
After Width: | Height: | Size: 88 KiB |
BIN
server_custom/assets/source/a3/ar103.pdf
Normal file
BIN
server_custom/assets/source/b4/unknown__05.jpg
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
server_custom/assets/source/c4/reportalias-__06.pdf
Normal file
BIN
server_custom/assets/source/c7/20190702-cts-schoot-1.jpg
Normal file
|
After Width: | Height: | Size: 134 KiB |
BIN
server_custom/assets/source/cc/reportalias-.pdf
Normal file
BIN
server_custom/assets/source/d1/reportalias-__10.pdf
Normal file
BIN
server_custom/assets/source/db/reportalias-__09.pdf
Normal file
BIN
server_custom/assets/source/e4/domino-164_6wvehfi-unsplash.jpg
Normal file
|
After Width: | Height: | Size: 891 KiB |
BIN
server_custom/assets/source/ef/unknown__06.jpg
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
server_custom/assets/source/f6/image002.jpg
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
server_custom/assets/source/f7/unknown__02.jpg
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
server_custom/assets/source/fa/24408483_4-201908282236.jpg
Normal file
|
After Width: | Height: | Size: 283 KiB |
204
server_custom/config.ts
Normal file
@@ -0,0 +1,204 @@
|
||||
/* tslint:disable:no-console */
|
||||
import path from 'path';
|
||||
import { ConnectionOptions } from 'typeorm';
|
||||
import { RedisSessionCachePlugin, DefaultLogger, LogLevel, TypeOrmLogger, SystemConfig, DefaultJobQueuePlugin, Injector, RequestContext, EmailSettingsService } from '@phoenix/core';
|
||||
import { AssetServerPlugin } from '@phoenix/asset-server-plugin';
|
||||
import { ADMIN_API_PATH, API_PORT, API_SSL_PORT, SHOP_API_PATH, SUPER_ADMIN_USER_IDENTIFIER } from '@phoenix/common';
|
||||
import { EmailPlugin, FileBasedTemplateLoader, defaultEmailHandlers } from '@phoenix/email-plugin';
|
||||
//import { BonnAPIPlugin } from '../plugins/bonn-api-plugin/bonn-api-plugin.module';
|
||||
// import { DefaultJobQueuePlugin } from '@phoenix/system_service';
|
||||
|
||||
/**
|
||||
* Config settings used during development
|
||||
*/
|
||||
export const customConfig: SystemConfig = {
|
||||
apiOptions: {
|
||||
port: API_PORT,
|
||||
// sslPort: API_SSL_PORT,
|
||||
//sslCertPath: path.join(__dirname, '../secrets/certificate.crt'),
|
||||
//sslKeyPath: path.join(__dirname, '../secrets/certificate.key'),
|
||||
adminApiPath: ADMIN_API_PATH,
|
||||
shopApiPath: SHOP_API_PATH,
|
||||
cors: {
|
||||
origin: true,
|
||||
credentials: true,
|
||||
},
|
||||
},
|
||||
authOptions: {
|
||||
disableAuth: true,
|
||||
sessionSecret: 'some-secret',
|
||||
requireVerification: false,
|
||||
tokenMethod: "bearer",
|
||||
superadminCredentials: {
|
||||
identifier: SUPER_ADMIN_USER_IDENTIFIER,
|
||||
password: process.env.SUPER_ADMIN_USER_PASSWORD || 'superadmin'
|
||||
}
|
||||
},
|
||||
dbConnectionOptions: {
|
||||
// synchronize: true,
|
||||
// logging: true,
|
||||
logger: new TypeOrmLogger(),
|
||||
...getDbConfig(),
|
||||
// logging: ["error"]
|
||||
},
|
||||
// paymentOptions: {
|
||||
// // paymentMethodHandlers: [examplePaymentHandler],
|
||||
// },
|
||||
customFields: {
|
||||
Product: [
|
||||
{
|
||||
name: 'testo',
|
||||
type: 'string',
|
||||
}
|
||||
],
|
||||
DocumentLineItem: [
|
||||
],
|
||||
PostProductionDetail: [
|
||||
],
|
||||
},
|
||||
searchableFields: {
|
||||
processResource: [
|
||||
"scanId"
|
||||
]
|
||||
},
|
||||
logger: new DefaultLogger({ level: LogLevel.Debug }),
|
||||
//importExportOptions: {
|
||||
// importProductAssetsDir: path.join(__dirname, 'import', 'product-assets'),
|
||||
//},
|
||||
defaults: {
|
||||
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'
|
||||
}
|
||||
}),
|
||||
AssetServerPlugin.init({
|
||||
route: 'remote-assets',
|
||||
assetUploadDir: path.join(__dirname, 'assets'),
|
||||
port: 5002,
|
||||
assetUrlPrefix: "\\remote-assets\\" // to make it relative for client
|
||||
}),
|
||||
DefaultJobQueuePlugin.init({}),
|
||||
EmailPlugin.init({
|
||||
sendRealEmails: true,
|
||||
route: 'mailbox',
|
||||
handlers: [...defaultEmailHandlers],
|
||||
// Dynamic Email Templates
|
||||
templateLoader: new FileBasedTemplateLoader(path.join(__dirname, '..', '../email-plugin/templates')),
|
||||
globalTemplateVars: {
|
||||
verifyEmailAddressUrl: 'http://localhost:4201/verify',
|
||||
passwordResetUrl: 'http://localhost:4201/reset-password',
|
||||
changeEmailAddressUrl: 'http://localhost:4201/change-email-address',
|
||||
},
|
||||
transport: async (injector: Injector, ctx?: RequestContext) => {
|
||||
let res = await injector.get(EmailSettingsService).getFallbackEmailSettings(ctx);
|
||||
console.warn("SMTP Settings: ", res);
|
||||
return {
|
||||
name: res.smtpName,
|
||||
host: res.smtpHost,
|
||||
port: res.smtpPort,
|
||||
auth: {
|
||||
user: res.smtpUser,
|
||||
pass: res.smtpPass,
|
||||
},
|
||||
secure: res.smtpSecure,
|
||||
type: 'smtp',
|
||||
tls: {
|
||||
rejectUnauthorized: res.smtpTls
|
||||
},
|
||||
ignoreTLS: true
|
||||
}
|
||||
},
|
||||
}),
|
||||
// DefaultStoragePlaceRankPlugin.init({})
|
||||
// new DefaultSearchPlugin(),
|
||||
// new ElasticsearchPlugin({
|
||||
// host: 'http://192.168.99.100',
|
||||
// port: 9200,
|
||||
// }),
|
||||
// DocusignPlugin.init({
|
||||
// devMode:true,
|
||||
// handlers: defaultDocusignHandlers,
|
||||
// assetDownloadDir: path.join(__dirname, 'docusign'),
|
||||
// assetUploadDir: path.join(__dirname, 'docusign'),
|
||||
// port: API_PORT,
|
||||
// route: "docusign"
|
||||
// }),
|
||||
// new AdminUiPlugin({
|
||||
// port: 5001,
|
||||
// }),
|
||||
],
|
||||
// ApolloEngineApiKey: "service:Logic-Bits-2900:5w1aCP5YUtF-1ErRG0KNQw"
|
||||
};
|
||||
|
||||
function getDbConfig(): ConnectionOptions {
|
||||
const dbType = process.env.DB || 'postgres';
|
||||
const dbHost = process.env.DB_HOST || 'localhost';
|
||||
const dbPort = +process.env.DB_PORT || 5432;
|
||||
|
||||
const connectionPoolMax = process.env.CONNECTION_POOL_MAX ?? 20;
|
||||
|
||||
const dbUsername = process.env.DB_USERNAME || 'postgres';
|
||||
const password = process.env.DB_PASSWORD || 'admin';
|
||||
const database = process.env.DB_NAME || 'phoenix'
|
||||
|
||||
if (password == "admin")
|
||||
console.warn("default postgres password is used!");
|
||||
|
||||
if (process.env.DB_HOST)
|
||||
console.log(`using DB Host ${dbHost} from env`);
|
||||
|
||||
console.log(`using Database ${database}`);
|
||||
console.log(`using User ${dbUsername}`);
|
||||
|
||||
switch (dbType) {
|
||||
case 'postgres':
|
||||
console.log('Using postgres connection at ' + dbHost);
|
||||
return {
|
||||
synchronize: true,
|
||||
type: 'postgres',
|
||||
//host: '127.0.0.1',
|
||||
host: dbHost,
|
||||
port: dbPort,
|
||||
username: dbUsername,
|
||||
password: password,
|
||||
database: database,
|
||||
// logging: "all",
|
||||
extra: {
|
||||
max: connectionPoolMax
|
||||
}
|
||||
};
|
||||
case 'sqlite':
|
||||
console.log('Using sqlite connection');
|
||||
return {
|
||||
type: 'sqlite',
|
||||
database: path.join(__dirname, 'phoenix.sqlite'),
|
||||
};
|
||||
case 'sqljs':
|
||||
console.log('Using sql.js connection');
|
||||
return {
|
||||
type: 'sqljs',
|
||||
autoSave: true,
|
||||
database: new Uint8Array([]),
|
||||
location: path.join(__dirname, 'phoenix.sqlite'),
|
||||
};
|
||||
case 'mysql':
|
||||
default:
|
||||
console.log('Using mysql connection');
|
||||
return {
|
||||
synchronize: true,
|
||||
type: 'mysql',
|
||||
host: '192.168.99.100',
|
||||
port: 3306,
|
||||
username: 'root',
|
||||
password: '',
|
||||
database: 'phoenix-dev',
|
||||
};
|
||||
}
|
||||
}
|
||||