feat: oci image

This commit is contained in:
April John 2024-05-09 23:07:20 +02:00
parent 42133b257b
commit 5db0f6a37a
Signed by: aprl
GPG key ID: BCB934A2909C5460
4 changed files with 30 additions and 7 deletions

View file

@ -77,6 +77,25 @@
pkg-config pkg-config
]; ];
}; };
packages.ociImage = pkgs.dockerTools.buildLayeredImage
{
name = "lysand-ap-layer";
contents = [
config.packages.lysand-ap-layer config.packages.ls-ap-migration pkgs.bash
];
config = {
Cmd = [
"${pkgs.bash}/bin/bash"
"${config.packages.ls-ap-migration}/bin/ls-ap-migration"
"up"
"&&"
"${config.packages.lysand-ap-layer}/bin/lysand-ap-layer"
];
ExposedPorts = {
"8080/tcp" = { };
};
};
};
# Rust dev environment # Rust dev environment
devShells.default = pkgs.mkShell { devShells.default = pkgs.mkShell {

View file

@ -44,6 +44,7 @@ mod error;
mod http; mod http;
mod objects; mod objects;
mod utils; mod utils;
//mod lysand;
#[derive(Debug, Serialize, Deserialize)] #[derive(Debug, Serialize, Deserialize)]
struct Response { struct Response {

View file

@ -1,5 +1,8 @@
use crate::{ use crate::{
activities::{create_post::CreatePost, follow::{self, Follow}}, activities::{
create_post::CreatePost,
follow::{self, Follow},
},
database::{State, StateHandle}, database::{State, StateHandle},
entities::{self, user}, entities::{self, user},
error::Error, error::Error,
@ -42,7 +45,7 @@ pub struct DbUser {
pub enum PersonAcceptedActivities { pub enum PersonAcceptedActivities {
CreateNote(CreatePost), CreateNote(CreatePost),
Follow(Follow), Follow(Follow),
Accept(follow::Accept) Accept(follow::Accept),
} }
impl DbUser { impl DbUser {