A focused Docker Compose management web application.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: invalid permissions check

Brooke 684ee922 c8d449a6

+8 -3
-1
packages/node/src/core/engine.rs
··· 67 67 } 68 68 69 69 /// Spawns a `docker compose` process and returns a stream of raw bytes merging both stdout and stderr 70 - #[wrap_err("Failed to spawn docker compose process")] 71 70 pub(super) fn cli<'a>( 72 71 &self, 73 72 name: &'a str,
+8 -2
packages/node/src/main.rs
··· 1 1 //! The main entry point for the Luminary Node, which serves as the backend for the Luminary Panel. 2 2 3 - use std::sync::Arc; 3 + use std::{fs::OpenOptions, sync::Arc}; 4 4 5 5 use eyre::{Context, Result}; 6 6 use log::debug; ··· 12 12 13 13 use crate::{configuration::LuminaryConfiguration, core::LuminaryEngine}; 14 14 15 - const DATABASE: &str = "data/luminary.db"; 15 + const DATABASE: &str = "./data/luminary.db"; 16 16 17 17 mod api; 18 18 mod configuration; ··· 57 57 58 58 /// Sets up the SQLite database, running any pending migrations. 59 59 async fn setup_database() -> Result<SqlitePool> { 60 + OpenOptions::new() 61 + .write(true) 62 + .create(true) 63 + .open(DATABASE) 64 + .wrap_err_with(|| format!("Invalid permissions to open database file."))?; 65 + 60 66 // Connect to the database 61 67 let options = SqliteConnectOptions::default() 62 68 .create_if_missing(true)