mirror of
https://github.com/versia-pub/activitypub.git
synced 2025-12-06 14:48:19 +01:00
feat: oci image
This commit is contained in:
parent
42133b257b
commit
5db0f6a37a
19
flake.nix
19
flake.nix
|
|
@ -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 {
|
||||||
|
|
|
||||||
10
module.nix
10
module.nix
|
|
@ -254,11 +254,11 @@ in
|
||||||
script = "${cfg.package}/bin/lysandap";
|
script = "${cfg.package}/bin/lysandap";
|
||||||
preStart = "${cfg.mig-package}/bin/ls-ap-migration up";
|
preStart = "${cfg.mig-package}/bin/ls-ap-migration up";
|
||||||
environment = lib.mkDefault {
|
environment = lib.mkDefault {
|
||||||
"PORT" = "${toString cfg.port}";
|
"PORT" = "${toString cfg.port}";
|
||||||
"ADDRESS" = "${cfg.address}:${toString cfg.port}";
|
"ADDRESS" = "${cfg.address}:${toString cfg.port}";
|
||||||
"FEDERATED_DOMAIN" = cfg.domain;
|
"FEDERATED_DOMAIN" = cfg.domain;
|
||||||
"SERVICE_SCALE" = toString cfg.serviceScale;
|
"SERVICE_SCALE" = toString cfg.serviceScale;
|
||||||
"LOCAL_USER_NAME" = "example";
|
"LOCAL_USER_NAME" = "example";
|
||||||
};
|
};
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
DynamicUser = true;
|
DynamicUser = true;
|
||||||
|
|
|
||||||
|
|
@ -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 {
|
||||||
|
|
|
||||||
|
|
@ -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 {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue