added ecosystem.config.cjs
This commit is contained in:
parent
8615047c9b
commit
35728822c2
5 changed files with 17 additions and 5 deletions
|
@ -10,5 +10,4 @@ export const jwt_globals = reactive({
|
|||
|
||||
export const vm_cache = reactive({
|
||||
vms: [] as VM[],
|
||||
|
||||
})
|
||||
|
|
11
ecosystem.config.cjs
Normal file
11
ecosystem.config.cjs
Normal file
|
@ -0,0 +1,11 @@
|
|||
module.exports = {
|
||||
apps: [
|
||||
{
|
||||
name: 'ServerPanel',
|
||||
port: '6060',
|
||||
exec_mode: 'cluster',
|
||||
instances: 'max',
|
||||
script: './.output/server/index.mjs'
|
||||
}
|
||||
]
|
||||
}
|
|
@ -8,8 +8,6 @@ import {checkAuth} from "~/util/auth";
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
const startVm = async (vm: any) => {
|
||||
try {
|
||||
const response = await axios.post('/api/controlVM', {
|
||||
|
|
|
@ -5,7 +5,8 @@ export const settings = reactive({
|
|||
//Leave empty to scan all interfaces
|
||||
//or change item to "disabled" to disable interface scanning
|
||||
interfaces_to_scan:[
|
||||
"enp4s0"
|
||||
"eno0",
|
||||
"virtbr0"
|
||||
],
|
||||
enable_qemu_controls: true,
|
||||
qemu_vms: [
|
||||
|
@ -25,6 +26,5 @@ export const settings = reactive({
|
|||
],
|
||||
password:{
|
||||
hash: "$2y$10$04HVBBemPypGbaMhTmUxX.DUMir1HA4hT6cst.dGabot1ZWR5IQ.6",
|
||||
salt_rounds: 10
|
||||
},
|
||||
});
|
|
@ -22,7 +22,11 @@ export default defineEventHandler(async () => {
|
|||
const autostartValue = await getAutostartValue(vm.name);
|
||||
const autostart = autostartValue === "enable";
|
||||
const stateValue = await getStateValue(vm.name);
|
||||
|
||||
|
||||
const state: 'on' | 'off' = stateValue === "running" ? 'on' : 'off';
|
||||
|
||||
|
||||
vm_cache.vms.push({
|
||||
name: vm.name,
|
||||
os: vm.os,
|
||||
|
|
Loading…
Add table
Reference in a new issue