This commit is contained in:
Gabriel Peron 2025-03-23 02:34:16 +01:00
parent 6a295e900e
commit c081c62b65
2 changed files with 4 additions and 7 deletions

2
.env
View file

@ -1,6 +1,6 @@
DB_HOST=172.10.1.4
DB_USER=prox
DB_PASSWORD=2104
DB_NAME=2104
DB_NAME=prox
PORT=3006
VITE_API_URL=http://localhost:3006/api

View file

@ -1,6 +1,6 @@
-- Create the database if it doesn't exist
CREATE DATABASE IF NOT EXISTS proxmox_dashboard;
USE proxmox_dashboard;
CREATE DATABASE IF NOT EXISTS prox;
USE prox;
-- Create servers table
CREATE TABLE IF NOT EXISTS servers (
@ -18,12 +18,9 @@ CREATE TABLE IF NOT EXISTS servers (
INDEX idx_name (name)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- Create a user for the application (if not exists)
CREATE USER IF NOT EXISTS 'proxmox_user'@'localhost' IDENTIFIED BY 'proxmox_password';
-- Grant privileges to the application user
GRANT ALL PRIVILEGES ON proxmox_dashboard.* TO 'proxmox_user'@'localhost';
FLUSH PRIVILEGES;
-- Add some sample data (optional)
INSERT INTO servers (