mirror of
https://github.com/cupcakearmy/morphus.git
synced 2025-12-08 23:55:00 +00:00
docs for storage envs
This commit is contained in:
@@ -40,7 +40,8 @@ function formatNullableStringOrRegexpArray(values: any) {
|
||||
}
|
||||
|
||||
convict.addParser({ extension: ['yml', 'yaml'], parse: (s) => yaml.load(s, { schema: Schema }) })
|
||||
const config = convict({
|
||||
|
||||
export const config = convict({
|
||||
// Server
|
||||
port: {
|
||||
doc: 'The port to bind.',
|
||||
@@ -101,11 +102,13 @@ const config = convict({
|
||||
},
|
||||
|
||||
// Local storage
|
||||
localAssets: {
|
||||
doc: 'The path to the assets folder',
|
||||
format: String,
|
||||
default: './assets',
|
||||
env: 'LOCAL_ASSETS',
|
||||
local: {
|
||||
assets: {
|
||||
doc: 'The path to the assets folder',
|
||||
format: String,
|
||||
default: './assets',
|
||||
env: 'LOCAL_ASSETS',
|
||||
},
|
||||
},
|
||||
|
||||
// Minio storage
|
||||
|
||||
@@ -22,7 +22,7 @@ export async function init(App: FastifyInstance) {
|
||||
if (!storage) {
|
||||
switch (Config.storage) {
|
||||
case StorageType.Local:
|
||||
storage = new Local(Config.localAssets)
|
||||
storage = new Local(Config.local.assets)
|
||||
break
|
||||
case StorageType.S3:
|
||||
storage = new Minio({
|
||||
|
||||
Reference in New Issue
Block a user