cleanup vaultwarden container
This commit is contained in:
parent
397b773678
commit
19e082d3f1
1 changed files with 7 additions and 7 deletions
|
@ -1,13 +1,13 @@
|
||||||
{ ... }:
|
{ lib, ... }:
|
||||||
let
|
let
|
||||||
directories = [
|
|
||||||
"/opt/vaultwarden"
|
|
||||||
];
|
|
||||||
domain = "crypt.tdback.net";
|
domain = "crypt.tdback.net";
|
||||||
port = "11001";
|
port = "11001";
|
||||||
|
directory = "/opt/vaultwarden";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
systemd.tmpfiles.rules = map (x: "d ${x} 0755 share share - -") directories;
|
systemd.tmpfiles.rules =
|
||||||
|
map (x: "d ${x} 0755 share share - -") (lib.lists.singleton directory);
|
||||||
|
|
||||||
virtualisation.oci-containers.containers.vaultwarden = {
|
virtualisation.oci-containers.containers.vaultwarden = {
|
||||||
image = "vaultwarden/server:latest";
|
image = "vaultwarden/server:latest";
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
@ -15,7 +15,7 @@ in
|
||||||
"${port}:80"
|
"${port}:80"
|
||||||
];
|
];
|
||||||
volumes = [
|
volumes = [
|
||||||
"/opt/vaultwarden/data:/data"
|
"${directory}/data:/data"
|
||||||
];
|
];
|
||||||
environment = {
|
environment = {
|
||||||
DOMAIN = domain;
|
DOMAIN = domain;
|
||||||
|
@ -25,7 +25,7 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.caddy.virtualHosts."${domain}".extraConfig = ''
|
services.caddy.virtualHosts.${domain}.extraConfig = ''
|
||||||
encode zstd gzip
|
encode zstd gzip
|
||||||
reverse_proxy http://localhost:${port} {
|
reverse_proxy http://localhost:${port} {
|
||||||
header_up X-Real-IP {remote_host}
|
header_up X-Real-IP {remote_host}
|
||||||
|
|
Loading…
Reference in a new issue