Compare commits

..

No commits in common. "ab4322fba883fc27c9a6efd62b43a5f8c96fec19" and "614bb91c5acdc05127a1c6873f3a28e6e02f70c2" have entirely different histories.

7 changed files with 10 additions and 85 deletions

View file

@ -1,7 +1,3 @@
# Database section
DB_USER=
DB_PASSWORD=
# Minio S3 section
MINIO_ACCESS_KEY=
MINIO_SECRET_KEY=
DB_PASSWORD=

View file

@ -2,6 +2,10 @@
<configuration default="false" name="start server" type="Application" factoryName="Application">
<option name="ALTERNATIVE_JRE_PATH" value="17" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<envs>
<env name="DB_USER" value="postgres" />
<env name="DB_PASSWORD" value="postgres" />
</envs>
<option name="MAIN_CLASS_NAME" value="com.mixel.docusphere.DocuSphereApplication" />
<module name="DocuSphere.server.main" />
<method v="2">

View file

@ -24,12 +24,6 @@ dependencies {
implementation 'org.springframework.security:spring-security-crypto:6.3.3'
implementation 'org.bouncycastle:bcprov-jdk15on:1.70'
// Dotenv manager
implementation 'io.github.cdimascio:java-dotenv:5.2.2'
// Minio S3 Storage
implementation 'io.minio:minio:8.5.12'
runtimeOnly 'org.postgresql:postgresql'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'

View file

@ -1,28 +0,0 @@
package com.mixel.docusphere.config;
import io.github.cdimascio.dotenv.Dotenv;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import javax.sql.DataSource;
import org.springframework.boot.jdbc.DataSourceBuilder;
@Configuration
public class DataSourceConfig {
@Bean
@Primary
public DataSource dataSource() {
// Load environment variables from .env file
Dotenv dotenv = Dotenv.configure().load();
// Build the DataSource using Dotenv values
DataSourceBuilder<?> dataSourceBuilder = DataSourceBuilder.create()
.driverClassName("org.postgresql.Driver")
.url(dotenv.get("DB_URL"))
.username(dotenv.get("DB_USER"))
.password(dotenv.get("DB_PASSWORD"));
return dataSourceBuilder.build();
}
}

View file

@ -1,33 +0,0 @@
package com.mixel.docusphere.config;
import io.github.cdimascio.dotenv.Dotenv;
import jakarta.annotation.PostConstruct;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class DotenvConfig {
private final Dotenv dotenv;
public DotenvConfig() {
this.dotenv = Dotenv.configure()
.directory("../") // Adjust path as needed
.filename(".env")
.ignoreIfMissing()
.load();
}
@PostConstruct
public void init() {
dotenv.entries().forEach(entry ->
System.setProperty(entry.getKey(), entry.getValue())
);
System.out.println("Dotenv variables loaded");
}
@Bean
public Dotenv dotenv() {
return dotenv;
}
}

View file

@ -4,6 +4,9 @@ spring:
datasource:
driver-class-name: org.postgresql.Driver
url: jdbc:postgresql://localhost:5432/docusphere
username: ${DB_USER}
password: ${DB_PASSWORD}
jpa:
hibernate:
@ -17,10 +20,3 @@ logging:
level:
org.hibernate.SQL: debug
org.hibernate.type.descriptor.sql.BasicBinder: trace
org.springframework.core.env: debug
minio:
endpoint: "http://localhost:9000" # Your MinIO endpoint URL
access-key: ${MINIO_ACCESS_KEY} # Environment variable for the access key
secret-key: ${MINIO_SECRET_KEY} # Environment variable for the secret key
bucket-name: docusphere # The bucket name you want to use

View file

@ -2,6 +2,7 @@
import { ref } from "vue";
const showSearch = ref(false);
const userProfileActions = ref(false);
</script>
<template>
@ -21,12 +22,7 @@ const showSearch = ref(false);
<!---------------->
<!-- Search Bar -->
<!---------------->
<v-btn
class="mr-1"
icon="mdi-magnify"
@click="showSearch = !showSearch"
>
</v-btn>
<v-btn icon="mdi-magnify" @click="showSearch = !showSearch"> </v-btn>
<v-slide-x-reverse-transition hide-on-leave>
<v-responsive v-show="showSearch" min-width="20vw">