compose and container
This commit is contained in:
parent
e64eeab127
commit
b5e6ac568d
3
docker-compose.yml
Normal file
3
docker-compose.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
services:
|
||||
spammer:
|
||||
image: git.4o1x5.dev/4o1x5/rendorseg-scam-spammer
|
46
flake.nix
46
flake.nix
|
@ -25,15 +25,27 @@
|
|||
src = craneLib.cleanCargoSource ./.;
|
||||
strictDeps = true;
|
||||
|
||||
buildInputs = [
|
||||
# Add additional build inputs here
|
||||
] ++ pkgs.lib.optionals pkgs.stdenv.isDarwin [
|
||||
buildInputs = with pkgs; [
|
||||
openssl
|
||||
pkg-config
|
||||
libiconv
|
||||
curl # for utoipa
|
||||
] ++ lib.optionals pkgs.stdenv.isDarwin [
|
||||
# Additional darwin specific inputs can be set here
|
||||
pkgs.libiconv
|
||||
];
|
||||
nativeBuildInputs = with pkgs;[
|
||||
openssl
|
||||
pkg-config
|
||||
libiconv
|
||||
curl
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
|
||||
};
|
||||
|
||||
my-crate = craneLib.buildPackage (commonArgs // {
|
||||
spammer = craneLib.buildPackage (commonArgs // {
|
||||
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
|
||||
|
||||
# Additional environment variables or build phases/hooks can be set
|
||||
|
@ -43,13 +55,33 @@
|
|||
in
|
||||
{
|
||||
checks = {
|
||||
inherit my-crate;
|
||||
inherit spammer;
|
||||
};
|
||||
|
||||
packages.default = my-crate;
|
||||
packages = {
|
||||
inherit spammer;
|
||||
spammer-container = pkgs.dockerTools.buildLayeredImage {
|
||||
name = "spammer";
|
||||
tag = "latest";
|
||||
|
||||
contents = with pkgs; [
|
||||
cacert
|
||||
openssl
|
||||
pkg-config
|
||||
libiconv
|
||||
];
|
||||
|
||||
config = {
|
||||
WorkingDir = "/app";
|
||||
Volumes = { "/app" = { }; };
|
||||
Entrypoint = [ "${spammer}/bin/rendorseg-scam-spammer" ];
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
apps.default = flake-utils.lib.mkApp {
|
||||
drv = my-crate;
|
||||
drv = spammer;
|
||||
};
|
||||
|
||||
devShells.default = craneLib.devShell {
|
||||
|
|
Loading…
Reference in a new issue