mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
feat: update docker-compose.yml for selfhost
This commit is contained in:
parent
437ea72ed4
commit
292c182eb2
9 changed files with 68 additions and 84 deletions
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -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)]
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue