Skip to content

Commit

Permalink
Merge pull request #130 from DDd-Devops/add-redis-tls-feature
Browse files Browse the repository at this point in the history
Add redis tls feature 'rediss://'
  • Loading branch information
cupcakearmy authored Aug 22, 2024
2 parents f790438 + f8c1748 commit 0d9f3fe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ FROM rust:1.76-alpine as backend
WORKDIR /tmp
RUN apk add --no-cache libc-dev openssl-dev alpine-sdk
COPY ./packages/backend ./
RUN cargo build --release
RUN RUSTFLAGS="-Ctarget-feature=-crt-static" cargo build --release


# RUNNER
FROM alpine:3.19
WORKDIR /app
RUN apk add --no-cache curl
RUN apk add --no-cache curl libgcc
COPY --from=backend /tmp/target/release/cryptgeon .
COPY --from=client /tmp/packages/frontend/build ./frontend
ENV FRONTEND_PATH="./frontend"
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ dotenv = "0.15"
mime = "0.3"
env_logger = "0.9"
log = "0.4"
redis = "0.23"
redis = { version = "0.25.2", features = ["tls-native-tls"] }
2 changes: 1 addition & 1 deletion packages/backend/src/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub fn set(id: &String, note: &Note) -> Result<(), &'static str> {
match note.expiration {
Some(e) => {
let seconds = e - now();
conn.expire(id, seconds as usize)
conn.expire(id, seconds as i64)
.map_err(|_| "Unable to set expiration on notion")?
}
None => {}
Expand Down

0 comments on commit 0d9f3fe

Please sign in to comment.