@@ -8,15 +8,12 @@ export const generateEnv = (envValues) => {
8
8
let platformUrl = isDockerCompose
9
9
? "http://host.docker.internal:8000"
10
10
: "http://localhost:8000" ;
11
- const websearchEnabled =
12
- envValues . serpApiKey !== null && envValues . serpApiKey !== "" ;
13
11
14
12
const envDefinition = getEnvDefinition (
15
13
envValues ,
16
14
isDockerCompose ,
17
15
dbPort ,
18
16
platformUrl ,
19
- websearchEnabled
20
17
) ;
21
18
22
19
const envFileContent = generateEnvFileContent ( envDefinition ) ;
@@ -28,7 +25,6 @@ const getEnvDefinition = (
28
25
isDockerCompose ,
29
26
dbPort ,
30
27
platformUrl ,
31
- websearchEnabled
32
28
) => {
33
29
return {
34
30
"Deployment Environment" : {
@@ -86,9 +82,9 @@ const generateEnvFileContent = (config) => {
86
82
let configFile = "" ;
87
83
88
84
Object . entries ( config ) . forEach ( ( [ section , variables ] ) => {
89
- configFile += `# ${ section } :\n` ;
85
+ configFile += `# ${ section } :\n` ;
90
86
Object . entries ( variables ) . forEach ( ( [ key , value ] ) => {
91
- configFile += `${ key } ="${ value } "\n` ;
87
+ configFile += `${ key } ="${ value } "\n` ;
92
88
} ) ;
93
89
configFile += "\n" ;
94
90
} ) ;
@@ -137,15 +133,15 @@ export const testEnvFile = () => {
137
133
if ( missingFromFile . length > 0 ) {
138
134
errorMessage += "\nYour ./next/.env is missing the following keys:\n" ;
139
135
missingFromFile . forEach ( ( key ) => {
140
- errorMessage += chalk . whiteBright ( `- ❌ ${ key } \n` ) ;
136
+ errorMessage += chalk . whiteBright ( `- ❌ ${ key } \n` ) ;
141
137
} ) ;
142
138
errorMessage += "\n" ;
143
139
}
144
140
145
141
if ( missingFromDef . length > 0 ) {
146
142
errorMessage += "Your ./next/.env is missing the following keys:\n" ;
147
143
missingFromDef . forEach ( ( key ) => {
148
- errorMessage += chalk . whiteBright ( `- ⚠️ ${ key } \n` ) ;
144
+ errorMessage += chalk . whiteBright ( `- ⚠️ ${ key } \n` ) ;
149
145
} ) ;
150
146
errorMessage += "\n" ;
151
147
}
0 commit comments