Tristan Daniël Maat
240bad3a6f
I missed the .nix suffix, and due to lacking CI, I didn't catch the error before merging. Whoops!
46 lines
1 KiB
Nix
46 lines
1 KiB
Nix
{ pkgs, ... }:
|
|
|
|
let
|
|
tlaternet = import ../derivations/tlaternet { inherit pkgs; };
|
|
tlaternet-templates = import ../derivations/tlaternet-templates.nix { inherit pkgs; };
|
|
|
|
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 = [
|
|
"tlaternet-mail:/srv/mail"
|
|
];
|
|
environment = {
|
|
VIRTUAL_HOST = "tlater.net,www.tlater.net";
|
|
LETSENCRYPT_HOST = "tlater.net,www.tlater.net";
|
|
};
|
|
networks = [
|
|
"webproxy"
|
|
];
|
|
extraDockerOptions = [
|
|
"--domainname=tlater.net"
|
|
];
|
|
};
|
|
};
|
|
}
|