Skip to content

Commit

Permalink
fix: fix anda_bot config env
Browse files Browse the repository at this point in the history
  • Loading branch information
zensh committed Jan 20, 2025
1 parent 5647085 commit 83b693b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions agents/anda_bot/nitro_enclave/amd64.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,7 @@ COPY agents/anda_bot/nitro_enclave/supervisord.conf /etc/supervisord.conf
COPY agents/anda_bot/nitro_enclave/Config.toml agents/anda_bot/nitro_enclave/Character.toml agents/anda_bot/nitro_enclave/setup.sh ./
RUN chmod +x setup.sh && ls -la

ENV LOG_LEVEL=info CONFIG_FILE_PATH=/app/Config.toml

# entry point
ENTRYPOINT [ "/app/setup.sh" ]
2 changes: 1 addition & 1 deletion agents/anda_bot/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ pub struct Conf {
impl Conf {
pub fn new() -> Result<Self, BoxError> {
let file_name =
std::env::var("CONFIG_FILE_PATH").unwrap_or_else(|_| "./config.toml".into());
std::env::var("CONFIG_FILE_PATH").unwrap_or_else(|_| "./Config.toml".into());
let mut cfg = Self::from(&file_name)?;
cfg.character.content = std::fs::read_to_string(&cfg.character.path)?;
Ok(cfg)
Expand Down

0 comments on commit 83b693b

Please sign in to comment.