mirror of
https://github.com/caprover/caprover
synced 2025-12-12 06:15:40 +00:00
22 lines
557 B
JavaScript
22 lines
557 B
JavaScript
/*jshint esversion: 6 */
|
|
|
|
const fs = require('fs-extra');
|
|
const CONFIG_FILE_PATH = '/captain/data/config-captain.json';
|
|
|
|
const fileContent = JSON.parse(fs.readFileSync(CONFIG_FILE_PATH, {
|
|
encoding: 'utf-8'
|
|
}));
|
|
|
|
fs.writeFileSync(CONFIG_FILE_PATH + '.backup', JSON.stringify(fileContent));
|
|
|
|
|
|
fileContent.nginxBaseConfig = '';
|
|
fileContent.nginxCaptainConfig = '';
|
|
|
|
const apps = fileContent.appDefinitions || {};
|
|
|
|
Object.keys(apps).forEach(app => {
|
|
apps[app].customNginxConfig = '';
|
|
});
|
|
|
|
fs.writeFileSync(CONFIG_FILE_PATH, JSON.stringify(fileContent)); |