2024-04-21 15:28:35 -07:00
|
|
|
{ inputs
|
|
|
|
|
|
|
|
# Dependencies
|
|
|
|
, dockerTools
|
|
|
|
, lib
|
|
|
|
, main
|
|
|
|
, stdenv
|
|
|
|
, tini
|
|
|
|
}:
|
|
|
|
|
|
|
|
dockerTools.buildLayeredImage {
|
|
|
|
name = main.pname;
|
|
|
|
tag = "main";
|
|
|
|
created = "@${toString inputs.self.lastModified}";
|
|
|
|
contents = [
|
|
|
|
dockerTools.caCertificates
|
2024-11-30 14:18:46 -05:00
|
|
|
main
|
2024-04-21 15:28:35 -07:00
|
|
|
];
|
|
|
|
config = {
|
2024-10-24 21:29:17 -04:00
|
|
|
Entrypoint = if !stdenv.hostPlatform.isDarwin
|
2024-04-21 15:28:35 -07:00
|
|
|
# Use the `tini` init system so that signals (e.g. ctrl+c/SIGINT)
|
|
|
|
# are handled as expected
|
|
|
|
then [ "${lib.getExe' tini "tini"}" "--" ]
|
|
|
|
else [];
|
|
|
|
Cmd = [
|
|
|
|
"${lib.getExe main}"
|
|
|
|
];
|
2024-11-02 13:12:14 -04:00
|
|
|
Env = [
|
|
|
|
"RUST_BACKTRACE=full"
|
|
|
|
];
|
2025-01-26 01:05:41 +00:00
|
|
|
Labels = {
|
2025-01-25 22:42:16 -05:00
|
|
|
"org.opencontainers.image.authors" = "June Clementine Strawberry <june@girlboss.ceo> and Jason Volk
|
|
|
|
<jason@zemos.net>";
|
|
|
|
"org.opencontainers.image.created" ="@${toString inputs.self.lastModified}";
|
|
|
|
"org.opencontainers.image.description" = "a very cool Matrix chat homeserver written in Rust";
|
2025-05-10 20:37:08 +01:00
|
|
|
"org.opencontainers.image.documentation" = "https://continuwuity.org/";
|
2025-01-25 22:42:16 -05:00
|
|
|
"org.opencontainers.image.licenses" = "Apache-2.0";
|
|
|
|
"org.opencontainers.image.revision" = inputs.self.rev or inputs.self.dirtyRev or "";
|
2025-05-10 20:37:08 +01:00
|
|
|
"org.opencontainers.image.source" = "https://forgejo.ellis.link/continuwuation/continuwuity";
|
2025-01-26 01:05:41 +00:00
|
|
|
"org.opencontainers.image.title" = main.pname;
|
2025-05-10 20:37:08 +01:00
|
|
|
"org.opencontainers.image.url" = "https://continuwuity.org/";
|
|
|
|
"org.opencontainers.image.vendor" = "continuwuation";
|
2025-01-26 01:05:41 +00:00
|
|
|
"org.opencontainers.image.version" = main.version;
|
|
|
|
};
|
2024-04-21 15:28:35 -07:00
|
|
|
};
|
|
|
|
}
|