nginx reverse proxy for api and console port
This commit is contained in:
@@ -87,7 +87,10 @@
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:${toString opts.port}";
|
||||
proxyPass = "http://localhost:${toString opts.dataPort}";
|
||||
};
|
||||
locations."/console" = {
|
||||
proxyPass = "https://localhost:${toString opts.consolePort}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -32,6 +32,11 @@
|
||||
sopsFile = ./secrets/cloudflare.json;
|
||||
key = "CF_API_KEY";
|
||||
};
|
||||
|
||||
"minio-root-pass" = {
|
||||
sopsFile = ./secrets/minio.json;
|
||||
key = "minioPass";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -72,6 +77,23 @@
|
||||
};
|
||||
};
|
||||
|
||||
# Declare minio service manually
|
||||
services.minio-service = {
|
||||
enable = true;
|
||||
|
||||
dataDir = "/data/minio";
|
||||
rootUser = "admin";
|
||||
rootPasswordFile = config.sops.secrets."minio-root-pass".path;
|
||||
|
||||
dataPort = 9000; # S3 API access
|
||||
consolePort = 9001; # Admin console access
|
||||
|
||||
default-nginx = {
|
||||
enable = true;
|
||||
hostname = "imgs.roypository.com";
|
||||
};
|
||||
};
|
||||
|
||||
# Grub Boot Loader Setup
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
|
||||
+2
-1
@@ -24,7 +24,7 @@
|
||||
minio-service.url = "path:../homelab-services/minio-service";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, disko, sops-nix, quasiSecrets, impermanence, tests-service }@inputs:
|
||||
outputs = { self, nixpkgs, home-manager, disko, sops-nix, quasiSecrets, impermanence, tests-service, minio-service }@inputs:
|
||||
let
|
||||
nodes = [
|
||||
{
|
||||
@@ -53,6 +53,7 @@
|
||||
quasiSecrets.nixosModules.serviceList
|
||||
impermanence.nixosModules.impermanence
|
||||
tests-service.nixosModules.default
|
||||
minio-service.nixosModules.default
|
||||
home-manager.nixosModules.home-manager {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
|
||||
Reference in New Issue
Block a user