Build static musl OCSP image in Gitea Actions
CI / Build and push docker image (push) Successful in 3m23s
CI / Build and push OCSP image (push) Successful in 7m53s

This commit is contained in:
2026-10-23 10:00:36 +00:00
parent 0384995570
commit 69d78939a1
9 changed files with 166 additions and 535 deletions
+12 -1
View File
@@ -75,7 +75,18 @@ async fn health() -> &'static str {
fn healthcheck() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
use std::io::{Read, Write};
let mut stream = std::net::TcpStream::connect("127.0.0.1:2560")?;
use std::net::{IpAddr, Ipv4Addr, SocketAddr};
let config = config::load_config()?;
let host = if config.listen.ip().is_unspecified() {
match config.listen.ip() {
IpAddr::V4(_) => IpAddr::V4(Ipv4Addr::LOCALHOST),
IpAddr::V6(_) => IpAddr::V6(std::net::Ipv6Addr::LOCALHOST),
}
} else {
config.listen.ip()
};
let socket = SocketAddr::new(host, config.listen.port());
let mut stream = std::net::TcpStream::connect(socket)?;
stream.write_all(b"GET /healthz HTTP/1.0\r\nHost: localhost\r\n\r\n")?;
let mut response = String::new();
stream.read_to_string(&mut response)?;
+2 -2
View File
@@ -46,12 +46,12 @@ impl ObjectStore for StatusStore {
.key(key)
.send()
.await
.map_err(|error| StoreError::S3(error.to_string()))?;
.map_err(|error| StoreError::S3(format!("{error:?}")))?;
let data = response
.body
.collect()
.await
.map_err(|error| StoreError::S3(error.to_string()))?
.map_err(|error| StoreError::S3(format!("{error:?}")))?
.into_bytes();
Ok(data)
}