Docker
All checks were successful
All checks were successful
This commit is contained in:
3
Cargo.lock
generated
3
Cargo.lock
generated
@@ -894,6 +894,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d"
|
||||
dependencies = [
|
||||
"futures-core",
|
||||
"futures-sink",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2074,6 +2075,7 @@ dependencies = [
|
||||
"pile-flac",
|
||||
"pile-io",
|
||||
"regex",
|
||||
"reqwest",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"smartstring",
|
||||
@@ -2298,6 +2300,7 @@ dependencies = [
|
||||
"base64",
|
||||
"bytes",
|
||||
"encoding_rs",
|
||||
"futures-channel",
|
||||
"futures-core",
|
||||
"futures-util",
|
||||
"h2",
|
||||
|
||||
@@ -87,6 +87,8 @@ utoipa-swagger-ui = { version = "9.0.2", features = [
|
||||
"debug-embed",
|
||||
"vendored",
|
||||
] }
|
||||
reqwest = { version = "0.12", features = ["blocking"] }
|
||||
|
||||
|
||||
# Async & Parallelism
|
||||
tokio = { version = "1.49.0", features = ["full"] }
|
||||
|
||||
@@ -29,6 +29,7 @@ RUN apt-get update && \
|
||||
|
||||
COPY --from=build \
|
||||
/app/rust/target/release/pile \
|
||||
/app/rust/target/release/libpdfium.so \
|
||||
/app/bin/
|
||||
|
||||
ENV PATH="/app/bin:$PATH"
|
||||
|
||||
@@ -34,6 +34,9 @@ mime_guess = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
strum = { workspace = true }
|
||||
|
||||
[build-dependencies]
|
||||
reqwest = { workspace = true }
|
||||
|
||||
[features]
|
||||
default = []
|
||||
pdfium = ["dep:pdfium-render"]
|
||||
|
||||
@@ -69,11 +69,14 @@ fn main() {
|
||||
|
||||
eprintln!("cargo:warning=Downloading PDFium from {url}");
|
||||
|
||||
let status = std::process::Command::new("curl")
|
||||
.args(["-L", "--fail", "-o", tgz_path.to_str().unwrap(), &url])
|
||||
.status()
|
||||
.expect("failed to run curl");
|
||||
assert!(status.success(), "curl failed to download PDFium");
|
||||
let response = reqwest::blocking::get(&url).expect("failed to download PDFium");
|
||||
assert!(
|
||||
response.status().is_success(),
|
||||
"failed to download PDFium: {}",
|
||||
response.status()
|
||||
);
|
||||
let bytes = response.bytes().expect("failed to read PDFium response");
|
||||
std::fs::write(&tgz_path, &bytes).expect("failed to write pdfium.tgz");
|
||||
|
||||
let status = std::process::Command::new("tar")
|
||||
.args([
|
||||
|
||||
14
docker-compose.yml
Normal file
14
docker-compose.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
services:
|
||||
pile:
|
||||
#image: git.betalupi.com/mark/pile:latest
|
||||
image: pile
|
||||
container_name: pile
|
||||
restart: unless-stopped
|
||||
|
||||
ports:
|
||||
- 7100:7100
|
||||
volumes:
|
||||
- "./x.ignore/books:/data/books:ro"
|
||||
- "./pile:/workdir"
|
||||
|
||||
command: "pile server -c /data/books/pile.toml --workdir /workdir 0.0.0.0:7100"
|
||||
Reference in New Issue
Block a user