From d22bb5908d6968df0591fef31208aa24a6371d84 Mon Sep 17 00:00:00 2001 From: hgw Date: Thu, 5 Oct 2023 00:01:23 +0000 Subject: [PATCH] Create config directory and move hof+irc_config to it, preparation for docker image publishing --- .dockerignore | 6 ++---- .gitignore | 4 ++-- Dockerfile | 1 - example.irc_config.yaml => config/example.irc_config.yaml | 0 docker-compose.yml | 6 +++--- src/main.rs | 4 ++-- 6 files changed, 9 insertions(+), 12 deletions(-) rename example.irc_config.yaml => config/example.irc_config.yaml (100%) diff --git a/.dockerignore b/.dockerignore index a69e151..116f35c 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,8 +1,6 @@ ircie/ -save/ +config/ .gitignore docker-compose.yml Dockerfile -example.irc_config.yml -IDEAS -irc_config.yaml \ No newline at end of file +IDEAS \ No newline at end of file diff --git a/.gitignore b/.gitignore index 4c56058..1a42270 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ /target Cargo.lock -irc_config.yaml -/save +config/irc_config.yaml +config/hall_of_fame.yaml /ircie \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 63653e9..e025513 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,5 @@ FROM rust:bookworm WORKDIR /app -RUN mkdir save RUN git clone https://git.supernets.org/sad/ircie.git COPY . . RUN cargo build --release diff --git a/example.irc_config.yaml b/config/example.irc_config.yaml similarity index 100% rename from example.irc_config.yaml rename to config/example.irc_config.yaml diff --git a/docker-compose.yml b/docker-compose.yml index 7fcc9f2..1bab296 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,6 @@ services: hardfight: - build: . + image: git.supernets.org/hgw/hardfight:latest + #build: . volumes: - - "$PWD/irc_config.yaml:/app/irc_config.yaml" - - "$PWD/save:/app/save" \ No newline at end of file + - "$PWD/config/:/app/config/" \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index 41cf98b..e253765 100644 --- a/src/main.rs +++ b/src/main.rs @@ -21,7 +21,7 @@ use rand::{ }; use serde::{Deserialize, Serialize}; -const SAVE_LOC: &'static str = "save/hall_of_fame.yaml"; +const SAVE_LOC: &'static str = "config/hall_of_fame.yaml"; const PRESENTATIONS: &'static [&'static str] = &[ "A faggot coming straight from the underground!", @@ -234,7 +234,7 @@ impl Fight { async fn main() -> std::io::Result<()> { env_logger::init(); - let mut irc = Irc::from_config("irc_config.yaml").await?; + let mut irc = Irc::from_config("config/irc_config.yaml").await?; irc.add_resource(Fight::default()) .await