Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.0
2.7.1
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<p align="center">
<img src="https://nginxproxymanager.com/github.png">
<br><br>
<img src="https://img.shields.io/badge/version-2.7.0-green.svg?style=for-the-badge">
<img src="https://img.shields.io/badge/version-2.7.1-green.svg?style=for-the-badge">
<a href="https://hub.docker.com/repository/docker/jc21/nginx-proxy-manager">
<img src="https://img.shields.io/docker/stars/jc21/nginx-proxy-manager.svg?style=for-the-badge">
</a>
Expand Down
17 changes: 9 additions & 8 deletions backend/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ async function appStart () {
const internalCertificate = require('./internal/certificate');
const internalIpRanges = require('./internal/ip_ranges');


return migrate.latest()
.then(setup)
.then(() => {
Expand Down Expand Up @@ -43,13 +42,14 @@ async function appStart () {
});
}

async function createDbConfigFromEnvironment(){
async function createDbConfigFromEnvironment() {
return new Promise((resolve, reject) => {
const envMysqlHost = process.env.DB_MYSQL_HOST;
const envMysqlPort = process.env.DB_MYSQL_PORT;
const envMysqlUser = process.env.DB_MYSQL_USER;
const envMysqlName = process.env.DB_MYSQL_NAME;
const envSqliteFile = process.env.DB_SQLITE_FILE;
const envMysqlHost = process.env.DB_MYSQL_HOST || null;
const envMysqlPort = process.env.DB_MYSQL_PORT || null;
const envMysqlUser = process.env.DB_MYSQL_USER || null;
const envMysqlName = process.env.DB_MYSQL_NAME || null;
const envSqliteFile = process.env.DB_SQLITE_FILE || null;

if ((envMysqlHost && envMysqlPort && envMysqlUser && envMysqlName) || envSqliteFile) {
const fs = require('fs');
const filename = (process.env.NODE_CONFIG_DIR || './config') + '/' + (process.env.NODE_ENV || 'default') + '.json';
Expand Down Expand Up @@ -119,7 +119,7 @@ async function createDbConfigFromEnvironment(){
}
});
} else {
// resolve();
resolve();
}
});
}
Expand All @@ -130,3 +130,4 @@ try {
logger.error(err.message, err);
process.exit(1);
}