diff --git a/Dockerfile b/Dockerfile index 068a7a2..5385576 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,9 +24,6 @@ RUN cargo build --release --features static # Stage 2: Create the final image FROM archlinux -# Copy the built binary from the previous stage -COPY --from=builder /app/target/release/untitled /usr/local/bin/untitled - RUN echo $'\n\ [multilib]\n\ Include = /etc/pacman.d/mirrorlist'>> /etc/pacman.conf @@ -41,6 +38,9 @@ RUN echo $'\n\ SigLevel = Optional TrustAll\n\ Server = http://localhost:8080/' >> /etc/pacman.conf +# Copy the built binary from the previous stage +COPY --from=builder /app/target/release/untitled /usr/local/bin/untitled + # Set the entry point or default command to run your application WORKDIR /app CMD ["untitled"] diff --git a/backend/src/main.rs b/backend/src/main.rs index 1e68bba..878ef38 100644 --- a/backend/src/main.rs +++ b/backend/src/main.rs @@ -24,7 +24,6 @@ use sea_orm::{Database, DatabaseConnection}; use sea_orm_migration::MigratorTrait; use std::fs; use std::fs::File; -use tar::Archive; use tokio::fs::symlink; use tokio::sync::broadcast; @@ -53,7 +52,7 @@ fn main() { let enc = GzEncoder::new(tar_gz, Compression::default()); let mut tar = tar::Builder::new(enc); tar.finish().expect("failed to create repo archive"); - symlink("./repo/repo.db.tar.gz", "./repo/repo.db") + symlink("repo.db.tar.gz", "./repo/repo.db") .await .expect("failed to create repo symlink"); @@ -61,7 +60,7 @@ fn main() { let enc = GzEncoder::new(tar_gz, Compression::default()); let mut tar = tar::Builder::new(enc); tar.finish().expect("failed to create repo archive"); - symlink("./repo/repo.files.tar.gz", "./repo/repo.files") + symlink("repo.files.tar.gz", "./repo/repo.files") .await .expect("failed to create repo symlink"); } diff --git a/backend/src/package/add.rs b/backend/src/package/add.rs index b3eaf74..a86aef5 100644 --- a/backend/src/package/add.rs +++ b/backend/src/package/add.rs @@ -3,7 +3,6 @@ use crate::builder::types::Action; use crate::db::prelude::Packages; use crate::db::{packages, versions}; use anyhow::anyhow; -use rocket::State; use sea_orm::ColumnTrait; use sea_orm::QueryFilter; use sea_orm::{ActiveModelTrait, DatabaseConnection, EntityTrait, Set, TransactionTrait}; @@ -12,7 +11,7 @@ use tokio::sync::broadcast::Sender; pub async fn package_add( db: &DatabaseConnection, pkg_name: String, - tx: &State>, + tx: &Sender, ) -> anyhow::Result<()> { let txn = db.begin().await?; diff --git a/backend/src/package/update.rs b/backend/src/package/update.rs index 1fa6eec..ed268af 100644 --- a/backend/src/package/update.rs +++ b/backend/src/package/update.rs @@ -3,7 +3,6 @@ use crate::builder::types::Action; use crate::db::prelude::{Packages, Versions}; use crate::db::{packages, versions}; use anyhow::anyhow; -use rocket::State; use sea_orm::ColumnTrait; use sea_orm::QueryFilter; use sea_orm::{ActiveModelTrait, DatabaseConnection, EntityTrait, Set, TransactionTrait}; @@ -13,7 +12,7 @@ pub async fn package_update( db: &DatabaseConnection, pkg_id: i32, force: bool, - tx: &State>, + tx: &Sender, ) -> anyhow::Result<()> { let txn = db.begin().await?;