don't create cache/log volume

This commit is contained in:
Jörg Thalheim 2021-01-08 13:06:05 +01:00
parent 5907008f2b
commit f7f5c5aa8d
No known key found for this signature in database
GPG Key ID: 003F2096411B5F92
2 changed files with 3 additions and 6 deletions

View File

@ -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
'';

View File

@ -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";
};
};
};