Add website service
This commit is contained in:
parent
8fe36b187b
commit
9010db4f75
|
@ -14,6 +14,7 @@
|
|||
./services/nginx.nix
|
||||
./services/gitlab.nix
|
||||
./services/nextcloud.nix
|
||||
./services/tlaternet.nix
|
||||
];
|
||||
|
||||
networking = {
|
||||
|
|
1
etc/nixos/derivations/tlaternet
Submodule
1
etc/nixos/derivations/tlaternet
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit bb19002f511e7ffe54fc2375562e32ed9526c740
|
1
etc/nixos/derivations/tlaternet-templates
Submodule
1
etc/nixos/derivations/tlaternet-templates
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 1160d96b064531f65290e2d665c7c8d05fc3d29a
|
45
etc/nixos/services/tlaternet.nix
Normal file
45
etc/nixos/services/tlaternet.nix
Normal file
|
@ -0,0 +1,45 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
tlaternet = import ../derivations/tlaternet { inherit pkgs; };
|
||||
tlaternet-templates = import ../derivations/tlaternet-templates { 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 = [
|
||||
"mail:/srv/mail"
|
||||
];
|
||||
environment = {
|
||||
VIRTUAL_HOST = "tlater.net,www.tlater.net";
|
||||
LETSENCRYPT_HOST = "tlater.net,www.tlater.net";
|
||||
};
|
||||
networks = [
|
||||
"webproxy"
|
||||
];
|
||||
extraDockerOptions = [
|
||||
"--domainname=tlater.net"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue