generated from john/nix-docker
tweaks
This commit is contained in:
16
README.md
16
README.md
@@ -1,15 +1,5 @@
|
||||
# nix-docker
|
||||
# [Grafana Loki](https://grafana.com/docs/loki/latest/)
|
||||
|
||||
Template for making Nix-based LXC containers in Proxmox to run Docker
|
||||
## [Loki NixOS Options](https://search.nixos.org/options?sort=relevance&type=packages&query=services.loki)
|
||||
|
||||
## NFS Mounts
|
||||
|
||||
Needs to be done in a privileged container because AppArmor makes it a pain in the ass
|
||||
|
||||
- [Unprivileged LXC containers](https://pve.proxmox.com/wiki/Unprivileged_LXC_containers)
|
||||
- [Mount NFS inside LXC containers](https://theorangeone.net/posts/mount-nfs-inside-lxc/)
|
||||
- [How to allow specific Proxmox LXC containers to mount NFS shares on the network?](https://unix.stackexchange.com/questions/450308/how-to-allow-specific-proxmox-lxc-containers-to-mount-nfs-shares-on-the-network)
|
||||
|
||||
## Docker
|
||||
|
||||
- [Docker on NixOS](https://nixos.wiki/wiki/Docker)
|
||||
## [Loki Configuration Examples](https://grafana.com/docs/loki/latest/configure/examples/configuration-examples/)
|
||||
12
loki.nix
12
loki.nix
@@ -1,9 +1,13 @@
|
||||
{ pkgs, userName, ... }:
|
||||
let
|
||||
lokiPort = 3100;
|
||||
in
|
||||
{
|
||||
networking.firewall.allowedTCPPorts = [ 3100 ];
|
||||
networking.firewall.allowedTCPPorts = [ lokiPort ];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
(pkgs.writeShellScriptBin "loki-check" "curl http://127.0.0.1:3100/ready")
|
||||
(pkgs.writeShellScriptBin "loki-check" "curl http://localhost:3100/ready")
|
||||
(pkgs.writeShellScriptBin "loki-logs" "journalctl -b -u loki.service -n 25")
|
||||
];
|
||||
|
||||
services.loki = {
|
||||
@@ -11,8 +15,8 @@
|
||||
user = "${userName}";
|
||||
|
||||
configuration = {
|
||||
server.http_listen_port = 3100;
|
||||
server.grpc_listen_port = 9096;
|
||||
server.http_listen_port = lokiPort;
|
||||
# server.grpc_listen_port = 9096;
|
||||
auth_enabled = false;
|
||||
|
||||
ingester = {
|
||||
|
||||
Reference in New Issue
Block a user