Compare commits

...

3 Commits

Author SHA1 Message Date
hgw
8c2dd1cc3b
Add example config file 2023-10-04 12:17:13 +00:00
hgw
99e4aaa0d7
Support pulling ircie during the docker build 2023-10-04 12:16:52 +00:00
hgw
35f99f5e0e
Add docker support 2023-10-04 12:15:57 +00:00
7 changed files with 40 additions and 3 deletions

2
.dockerignore Normal file
View File

@ -0,0 +1,2 @@
irc_config.yaml
/ircie

3
.gitignore vendored
View File

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

View File

@ -6,7 +6,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
ircie = { path = "../ircie" } ircie = { path = "./ircie" }
tokio = { version = "1.28.2", features = ["full"] } tokio = { version = "1.28.2", features = ["full"] }
env_logger = "0.10.0" env_logger = "0.10.0"
rand = "0.8.5" rand = "0.8.5"

7
Dockerfile Normal file
View File

@ -0,0 +1,7 @@
FROM rust:bookworm
WORKDIR /app
RUN mkdir save
RUN git clone https://github.com/ayywrk/ircie
COPY . .
RUN cargo build --release
CMD ["./target/release/hardfight"]

6
docker-compose.yml Normal file
View File

@ -0,0 +1,6 @@
services:
hardfight:
build: .
volumes:
- "$PWD/irc_config.yaml:/app/irc_config.yaml"
- "$PWD/save:/app/save"

21
example.irc_config.yaml Normal file
View File

@ -0,0 +1,21 @@
host: irc.supernets.org
port: 6697
ssl: true
channels:
- "#5000"
nick: hardfight
user: hardfight
real: hardfight
nickserv_pass: REDACTED
nickserv_email: REDACTED
cmdkey: ","
flood_interval: 1
owner: "*!*@cia.gov"
admins: []

View File

@ -21,7 +21,7 @@ use rand::{
}; };
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
const SAVE_LOC: &'static str = "hall_of_fame.yaml"; const SAVE_LOC: &'static str = "save/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!",