retspen / webvirtcloud

WebVirtCloud is virtualization web interface for admins and users
1.7k stars 372 forks source link

where is backend data location #480

Closed anhnvme closed 2 years ago

anhnvme commented 2 years ago

Hello,

I'm tried move webvirtcloud to kubernetes, every working fine, but i don't know backend which saved log, KVM Machine location Some body can show me this location

catborise commented 2 years ago

it save logs to database. i think we should add an option to log also stdout or file. for now you can take logs of nginx only.

anhnvme commented 2 years ago

it save logs to database. i think we should add an option to log also stdout or file. for now you can take logs of nginx only.

I just found db.sqlite3 on /srv/webvirtcloud. maybe file save information which I need. How can i change location this file ?. i want to mount a NFS folder and store this file on NFS

catborise commented 2 years ago

you can change it from webvirtcloud/settings.py file. DATABASES section "base_dir"

and also you can you mysql or postgresql to keep data

DATABASES = {
#    'default': {
#        'ENGINE': 'django.db.backends.sqlite3',
#        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
#    }
     'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'wvcdb',
        'USER': 'wvcuser',
        'PASSWORD': 'wvcpass',
        'HOST': '127.0.0.1',
        'PORT': '',
    }
}
anhnvme commented 2 years ago

you can change it from webvirtcloud/settings.py file. DATABASES section "base_dir"

and also you can you mysql or postgresql to keep data

DATABASES = {
#    'default': {
#        'ENGINE': 'django.db.backends.sqlite3',
#        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
#    }
     'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'wvcdb',
        'USER': 'wvcuser',
        'PASSWORD': 'wvcpass',
        'HOST': '127.0.0.1',
        'PORT': '',
    }
}

thank you so much. i'm really don't know python too much 😅