fix: build all features for docker
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
kieran 2024-10-15 12:29:43 +01:00
parent b90995f07f
commit 8ce3f87dc0
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941
4 changed files with 8 additions and 11 deletions

View File

@ -18,5 +18,5 @@ steps:
- dockerd &
- docker login -u kieran -p $TOKEN git.v0l.io
- docker login -u voidic -p $TOKEN_DOCKER
- docker buildx build --push -t git.v0l.io/kieran/route96:latest -t voidic/route96:latest --build-arg FEATURES="labels,void-cat-redirects" .
- docker buildx build --push -t git.v0l.io/kieran/route96:latest -t voidic/route96:latest .
- kill $(cat /var/run/docker.pid)

View File

@ -32,7 +32,7 @@ RUN git clone --depth=1 https://git.v0l.io/Kieran/FFmpeg.git && \
--disable-static \
--enable-shared && \
make -j8 && make install
RUN cargo install --path . --root /app/build --features "${FEATURES}"
RUN cargo install --path . --root /app/build --all-features
FROM node:bookworm as ui_builder
WORKDIR /app/src

View File

@ -24,3 +24,6 @@ public_url = "http://localhost:8000"
# Analytics support
# plausible_url = "https://plausible.com/"
# Support legacy void
# void_cat_database = "postgres://postgres:postgres@localhost:41911/void"

View File

@ -1,5 +1,4 @@
use anyhow::Error;
use chrono::{DateTime, Utc};
use clap::Parser;
use config::Config;
use log::{info, warn};
@ -8,11 +7,8 @@ use route96::db::{Database, FileUpload};
use route96::filesystem::FileStore;
use route96::settings::Settings;
use route96::void_db::{VoidCatDb, VoidFile};
use sqlx::FromRow;
use sqlx_postgres::{PgPool, PgPoolOptions};
use std::path::PathBuf;
use tokio::io::{AsyncWriteExt, BufWriter};
use uuid::Uuid;
#[derive(Debug, Clone, clap::ValueEnum)]
enum ArgOperation {
@ -123,10 +119,7 @@ async fn migrate_file(
let uid = db.upsert_user(&pubkey_vec).await?;
info!("Mapped user {} => {}", &f.email, uid);
let md: Option<Vec<&str>> = match &f.media_dimensions {
Some(s) => Some(s.split("x").collect()),
_ => None,
};
let md: Option<Vec<&str>> = f.media_dimensions.as_ref().map(|s| s.split("x").collect());
let fu = FileUpload {
id: id_vec,
name: match &f.name {
@ -146,6 +139,7 @@ async fn migrate_file(
},
blur_hash: None,
alt: f.description.clone(),
..Default::default()
};
db.add_file(&fu, uid).await?;
Ok(())