Skip to content

Commit

Permalink
Rearange private key, dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
kokal33 committed Oct 5, 2023
1 parent ba7b418 commit 3cd172d
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 40 deletions.
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM rust:1.71 AS builder
COPY Cargo.toml Cargo.lock gh-private-key.pem ./
COPY ./http-server ./http-server
COPY ./database ./database
COPY ./lib ./lib
COPY ./fplus ./fplus

# Change workdir to http-server and then build
WORKDIR ./http-server
RUN cargo build --release

FROM debian:bullseye

# Needed for openssl(hyper uses it)
RUN apt-get update && apt-get install -y libssl-dev ca-certificates && rm -rf /var/lib/apt/lists/*
COPY --from=builder ./http-server/target/release/http-server ./target/release/http-server
CMD ["/target/release/http-server"]
File renamed without changes.
11 changes: 0 additions & 11 deletions http-server/Dockerfile

This file was deleted.

28 changes: 0 additions & 28 deletions lib/gh-private-key.pem

This file was deleted.

2 changes: 1 addition & 1 deletion lib/src/external_services/github.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ impl GithubWrapper<'static> {
.pool_idle_timeout(std::time::Duration::from_secs(15))
.build(connector);
let key =
jsonwebtoken::EncodingKey::from_rsa_pem(include_bytes!("../../gh-private-key.pem"))
jsonwebtoken::EncodingKey::from_rsa_pem(include_bytes!("../../../gh-private-key.pem"))
.unwrap();
let octocrab = OctocrabBuilder::new_empty()
.with_service(client)
Expand Down

0 comments on commit 3cd172d

Please sign in to comment.