Compare commits

..

No commits in common. "5648c76f788adab6796a18fac4739e68b842c3fe" and "f790438104a26f7b8cde2bfff8caba36a7137c18" have entirely different histories.

7 changed files with 272 additions and 424 deletions

1
.gitignore vendored
View File

@ -8,4 +8,3 @@ target
# Testing
test-results
tmp

View File

@ -11,17 +11,17 @@ RUN pnpm run build
# BACKEND
FROM rust:1.80-alpine as backend
FROM rust:1.76-alpine as backend
WORKDIR /tmp
RUN apk add --no-cache libc-dev openssl-dev alpine-sdk
COPY ./packages/backend ./
RUN RUSTFLAGS="-Ctarget-feature=-crt-static" cargo build --release
RUN cargo build --release
# RUNNER
FROM alpine:3.19
WORKDIR /app
RUN apk add --no-cache curl libgcc
RUN apk add --no-cache curl
COPY --from=backend /tmp/target/release/cryptgeon .
COPY --from=client /tmp/packages/frontend/build ./frontend
ENV FRONTEND_PATH="./frontend"

View File

@ -1,6 +1,8 @@
# DEV Compose file.
# For a production file see: README.md
version: '3.8'
services:
redis:
image: redis:7-alpine

View File

@ -1,3 +1,5 @@
version: '3.8'
services:
redis:
image: redis:7-alpine
@ -14,7 +16,7 @@ services:
SIZE_LIMIT: 4 MiB
ports:
- 80:8000
# Optional health checks
# healthcheck:
# test: ["CMD", "curl", "--fail", "http://127.0.0.1:8000/api/live/"]

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,7 @@ name = "cryptgeon"
version = "2.6.1"
authors = ["cupcakearmy <hi@nicco.io>"]
edition = "2021"
rust-version = "1.80"
rust-version = "1.76"
[[bin]]
name = "cryptgeon"
@ -22,4 +22,4 @@ dotenv = "0.15"
mime = "0.3"
env_logger = "0.9"
log = "0.4"
redis = { version = "0.25.2", features = ["tls-native-tls"] }
redis = "0.23"

View File

@ -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 i64)
conn.expire(id, seconds as usize)
.map_err(|_| "Unable to set expiration on notion")?
}
None => {}