Drop .env support (#5864)
This commit is contained in:
@@ -90,8 +90,6 @@ files:
|
||||
[shields-io-production.yml]: ../config/shields-io-production.yml
|
||||
[default.yml]: ../config/default.yml
|
||||
|
||||
The project ships with `dotenv`, however there is no `.env` in production.
|
||||
|
||||
## Badge CDN
|
||||
|
||||
Sitting in front of the three servers is a Cloudflare Free account which
|
||||
|
||||
3
package-lock.json
generated
3
package-lock.json
generated
@@ -14096,7 +14096,8 @@
|
||||
"dotenv": {
|
||||
"version": "8.2.0",
|
||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz",
|
||||
"integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw=="
|
||||
"integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==",
|
||||
"dev": true
|
||||
},
|
||||
"duplexer": {
|
||||
"version": "0.1.1",
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
"config": "^3.3.2",
|
||||
"cross-env": "^7.0.2",
|
||||
"decamelize": "^3.2.0",
|
||||
"dotenv": "^8.2.0",
|
||||
"emojic": "^1.1.16",
|
||||
"escape-string-regexp": "^4.0.0",
|
||||
"fast-xml-parser": "^3.17.4",
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
|
||||
require('dotenv').config()
|
||||
|
||||
// Set up Sentry reporting as early in the process as possible.
|
||||
const config = require('config').util.toObject()
|
||||
const Sentry = require('@sentry/node')
|
||||
@@ -37,6 +35,13 @@ if (process.argv[3]) {
|
||||
console.log('Configuration:')
|
||||
console.dir(config.public, { depth: null })
|
||||
|
||||
if (fs.existsSync('.env')) {
|
||||
console.error(
|
||||
'Legacy .env file found. It should be deleted and replaced with environment variables or config/local.yml'
|
||||
)
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
const legacySecretsPath = path.join(__dirname, 'private', 'secret.json')
|
||||
if (fs.existsSync(legacySecretsPath)) {
|
||||
console.error(
|
||||
|
||||
Reference in New Issue
Block a user