Compare commits

...

3 commits

Author SHA1 Message Date
Paolo Barbolini
ef5a4b68bb
docker: bump Debian to v12 (#200) 2023-07-29 21:33:26 +01:00
Paolo Barbolini
1b90a41f6a
docker: add missing libcurl dependency (#199) 2023-07-29 21:18:42 +01:00
Paolo Barbolini
6301ac943a
Bump dependencies (#198) 2023-07-29 20:37:22 +01:00
4 changed files with 1505 additions and 404 deletions

1889
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -15,20 +15,20 @@ badge = { path = "./libs/badge" }
anyhow = "1" anyhow = "1"
cadence = "0.29" cadence = "0.29"
crates-index = "0.19" crates-index = { version = "2", default-features = false, features = ["git-https"] }
derive_more = "0.99" derive_more = "0.99"
font-awesome-as-a-crate = "0.3" font-awesome-as-a-crate = "0.3"
futures-util = { version = "0.3", default-features = false, features = ["std"] } futures-util = { version = "0.3", default-features = false, features = ["std"] }
hyper = { version = "0.14.10", features = ["full"] } hyper = { version = "0.14.10", features = ["full"] }
indexmap = { version = "1", features = ["serde-1"] } indexmap = { version = "2", features = ["serde"] }
lru_time_cache = "0.11.1" lru_time_cache = "0.11.1"
maud = "0.24" maud = "0.25"
once_cell = "1" once_cell = "1"
pulldown-cmark = "0.9" pulldown-cmark = "0.9"
relative-path = { version = "1.3", features = ["serde"] } relative-path = { version = "1.3", features = ["serde"] }
reqwest = { version = "0.11", features = ["json"] } reqwest = { version = "0.11", features = ["json"] }
route-recognizer = "0.3" route-recognizer = "0.3"
rustsec = "0.26" rustsec = "0.27"
semver = { version = "1.0", features = ["serde"] } semver = { version = "1.0", features = ["serde"] }
serde = { version = "1", features = ["derive"] } serde = { version = "1", features = ["derive"] }
serde_json = "1" serde_json = "1"

View file

@ -1,16 +1,16 @@
FROM rust:bullseye as build FROM rust:bookworm as build
COPY . /src COPY . /src
RUN cargo install --path /src RUN cargo install --path /src
FROM debian:bullseye FROM debian:bookworm
LABEL org.opencontainers.image.source https://github.com/deps-rs/deps.rs LABEL org.opencontainers.image.source https://github.com/deps-rs/deps.rs
RUN set -ex; \ RUN set -ex; \
apt-get update; \ apt-get update; \
DEBIAN_FRONTEND=noninteractive \ DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends ca-certificates libssl-dev; \ apt-get install -y --no-install-recommends ca-certificates libssl-dev libcurl4-openssl-dev; \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
COPY --from=build /usr/local/cargo/bin/shiny-robots /usr/local/bin COPY --from=build /usr/local/cargo/bin/shiny-robots /usr/local/bin

View file

@ -5,21 +5,21 @@ use std::time::Duration;
use crate::models::crates::CrateName; use crate::models::crates::CrateName;
use anyhow::Result; use anyhow::Result;
use crates_index::Crate; use crates_index::Crate;
use crates_index::Index; use crates_index::GitIndex;
use slog::{error, Logger}; use slog::{error, Logger};
use tokio::task::spawn_blocking; use tokio::task::spawn_blocking;
use tokio::time::{self, MissedTickBehavior}; use tokio::time::{self, MissedTickBehavior};
#[derive(Clone)] #[derive(Clone)]
pub struct ManagedIndex { pub struct ManagedIndex {
index: Arc<Mutex<Index>>, index: Arc<Mutex<GitIndex>>,
logger: Logger, logger: Logger,
} }
impl ManagedIndex { impl ManagedIndex {
pub fn new(logger: Logger) -> Self { pub fn new(logger: Logger) -> Self {
// the index path is configurable through the `CARGO_HOME` env variable // the index path is configurable through the `CARGO_HOME` env variable
let index = Arc::new(Mutex::new(Index::new_cargo_default().unwrap())); let index = Arc::new(Mutex::new(GitIndex::new_cargo_default().unwrap()));
Self { index, logger } Self { index, logger }
} }