Create config directory and move hof+irc_config to it, preparation for docker image publishing

This commit is contained in:
hgw 2023-10-05 00:01:23 +00:00
parent 65f6abd7c9
commit d22bb5908d
Signed by: hgw
SSH Key Fingerprint: SHA256:diG7RVYHjd3aDYkZWHYcBJbImu+6zfptuUP+3k/wol4
6 changed files with 9 additions and 12 deletions

View File

@ -1,8 +1,6 @@
ircie/ ircie/
save/ config/
.gitignore .gitignore
docker-compose.yml docker-compose.yml
Dockerfile Dockerfile
example.irc_config.yml IDEAS
IDEAS
irc_config.yaml

4
.gitignore vendored
View File

@ -1,5 +1,5 @@
/target /target
Cargo.lock Cargo.lock
irc_config.yaml config/irc_config.yaml
/save config/hall_of_fame.yaml
/ircie /ircie

View File

@ -1,6 +1,5 @@
FROM rust:bookworm FROM rust:bookworm
WORKDIR /app WORKDIR /app
RUN mkdir save
RUN git clone https://git.supernets.org/sad/ircie.git RUN git clone https://git.supernets.org/sad/ircie.git
COPY . . COPY . .
RUN cargo build --release RUN cargo build --release

View File

@ -1,6 +1,6 @@
services: services:
hardfight: hardfight:
build: . image: git.supernets.org/hgw/hardfight:latest
#build: .
volumes: volumes:
- "$PWD/irc_config.yaml:/app/irc_config.yaml" - "$PWD/config/:/app/config/"
- "$PWD/save:/app/save"

View File

@ -21,7 +21,7 @@ use rand::{
}; };
use serde::{Deserialize, Serialize}; 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] = &[ const PRESENTATIONS: &'static [&'static str] = &[
"A faggot coming straight from the underground!", "A faggot coming straight from the underground!",
@ -234,7 +234,7 @@ impl Fight {
async fn main() -> std::io::Result<()> { async fn main() -> std::io::Result<()> {
env_logger::init(); 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()) irc.add_resource(Fight::default())
.await .await