mirror of
https://github.com/cupcakearmy/cryptgeon.git
synced 2024-12-22 16:26:28 +00:00
Compare commits
7 Commits
f790438104
...
5648c76f78
Author | SHA1 | Date | |
---|---|---|---|
5648c76f78 | |||
7761c795df | |||
4aadeb492a | |||
0d9f3fe9c7 | |||
|
f8c17487bd | ||
|
ed3e5f48a0 | ||
|
e08c9d1871 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,3 +8,4 @@ target
|
||||
|
||||
# Testing
|
||||
test-results
|
||||
tmp
|
||||
|
@ -11,17 +11,17 @@ RUN pnpm run build
|
||||
|
||||
|
||||
# BACKEND
|
||||
FROM rust:1.76-alpine as backend
|
||||
FROM rust:1.80-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"
|
||||
|
@ -1,8 +1,6 @@
|
||||
# DEV Compose file.
|
||||
# For a production file see: README.md
|
||||
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
|
@ -1,5 +1,3 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
@ -16,7 +14,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/"]
|
||||
|
705
packages/backend/Cargo.lock
generated
705
packages/backend/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -3,7 +3,7 @@ name = "cryptgeon"
|
||||
version = "2.6.1"
|
||||
authors = ["cupcakearmy <hi@nicco.io>"]
|
||||
edition = "2021"
|
||||
rust-version = "1.76"
|
||||
rust-version = "1.80"
|
||||
|
||||
[[bin]]
|
||||
name = "cryptgeon"
|
||||
@ -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"] }
|
||||
|
@ -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 => {}
|
||||
|
Loading…
Reference in New Issue
Block a user