Skip to content

Commit

Permalink
chore: fixed docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
paulobressan committed Aug 5, 2024
1 parent 1068b04 commit c5a9e48
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions docker/dockerfile.rpc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ FROM rust:1.79-slim-buster
RUN apt update
RUN apt install -y build-essential pkg-config libssl-dev libsasl2-dev cmake

WORKDIR /app

COPY --from=build /app/target/release/rpc .
COPY ./data ./data

CMD ["./rpc"]
LABEL service=rpc
4 changes: 2 additions & 2 deletions src/domain/utils/mod.rs → src/domain/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ lazy_static! {
}

fn load_adjectives() -> Vec<String> {
let path = Path::new("src/domain/utils/adjectives.json");
let path = Path::new("data/adjectives.json");
let file = File::open(path).expect("invalid adjectives file path");
let reader = BufReader::new(file);
serde_json::from_reader(reader).expect("adjectives file must be a json array of string")
}

fn load_nouns() -> Vec<String> {
let path = Path::new("src/domain/utils/nouns.json");
let path = Path::new("data/nouns.json");
let file = File::open(path).expect("invalid nouns file path");
let reader = BufReader::new(file);
serde_json::from_reader(reader).expect("nouns file must be a json array of string")
Expand Down

0 comments on commit c5a9e48

Please sign in to comment.