File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,14 @@ import { JwtModuleOptions } from '@nestjs/jwt'
88import { StorageManagerConfig } from '~/_common/factorydrive'
99import { AmazonWebServicesS3StorageConfig } from '~/_common/factorydrive'
1010import { HttpModuleOptions } from '@nestjs/axios'
11+ import { join } from 'path'
12+
13+ /**
14+ * Répertoire de base de l'application API
15+ * En environnement Docker: /data/apps/api
16+ * En développement local: le répertoire du projet
17+ */
18+ const API_ROOT_DIR = process . env [ 'SESAME_API_ROOT_DIR' ] || join ( process . cwd ( ) , 'apps' , 'api' )
1119
1220/**
1321 * Schéma de validation Joi pour les variables d'environnement
@@ -306,13 +314,13 @@ export default (): ConfigInstance => ({
306314 local : {
307315 driver : 'local' ,
308316 config : {
309- root : process . cwd ( ) + '/ storage',
317+ root : join ( API_ROOT_DIR , ' storage') ,
310318 } ,
311319 } ,
312320 identities : {
313321 driver : 'local' ,
314322 config : {
315- root : process . cwd ( ) + '/ storage/ identities',
323+ root : join ( API_ROOT_DIR , ' storage' , ' identities') ,
316324 } ,
317325 } ,
318326 } ,
You can’t perform that action at this time.
0 commit comments