mirror of
https://github.com/cupcakearmy/cryptgeon.git
synced 2024-12-23 00:36: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
|
# Testing
|
||||||
test-results
|
test-results
|
||||||
|
tmp
|
||||||
|
@ -11,17 +11,17 @@ RUN pnpm run build
|
|||||||
|
|
||||||
|
|
||||||
# BACKEND
|
# BACKEND
|
||||||
FROM rust:1.76-alpine as backend
|
FROM rust:1.80-alpine as backend
|
||||||
WORKDIR /tmp
|
WORKDIR /tmp
|
||||||
RUN apk add --no-cache libc-dev openssl-dev alpine-sdk
|
RUN apk add --no-cache libc-dev openssl-dev alpine-sdk
|
||||||
COPY ./packages/backend ./
|
COPY ./packages/backend ./
|
||||||
RUN cargo build --release
|
RUN RUSTFLAGS="-Ctarget-feature=-crt-static" cargo build --release
|
||||||
|
|
||||||
|
|
||||||
# RUNNER
|
# RUNNER
|
||||||
FROM alpine:3.19
|
FROM alpine:3.19
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN apk add --no-cache curl
|
RUN apk add --no-cache curl libgcc
|
||||||
COPY --from=backend /tmp/target/release/cryptgeon .
|
COPY --from=backend /tmp/target/release/cryptgeon .
|
||||||
COPY --from=client /tmp/packages/frontend/build ./frontend
|
COPY --from=client /tmp/packages/frontend/build ./frontend
|
||||||
ENV FRONTEND_PATH="./frontend"
|
ENV FRONTEND_PATH="./frontend"
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
# DEV Compose file.
|
# DEV Compose file.
|
||||||
# For a production file see: README.md
|
# For a production file see: README.md
|
||||||
|
|
||||||
version: '3.8'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
redis:
|
redis:
|
||||||
image: redis:7-alpine
|
image: redis:7-alpine
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
version: '3.8'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
redis:
|
redis:
|
||||||
image: redis:7-alpine
|
image: redis:7-alpine
|
||||||
|
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"
|
version = "2.6.1"
|
||||||
authors = ["cupcakearmy <hi@nicco.io>"]
|
authors = ["cupcakearmy <hi@nicco.io>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
rust-version = "1.76"
|
rust-version = "1.80"
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "cryptgeon"
|
name = "cryptgeon"
|
||||||
@ -22,4 +22,4 @@ dotenv = "0.15"
|
|||||||
mime = "0.3"
|
mime = "0.3"
|
||||||
env_logger = "0.9"
|
env_logger = "0.9"
|
||||||
log = "0.4"
|
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 {
|
match note.expiration {
|
||||||
Some(e) => {
|
Some(e) => {
|
||||||
let seconds = e - now();
|
let seconds = e - now();
|
||||||
conn.expire(id, seconds as usize)
|
conn.expire(id, seconds as i64)
|
||||||
.map_err(|_| "Unable to set expiration on notion")?
|
.map_err(|_| "Unable to set expiration on notion")?
|
||||||
}
|
}
|
||||||
None => {}
|
None => {}
|
||||||
|
Loading…
Reference in New Issue
Block a user