diff --git a/Dockerfile b/Dockerfile index 1fafa9ce..24f75445 100644 --- a/Dockerfile +++ b/Dockerfile @@ -183,9 +183,14 @@ LABEL org.opencontainers.image.source="https://github.com/andrewgazelka/hyperion org.opencontainers.image.description="Hyperion Tag Event" \ org.opencontainers.image.version="0.1.0" +ENTRYPOINT ["/tag"] +CMD ["--ip", "0.0.0.0", "--port", "35565"] + FROM antithesis-runtime-base AS antithesis-bot COPY --from=antithesis /app/antithesis-bot / LABEL org.opencontainers.image.source="https://github.com/andrewgazelka/hyperion" \ org.opencontainers.image.description="Hyperion Antithesis Bot" \ - org.opencontainers.image.version="0.1.0" \ No newline at end of file + org.opencontainers.image.version="0.1.0" + +ENTRYPOINT ["/antithesis-bot"] \ No newline at end of file diff --git a/antithesis/docker-compose.yml b/antithesis/docker-compose.yml index 95cbc2f0..54c3141b 100644 --- a/antithesis/docker-compose.yml +++ b/antithesis/docker-compose.yml @@ -40,17 +40,20 @@ services: platform: linux/amd64 restart: unless-stopped environment: - - HOST=hyperion-proxy:25565 + - ADDRESS=hyperion-proxy:25565 - RUST_LOG=info networks: - proxy-network + depends_on: + - hyperion-proxy build: context: .. dockerfile: Dockerfile target: antithesis-bot + networks: proxy-network: driver: bridge \ No newline at end of file diff --git a/tools/antithesis-bot/src/lib.rs b/tools/antithesis-bot/src/lib.rs index 99a510d8..f6c93254 100644 --- a/tools/antithesis-bot/src/lib.rs +++ b/tools/antithesis-bot/src/lib.rs @@ -5,7 +5,7 @@ mod bot; #[derive(Deserialize, Debug)] pub struct LaunchArguments { - ip: String, + address: String, #[serde(default = "default_bot_count")] bot_count: u32, @@ -28,14 +28,14 @@ pub async fn start(args: LaunchArguments) -> eyre::Result<()> { tracing::info!("args = {args:?}"); - let LaunchArguments { ip, bot_count } = args; + let LaunchArguments { address, bot_count } = args; if bot_count > UNUSUALLY_HIGH_BOT_THRESHOLD { tracing::warn!("bot_count {bot_count} is unusually high. This may cause issues."); } for _ in 0..bot_count { - bot::launch(&ip).await?; + bot::launch(&address).await?; } Ok(()) diff --git a/tools/antithesis-bot/src/main.rs b/tools/antithesis-bot/src/main.rs index fe185ec1..cb789fc2 100644 --- a/tools/antithesis-bot/src/main.rs +++ b/tools/antithesis-bot/src/main.rs @@ -1,11 +1,11 @@ use antithesis_bot::LaunchArguments; -use tracing::warn; +use tracing::trace; #[tokio::main] async fn main() -> eyre::Result<()> { tracing_subscriber::fmt::init(); if let Err(e) = dotenvy::dotenv() { - warn!("Failed to load .env file: {}", e); + trace!("Failed to load .env file: {}", e); } // Deserialize environment variables into the struct