refactor/significant-changes #3

Merged
mkelvers merged 71 commits from refactor/significant-changes into main 2026-05-14 11:25:25 +00:00
2 changed files with 3 additions and 6 deletions
Showing only changes of commit 239957d261 - Show all commits

View File

@@ -42,8 +42,8 @@ RUN apt-get update && apt-get install -y ca-certificates sqlite3 && rm -rf /var/
# Create data directory for sqlite
RUN mkdir -p /app/data
# Set DB_PATH to use the persistent volume
ENV DB_PATH=/app/data/mal.db
# Set DATABASE_FILE to use the persistent volume
ENV DATABASE_FILE=/app/data/mal.db
COPY --from=builder /app/main_server .
COPY --from=builder /app/templates ./templates

View File

@@ -24,10 +24,7 @@ var Module = fx.Options(
)
func ProvideSQLDB() (*sql.DB, error) {
dbPath := os.Getenv("DB_PATH")
if dbPath == "" {
dbPath = "mal.db"
}
dbPath := db.GetDBFile()
dbConn, err := db.Open(dbPath)
if err != nil {
return nil, fmt.Errorf("failed to open database: %w", err)