This commit is contained in:
@@ -5,6 +5,8 @@ const UPDATE_DEPLOYMENT_IMAGE: &str = "docker.io/kasperhermansen/update-deployme
|
|||||||
|
|
||||||
const CADDY_IMAGE: &str = "caddy:v2.10.0";
|
const CADDY_IMAGE: &str = "caddy:v2.10.0";
|
||||||
|
|
||||||
|
const ZOLA_PLATFORM: &str = "x86_64";
|
||||||
|
|
||||||
const ZOLA_VERSION: &str = "0.21.0";
|
const ZOLA_VERSION: &str = "0.21.0";
|
||||||
const DEBIAN_EDITION: &str = "bookworm";
|
const DEBIAN_EDITION: &str = "bookworm";
|
||||||
const DEBIAN_PLATFORM: &str = "amd64";
|
const DEBIAN_PLATFORM: &str = "amd64";
|
||||||
@@ -63,7 +65,7 @@ async fn build(client: dagger_sdk::Query) -> eyre::Result<(i64, Container)> {
|
|||||||
.build()?,
|
.build()?,
|
||||||
);
|
);
|
||||||
|
|
||||||
let github_zola_download: String = format!("https://github.com/barnumbirr/zola-debian/releases/download/v{ZOLA_VERSION}/zola_{ZOLA_VERSION}_{DEBIAN_PLATFORM}_{DEBIAN_EDITION}.deb");
|
// let github_zola_download: String = format!("https://github.com/barnumbirr/zola-debian/releases/download/v{ZOLA_VERSION}/zola_{ZOLA_VERSION}_{DEBIAN_PLATFORM}_{DEBIAN_EDITION}.deb");
|
||||||
let node_cache = client.cache_volume("node_cache");
|
let node_cache = client.cache_volume("node_cache");
|
||||||
let debian_cache = client.cache_volume("debian_cache");
|
let debian_cache = client.cache_volume("debian_cache");
|
||||||
|
|
||||||
@@ -79,6 +81,8 @@ async fn build(client: dagger_sdk::Query) -> eyre::Result<(i64, Container)> {
|
|||||||
|
|
||||||
let tag = chrono::Utc::now().timestamp();
|
let tag = chrono::Utc::now().timestamp();
|
||||||
|
|
||||||
|
let zola_download_link = format!("https://github.com/getzola/zola/releases/download/{ZOLA_VERSION}/zola-{ZOLA_VERSION}-{ZOLA_PLATFORM}-unknown-linux-gnu.tar.gz");
|
||||||
|
|
||||||
let dist_dir = client
|
let dist_dir = client
|
||||||
.container_opts(
|
.container_opts(
|
||||||
dagger_sdk::QueryContainerOptsBuilder::default()
|
dagger_sdk::QueryContainerOptsBuilder::default()
|
||||||
@@ -86,16 +90,19 @@ async fn build(client: dagger_sdk::Query) -> eyre::Result<(i64, Container)> {
|
|||||||
.build()?,
|
.build()?,
|
||||||
)
|
)
|
||||||
.from(format!("debian:{DEBIAN_EDITION}"))
|
.from(format!("debian:{DEBIAN_EDITION}"))
|
||||||
.with_exec(vec!["apt", "update"])
|
// .with_exec(vec!["apt", "update"])
|
||||||
.with_exec(vec!["apt", "install", "wget", "-y"])
|
// .with_exec(vec!["apt", "install", "wget", "-y"])
|
||||||
.with_workdir("/mnt")
|
.with_workdir("/mnt")
|
||||||
.with_mounted_cache("/mnt", debian_cache)
|
.with_file("/mnt/zola.tar.gz", client.http(zola_download_link))
|
||||||
.with_exec(vec!["wget", &github_zola_download])
|
.with_exec(vec!["tar", "-xvf", "/mnt/zola.tar.gz"])
|
||||||
.with_exec(vec![
|
.with_exec(vec!["mv", "/mnt/zola", "/usr/local/bin/zola"])
|
||||||
"dpkg",
|
// .with_mounted_cache("/mnt", debian_cache)
|
||||||
"-i",
|
// .with_exec(vec!["wget", &github_zola_download])
|
||||||
format!("zola_{ZOLA_VERSION}_{DEBIAN_PLATFORM}_{DEBIAN_EDITION}.deb").as_str(),
|
// .with_exec(vec![
|
||||||
])
|
// "dpkg",
|
||||||
|
// "-i",
|
||||||
|
// format!("zola_{ZOLA_VERSION}_{DEBIAN_PLATFORM}_{DEBIAN_EDITION}.deb").as_str(),
|
||||||
|
// ])
|
||||||
.with_workdir("/app")
|
.with_workdir("/app")
|
||||||
.with_directory(".", src)
|
.with_directory(".", src)
|
||||||
.with_file("static/styles/styles.css", styles_file)
|
.with_file("static/styles/styles.css", styles_file)
|
||||||
|
Reference in New Issue
Block a user