mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
install: don't expose mongodb by default
This commit is contained in:
1 file changed
+2
-1
+2
-1
@@ -89,6 +89,7 @@ If you have any questions about the migration process, please add QQ group 10858
|
|||||||
|
|
||||||
const installAsJudge = process.argv.includes('--judge');
|
const installAsJudge = process.argv.includes('--judge');
|
||||||
const noCaddy = process.argv.includes('--no-caddy');
|
const noCaddy = process.argv.includes('--no-caddy');
|
||||||
|
const exposeDb = process.argv.includes('--expose-db');
|
||||||
const addons = ['@hydrooj/ui-default', '@hydrooj/hydrojudge', '@hydrooj/fps-importer', '@hydrooj/a11y'];
|
const addons = ['@hydrooj/ui-default', '@hydrooj/hydrojudge', '@hydrooj/fps-importer', '@hydrooj/a11y'];
|
||||||
const installTarget = installAsJudge ? '@hydrooj/hydrojudge' : `hydrooj ${addons.join(' ')}`;
|
const installTarget = installAsJudge ? '@hydrooj/hydrojudge' : `hydrooj ${addons.join(' ')}`;
|
||||||
const substitutersArg = process.argv.find((i) => i.startsWith('--substituters='));
|
const substitutersArg = process.argv.find((i) => i.startsWith('--substituters='));
|
||||||
@@ -480,7 +481,7 @@ ${nixConfBase}`);
|
|||||||
...installAsJudge ? [] : [
|
...installAsJudge ? [] : [
|
||||||
() => console.log(`WiredTiger cache size: ${wtsize}GB`),
|
() => console.log(`WiredTiger cache size: ${wtsize}GB`),
|
||||||
// The only thing mongod writes to stderr is 'libcurl no version information available'
|
// The only thing mongod writes to stderr is 'libcurl no version information available'
|
||||||
`pm2 start mongod --name mongodb -e /dev/null -- --auth --bind_ip 0.0.0.0 --wiredTigerCacheSizeGB=${wtsize}`,
|
`pm2 start mongod --name mongodb -e /dev/null -- --auth ${exposeDb ? '--bind_ip=0.0.0.0 ' : ''}--wiredTigerCacheSizeGB=${wtsize}`,
|
||||||
() => sleep(1000),
|
() => sleep(1000),
|
||||||
async () => {
|
async () => {
|
||||||
if (noCaddy) {
|
if (noCaddy) {
|
||||||
|
|||||||
Reference in new issue
Block a user