Browse Source

don't create cache/log volume

main
Jörg Thalheim 4 months ago
parent
commit
f7f5c5aa8d
No known key found for this signature in database GPG Key ID: 3F2096411B5F92
  1. 5
      image.nix
  2. 4
      module.nix

5
image.nix

@ -3,9 +3,10 @@
dockerTools.buildLayeredImage {
name = "nginx";
contents = [ nginx ];
# also we log to stderr, it still needs /var/log/nginx on start
extraCommands = ''
mkdir -p etc
chmod u+w etc
mkdir -p etc var/cache/nginx var/log/nginx
chmod u+w etc var/cache/nginx var/log/nginx
echo "nginx:x:1000:1000::/:" > etc/passwd
echo "nginx:x:1000:nginx" > etc/group
'';

4
module.nix

@ -22,13 +22,9 @@ in {
imagePullPolicy = "IfNotPresent";
volumeMounts."/etc/nginx".name = "config";
volumeMounts."/var/lib/html".name = "static";
volumeMounts."/var/log/nginx".name = "logs";
volumeMounts."/var/log/cache".name = "cache";
};
volumes.config.configMap.name = "nginx-config";
volumes.static.configMap.name = "nginx-static";
volumes.logs.configMap.name = "nginx-logs";
volumes.cache.configMap.name = "nginx-cache";
};
};
};

Loading…
Cancel
Save