feat: update docker-compose.yml for selfhost

This commit is contained in:
alyssa 2025-04-13 22:05:14 +00:00
parent 437ea72ed4
commit 292c182eb2
9 changed files with 68 additions and 84 deletions

View file

@ -40,6 +40,19 @@ async fn real_main() -> anyhow::Result<()> {
.await?,
);
// hacky, but needed for selfhost for now
if let Some(target) = libpk::config
.discord
.as_ref()
.unwrap()
.gateway_target
.clone()
{
runtime_config
.set(RUNTIME_CONFIG_KEY_EVENT_TARGET.to_string(), target)
.await?;
}
let shard_state = discord::shard_state::new(redis.clone());
let cache = Arc::new(discord::cache::new());
let awaiter = Arc::new(EventAwaiter::new());

View file

@ -24,6 +24,9 @@ pub struct DiscordConfig {
#[serde(default = "_default_api_addr")]
pub cache_api_addr: String,
#[serde(default)]
pub gateway_target: Option<String>,
}
#[derive(Deserialize, Debug)]

View file

@ -188,9 +188,7 @@ pub async fn update_stats_api(ctx: AppCtx) -> anyhow::Result<()> {
let data = resp.json::<PrometheusResult>().await?;
let error_handler = || {
anyhow::anyhow!("missing data at {}", $q)
};
let error_handler = || anyhow::anyhow!("missing data at {}", $q);
data.data
.result