-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdefault.nix
49 lines (41 loc) · 1.12 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{
pkgs,
rustPlatform,
version,
gitRevision,
buildInputs,
nativeBuildInputs,
}: rec {
satori-archiver = rustPlatform.buildRustPackage {
pname = "satori-archiver";
version = version;
src = ./..;
cargoLock.lockFile = ../Cargo.lock;
nativeBuildInputs = nativeBuildInputs;
buildInputs = buildInputs;
cargoBuildFlags = ["--package satori-archiver"];
GIT_REVISION = gitRevision;
# No need to do tests here, testing should have already been done earlier in CI pipeline
doCheck = false;
};
satori-archiver-container-image = pkgs.dockerTools.buildImage {
name = "satori-archiver";
tag = "latest";
created = "now";
copyToRoot = pkgs.buildEnv {
name = "image-root";
paths = [pkgs.bashInteractive pkgs.coreutils];
pathsToLink = ["/bin"];
};
config = {
Entrypoint = ["${pkgs.tini}/bin/tini" "--" "${satori-archiver}/bin/satori-archiver"];
ExposedPorts = {
"9090/tcp" = {};
};
Env = [
"SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"
"OBSERVABILITY_ADDRESS=0.0.0.0:9090"
];
};
};
}