forked from zeratax/matrix-registration
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker.nix
37 lines (33 loc) · 764 Bytes
/
docker.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
{ pkgs ? import <nixpkgs> {}, tag ? "latest" }:
let
matrix-registration = import ./shell.nix { inherit pkgs; };
in pkgs.dockerTools.buildImage {
name = "matrix-registration";
tag = tag;
created = "now";
contents = [ matrix-registration ];
config = {
Entrypoint = [
"${matrix-registration}/bin/matrix-registration"
"--config-path=/data/config.yaml"
];
WorkingDir = "/data";
Volumes = {
"/data" = {};
};
ExposedPorts = {
"5000/tcp" = {};
};
HealthCheck = {
Interval = 3000000000;
Timeout = 1000000000;
StartPeriod = 3000000000;
Test = [
"CMD"
"${pkgs.curl}/bin/curl"
"-fSs"
"http://localhost:5000/health"
];
};
};
}