This commit is contained in:
2024-05-05 15:06:14 +02:00
parent 08f52381d2
commit 2776d657a1
4 changed files with 7 additions and 1 deletions

1
Cargo.lock generated
View File

@@ -3859,6 +3859,7 @@ dependencies = [
"base64 0.22.0", "base64 0.22.0",
"bytes", "bytes",
"chrono", "chrono",
"dotenv",
"futures", "futures",
"futures-core", "futures-core",
"minio-rsc", "minio-rsc",

View File

@@ -13,6 +13,8 @@ members = [
[dependencies] [dependencies]
once_cell = "1.19.0" once_cell = "1.19.0"
dotenv = "0.15.0"
prisma-client-rust = { git = "https://github.com/Brendonovich/prisma-client-rust", tag = "0.6.10", default-features = false, features = ["postgresql"] } prisma-client-rust = { git = "https://github.com/Brendonovich/prisma-client-rust", tag = "0.6.10", default-features = false, features = ["postgresql"] }
serde = { version = "1.0.198", features = ["derive"] } serde = { version = "1.0.198", features = ["derive"] }
serde_json = "1.0.116" serde_json = "1.0.116"

View File

@@ -1,5 +1,5 @@
#! /usr/bin/env sh #! /usr/bin/env sh
export $(/env.sh) /env.sh > ./.env
exec /usr/local/bin/telegram_files_cache_server exec /usr/local/bin/telegram_files_cache_server

View File

@@ -4,6 +4,7 @@ pub mod prisma;
pub mod services; pub mod services;
pub mod views; pub mod views;
use dotenv::dotenv;
use sentry::{integrations::debug_images::DebugImagesIntegration, types::Dsn, ClientOptions}; use sentry::{integrations::debug_images::DebugImagesIntegration, types::Dsn, ClientOptions};
use std::{net::SocketAddr, str::FromStr}; use std::{net::SocketAddr, str::FromStr};
use tracing::info; use tracing::info;
@@ -12,6 +13,8 @@ use crate::views::get_router;
#[tokio::main] #[tokio::main]
async fn main() { async fn main() {
dotenv().ok();
let options = ClientOptions { let options = ClientOptions {
dsn: Some(Dsn::from_str(&config::CONFIG.sentry_dsn).unwrap()), dsn: Some(Dsn::from_str(&config::CONFIG.sentry_dsn).unwrap()),
default_integrations: false, default_integrations: false,