@@ -14,10 +14,10 @@ import { Env } from '@adonisjs/core/env'
1414// eslint-disable-next-line antfu/no-top-level-await
1515export default await Env . create ( new URL ( '../' , import . meta. url ) , {
1616 NODE_ENV : Env . schema . enum ( [ 'development' , 'production' , 'test' ] as const ) ,
17- PORT : Env . schema . number ( ) ,
17+ PORT : Env . schema . number . optional ( ) ,
1818 APP_KEY : Env . schema . string ( ) ,
19- HOST : Env . schema . string ( { format : 'host' } ) ,
20- LOG_LEVEL : Env . schema . enum ( [ 'fatal' , 'error' , 'warn' , 'info' , 'debug' , 'trace' , 'silent' ] ) ,
19+ HOST : Env . schema . string . optional ( { format : 'host' } ) ,
20+ LOG_LEVEL : Env . schema . enum . optional ( [ 'fatal' , 'error' , 'warn' , 'info' , 'debug' , 'trace' , 'silent' ] ) ,
2121
2222 /*
2323 |----------------------------------------------------------
@@ -35,12 +35,12 @@ export default await Env.create(new URL('../', import.meta.url), {
3535 | Variables for configuring mail connection
3636 |----------------------------------------------------------
3737 */
38- SMTP_HOST : Env . schema . string ( ) ,
39- SMTP_PORT : Env . schema . number ( ) ,
38+ SMTP_HOST : Env . schema . string . optional ( ) ,
39+ SMTP_PORT : Env . schema . number . optional ( ) ,
4040 SMTP_USERNAME : Env . schema . string . optional ( ) ,
4141 SMTP_PASSWORD : Env . schema . string . optional ( ) ,
4242
43- FRONTEND_URL : Env . schema . string ( ) ,
43+ FRONTEND_URL : Env . schema . string . optional ( ) ,
4444
4545 /*
4646 |----------------------------------------------------------
@@ -65,8 +65,8 @@ export default await Env.create(new URL('../', import.meta.url), {
6565 | Variables for Vector Database (Qdrant)
6666 |----------------------------------------------------------
6767 */
68- QDRANT_HOST : Env . schema . string ( { format : 'host' } ) ,
69- QDRANT_PORT : Env . schema . number ( ) ,
68+ QDRANT_HOST : Env . schema . string . optional ( { format : 'host' } ) ,
69+ QDRANT_PORT : Env . schema . number . optional ( ) ,
7070 QDRANT_API_KEY : Env . schema . string . optional ( ) ,
7171
7272 /*
@@ -92,9 +92,9 @@ export default await Env.create(new URL('../', import.meta.url), {
9292 | Variables for configuring the limiter package
9393 |----------------------------------------------------------
9494 */
95- LIMITER_STORE : Env . schema . enum ( [ 'database' , 'memory' ] as const ) ,
95+ LIMITER_STORE : Env . schema . enum . optional ( [ 'database' , 'memory' ] as const ) ,
9696
97- REDIS_HOST : Env . schema . string ( { format : 'host' } ) ,
98- REDIS_PORT : Env . schema . number ( ) ,
97+ REDIS_HOST : Env . schema . string . optional ( { format : 'host' } ) ,
98+ REDIS_PORT : Env . schema . number . optional ( ) ,
9999 REDIS_PASSWORD : Env . schema . string . optional ( ) ,
100100} )
0 commit comments