2020-07-12 00:01:10 +01:00
|
|
|
{ pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
tlaternet = import ../derivations/tlaternet { inherit pkgs; };
|
2020-07-20 21:09:21 +01:00
|
|
|
tlaternet-templates = import ../derivations/tlaternet-templates.nix { inherit pkgs; };
|
2020-07-12 00:01:10 +01:00
|
|
|
|
|
|
|
in
|
|
|
|
{
|
|
|
|
networked-docker-containers = {
|
|
|
|
web = {
|
|
|
|
image = "tlaternet/web";
|
|
|
|
imageFile = pkgs.dockerTools.buildImage {
|
|
|
|
name = "tlaternet/web";
|
|
|
|
tag = "latest";
|
|
|
|
contents = tlaternet;
|
|
|
|
config = {
|
|
|
|
Cmd = [ "${tlaternet}/bin/tlaternet" ];
|
|
|
|
Volumes = {
|
|
|
|
"/srv/mail" = {};
|
|
|
|
};
|
|
|
|
Env = [
|
|
|
|
"ROCKET_PORT=80"
|
|
|
|
"ROCKET_TEMPLATE_DIR=${tlaternet-templates}/srv/web"
|
|
|
|
];
|
|
|
|
ExposedPorts = {
|
|
|
|
"80" = {};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
volumes = [
|
2020-07-12 18:36:52 +01:00
|
|
|
"tlaternet-mail:/srv/mail"
|
2020-07-12 00:01:10 +01:00
|
|
|
];
|
|
|
|
environment = {
|
|
|
|
VIRTUAL_HOST = "tlater.net,www.tlater.net";
|
|
|
|
LETSENCRYPT_HOST = "tlater.net,www.tlater.net";
|
|
|
|
};
|
|
|
|
networks = [
|
|
|
|
"webproxy"
|
|
|
|
];
|
|
|
|
extraDockerOptions = [
|
|
|
|
"--domainname=tlater.net"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|