28 lines
695 B
Nix
28 lines
695 B
Nix
|
{ config, pkgs, ... }:
|
||
|
|
||
|
{
|
||
|
virtualisation.oci-containers.containers.webserver = {
|
||
|
image = "tlaternet/webserver";
|
||
|
|
||
|
imageFile = pkgs.dockerTools.buildImage {
|
||
|
name = "tlaternet/webserver";
|
||
|
tag = "latest";
|
||
|
contents = pkgs.tlaternet-webserver.webserver;
|
||
|
|
||
|
config = {
|
||
|
Cmd = [ "tlaternet-webserver" ];
|
||
|
Volumes = { "/srv/mail" = { }; };
|
||
|
Env = [
|
||
|
"ROCKET_PORT=80"
|
||
|
"ROCKET_TEMPLATE_DIR=${pkgs.tlaternet-templates.templates}/browser/"
|
||
|
];
|
||
|
ExposedPorts = { "80" = { }; };
|
||
|
};
|
||
|
};
|
||
|
|
||
|
ports = [ "3002:80" ];
|
||
|
volumes = [ "tlaternet-mail:/srv/mail" ];
|
||
|
extraOptions = [ "--hostname=tlater.net" ];
|
||
|
};
|
||
|
}
|