add custom minio systemd service

This commit is contained in:
Charlotte 🦝 Delenk 2022-01-26 12:22:14 +01:00
parent ce09e1fb9a
commit 36a13c3e66
Signed by: darkkirb
GPG key ID: 015E3768A70AFBC5

View file

@ -4,7 +4,7 @@ let
in
{
services.minio = {
enable = true;
enable = false;
rootCredentialsFile = "/run/secrets/security/minio/credentials_file";
};
services.nginx.virtualHosts."minio.int.chir.rs" = {
@ -30,12 +30,23 @@ in
};
};
sops.secrets."security/minio/credentials_file" = { };
systemd.services.minio.serviceConfig.ExecStart = "${pkgs.minio}/bin/minio gateway s3 --json --address :9000 --console-address :9001 --config-dir=/var/lib/minio/config http://[fd00:e621:e621:2::2]:9000";
systemd.services.minio.environment = {
MINIO_CACHE = "on";
MINIO_CACHE_DRIVES = "/var/cache/minio";
MINIO_CACHE_QUOTA = "80";
MINIO_CACHE_WATERMARK_LOW = "70";
MINIO_CACHE_WATERMARK_HIGH = "90";
systemd.services.minio = {
enable = true;
description = "Minio Object Storage";
after = [ "network.target" ];
environment = {
MINIO_BROWSER = "on";
MINIO_REGION = "eu-west-1";
MINIO_CACHE = "on";
MINIO_CACHE_DRIVES = "/var/cache/minio";
MINIO_CACHE_QUOTA = "80";
MINIO_CACHE_WATERMARK_LOW = "70";
MINIO_CACHE_WATERMARK_HIGH = "90";
};
serviceConfig = {
EnvironmentFile = "/run/secrets/security/minio/credentials_file";
ExecStart = "${pkgs.minio}/bin/minio gateway s3 --json --address :9000 --console-address :9001 --config-dir=/var/lib/minio/config http://[fd00:e621:e621:2::2]:9000";
};
wantedBy = [ "multi-user.target" ];
};
}