add custom minio systemd service
This commit is contained in:
parent
ce09e1fb9a
commit
36a13c3e66
1 changed files with 19 additions and 8 deletions
|
@ -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" ];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue